0

I was given the following problem:

The probability that a student drives a car, takes a bus, rides a bike or walks to school are 0.4, 0.2, 0.3 and 0.1 respectively. Suppose we randomly select 9 students and let $X_1$ be the number of students that drive to school, $X_2$ be the number that take buses, $X_3$ the number that ride bikes and $X_4$ the number that walk. Let $Y = X_1 + X_2$. Find $E(Y)$ and $Var(Y)$.

I did the following:

$$E(Y) = E(X_1 + X_2) = E(X_1) + E(X_2) = np_1 + np_2 = 9*0.4 + 9*0.2 = 5.4$$

$$Var(Y) = Var(X_1 + X_2) = Var(X_1) + Var(X_2) = np_1(1-p_1) + np_2(1-p_2) = ...=3.6$$

The automated grading software marked the $Var(Y)=3.6$ wrong, but did not provide any insight as to why. Can someone explain this to me?

Thank you!

JoeyNYC
  • 11
  • I don't think you can assume linearity of variance, $\textrm{Var}(X_1+X_2) = \textrm{Var}(X_1)+\textrm{Var}(X_2)$, as that only occurs when $X_1$ and $X_2$ are independent. – Shuri2060 Jul 01 '17 at 19:51
  • oh... would i need ot add the covariance of $X_1$ and $X_2$? – JoeyNYC Jul 01 '17 at 19:53
  • It'd probably be better to make use of $\textrm{Var}(Y)=E(Y^2)-(E(Y))^2$. And it'd be twice the covariance? – Shuri2060 Jul 01 '17 at 19:57

0 Answers0