In: Statistics and Probability
4. 40% of all the trees in a certain ponderosa pine stand (N is very large) were attacked by mountain pine beetles. If 100 trees are randomly selected from this stand, what is the probability that more than 50% of the trees are infested?
ANSWER USING R ONLY
40% of all the trees in a certain ponderosa pine stand (N is very large) were attacked by mountain pine beetles.
Thus probability that a randomly selected tree from this stand is infested = 0.4
If 100 trees are randomly selected from this stand, then the number of tress among these 100 trees which are infested follows Binomial(100,0.4) distribution.
Thus, the probability that more than 50% of the trees are infested
= Probability that more than 50 of the trees are infested
= 1 - Probability that at most 50 of the trees are infested
= 1 - CDF of a Binomial(100,0.4) random variable at mass point 50
CDF of Binomial(n,p) random variable at mass point 'q' is calculated in RStudio using the code "pbinom(q,n,p,)".
Thus the CDF of a Binomial(100,0.4) random variable at mass point 50 will be calulated using the code "pninom(50,100,0.4)" and the required answer will be calculated using the code "1-pbinom(50,100,0.4)".
The answer obtained using the above code "1-pbinom(50,100,0.4)" is 0.01676169.