In: Statistics and Probability
There are two routes to get from the student dorms to class - a long route, which is scenic, and a short route, which is not scenic. You want to study whether the route that the students choose to take is independent of the weather (in the context of the table, this will mean whether X and Y are independent), and you generate the accompanying table of probabilities.
Rainy (Y=0) |
Sunny (Y =1) |
Total | |
Long (X=0) | 0.1 | 0.3 | 0.4 |
Short (X=1) | 0.2 | 0.4 | 0.6 |
Total | 0.3 | 0.7 | 1 |
Calculate E(X) and E(Y ).
(b) Calculate E(X | Y = 0). How is this different from E(X)?
(c) Are the route picked and the weather independent of each other? Why or why not? Use the numbers from the table to arrive at the answer.
Solution:
we are given following table of Joint probabilities and marginal probabilities of X = Route picked and Y = Weather
Rainy | Sunny | Total | |
(Y=0) | (Y =1) | ||
Long (X=0) | 0.1 | 0.3 | P(X=0) = 0.4 |
Short (X=1) | 0.2 | 0.4 | P(X=1) = 0.6 |
Total | P(Y=0) =0.3 | P(Y=1) = 0.7 | 1 |
Part a) Calculate E(X) and E(Y ).
and
Part b) Calculate E(X | Y = 0). How is this different from E(X)?
E(X | Y = 0) = 0.6667 is higher than E(X) = 0.6.
Part c) Are the route picked and the weather independent of each other? Why or why not? Use the numbers from the table to arrive at the answer.
events are independent if and only if:
P( A and B) = P(A) x P(B)
So we have to check if:
or not.
Thus from table we have:
and
P(X = 0) = 0.4 and P( Y = 0) = 0.3
Then P(X = 0) * P(Y = 0) = 0.4 * 0.3 = 0.12 which is not equal to
Now consider
and
P(X =0) = 0.4 and P( Y = 1) = 0.7
then P(X = 0) * P( Y = 1) = 0.4 * 0.7 = 0.28 which is also not equal to
Thus we can say the route picked and the weather are NOT independent of each other .