In: Math
3) When I lived in California I had a small lemon tree in the front yard. If we had rain in the summer (rare=P=.2) it would yield up to 10 lemons, distributed with a binomial distribution, N= 10, P=0.6. If it is perfectly dry (most of the time P=0.8) it the distribution would be binomial with N=6, P=0.4 a) If you get 3 lemons what the probability that it rained. b) If you have 4 lemons, what is the probability that it rained.
a) Let X be the number of lemons
We have to find
P(rain I X =3 )
We know that
P(rain I X =3) = P( X =3 I rain ) .P(rain) / P(X=3)
P(dry) =0.8
P(rain) =0.2
When it rains , X follow Binomial with n=10, p=0.6
= 0.0425
When its dry , X follow Binomial with n= 6 , p=0.4
=0.2765
Thus , P(X=3) = P( X =3 I rain ) .P(rain) + P(X=3 I dry ) .P(dry)
= 0.0425* 0.2 + 0.2765* 0.8
= 0.2297
P(rain I X =3) = 0.0425*0.2 / 0.2297
= 0.0370
Probability that it rained given that we get 3 lemons = 0.0370
b)
We have to find
P(rain I X =4 )
We know that
P(rain I X =4) = P( X =4 I rain ) .P(rain) / P(X=4)
When it rains , X follow Binomial with n=10, p=0.6
= 0.1115
When its dry , X follow Binomial with n= 6 , p=0.4
=0.1382
Thus , P(X=4) = P( X =4 I rain ) .P(rain) + P(X=4 I dry ) .P(dry)
= 0.1329
Therefore ,
P(rain I X =4) = 0.1115*0.2 / 0.1329
= 0.1678
Probability that it rained given that we get 4 lemons = 0.1678