Thank you @Yarnabrina for your kind and detailed explanation.
Additionally, I gathered some probability examples:
-
rbinom(100,5,0.5)
#> [1] 3 2 2 4 3 4 3 3 4 2 1 3 3 5 3 3 1 2 2 1 3 4 5 3 4 1 3 2 1 3 2 1 3 1 4 3 3
#> [38] 3 3 4 3 4 2 4 3 3 3 2 1 1 4 2 2 1 4 2 2 5 2 1 2 4 5 3 3 2 1 3 3 4 3 2 0 3
#> [75] 3 2 4 2 3 5 2 2 0 3 5 1 2 4 3 2 2 3 4 1 1 4 3 3 4 3
Created on 2019-12-20 by the reprex package (v0.3.0)
"In the above, we have 100 samples of size 5, each with a probability of success of
0.5. It is as though I give a fair coin to each of 100 students and tell each one to
toss the coin 5 times and record the number of heads (successes).
Reference: https://github.com/RobinHankin/stat601"
My comment: this is somewhat confusing, because we have got here sample size of 5 trials not number of counts. Usually when we talk about sample size, it means some number of individual samples measured or observations used in a survey or experiment. It can be easily mistaken with 100 students - that normally would be called a simple size. So not very intuitive function's argument name here - sample size = 5.
-
"Suppose we have a binomial distribution with size 12 and probability 1/3, and we want to calculate the probability of observing 4 successes.
Reference: https://github.com/RobinHankin/stat601"
dbinom(4,12,1/3)
#> [1] 0.238446
Created on 2019-12-20 by the reprex package (v0.3.0)
-
In some group of people the average body weight was 65 Kilograms (SD=7). It was assumed that body weight distribution is normal. When carrying out screening examination among adults, the probability was calculated, that a person who will participate in this study will have a body weight < 66 Kilograms. How was it done?
pnorm(66, mean=65, sd = 7)
#> [1] 0.5567985
Created on 2019-12-20 by the reprex package (v0.3.0)

-
"Assume that the test scores of a college entrance exam fits a normal distribution. Furthermore, the mean test score is 72, and the standard deviation is 15.2. What is the percentage of students scoring 84 or more in the exam? We apply the function pnorm of the normal distribution with mean 72 and standard deviation 15.2. Since we are looking for the percentage of students scoring higher than 84, we are interested in the upper tail of the normal distribution.
Reference: http://www.r-tutor.com/elementary-statistics/probability-distributions/normal-distribution"
pnorm(84, mean=72, sd=15.2, lower.tail=FALSE)
#> [1] 0.2149176
Created on 2019-12-20 by the reprex package (v0.3.0)
My comment: please note the difference between:
a) pnorm(84, mean=72, sd=15.2, lower.tail=FALSE)
b) pnorm(84, mean=72, sd=15.2)
-
Good read:
https://www.jaredlander.com/2013/12/drawing-balls-from-an-urn/