In: Statistics and Probability
Assume that 40% of UAE residents prefer to buy organic eggs. Assume that you took a sample of 20 residents who consume eggs.
What is the probability that at least 12 residents will buy organic eggs?
What is the expected number of the residents who buy eggs?
What is the probability that 10 residents will buy organic eggs?
Sol:
problem on binomial distribution
n=20
p=0.40
What is the probability that at least 12 residents will buy organic eggs?
P(X>=12)
P(X=12)+P(X=13)+P(X=14)+P(X=15)+P(X=16)+P(X=17)+P(X=18)+P(X=19)+P(X=20)
=20c12*0.4^12*0.6^20-12+20c13*0.4^13*0.60^20-13+20c14*0.4^14*0.60^20-14+
20c15*0.4^15*0.60^20-15+20c16*0.4^16*0.60^20-16+20c17*0.4^17*0.60^20-17+
20c13*0.4^18*0.60^20-18+20c19*0.4^13*0.60^20-19+20c20*0.4^2080.60^20-20
use below Rcode:
library(tigerstats)
pbinomGC(c(12,20),region="between",size=20,prob=0.40,graph=TRUE)
OUTPUT:
>
pbinomGC(c(12,20),region="between",size=20,prob=0.40,graph=TRUE)
[1] 0.05652637
>
0.0565(rounded to 4 decimals)
What is the expected number of the residents who buy eggs?
expected number of the residents who buy eggs=np=20*0.40=8
8
What is the probability that 10 residents will buy organic eggs?
P(X=10)
20c10*0.4^10*0.60^20-10
= 0.1171416
=0.1171
0.1171