We can apply linearity of expectation to this to make it easier. This means we reduce the problem to finding the expectation that the red car i precedes the blue car j. This is just the probability of this event. I'm having trouble computing this probability. I appreciate the help.
10 red cars, 10 blue cars, 10 green cars are distributed randomly in a line. What is the expected number of times a red car precedes a blue car?
270 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 3 best solutions below
On
Well, you don't care much about the colors of the cars at this point. In fact, you don't even care about the other cars. In half the cases the red car will be before the blue car, and in the other half it'll be after. By linearity of expectation, you just count the number of pairs of red-blue cars and divide that by $2$ to get your answer.
Hope that helps,
On
Using my words :
"A red car precedes a blue car" means that for any particular blue car: ...rb... rather than ...gb..., ...bb..., or b.... The later is when it is at the start of line, rather than any of the remaining $29$ positions. Likewise of the remaining $29$ cars, there are $10$ red cars.
Thus for a particular blue car the probability that some car precedes it is $29/30$, and given that, then the conditional probability that the preceding car is red is $10/29$. We multiply these to obtain that the expected number of times that some red car precedes a particular blue car is $1/3$.
There are totes ten blue cars, thus by Linearity of Expectation, the expected number of times a red car precedes a blue car is $10/3$.
We find the expected number of times that a red car immediately precedes a blue car. Imagine that the red cars are labelled $1$ to $10$.
Let $X_i=1$ if red car $i$ immediately precedes a blue car, and let $X_i=0$ otherwise. We want to find the expectation of $X_1+\cdots+X_{10}$. By the linearity of expectation and symmetry this is $10E(X_1)$.
We have $E(X_1)=\Pr(X_1=1)$. For $X_1$ to be $1$, red car $1$ must be in positions $1$ to $29$ (probability $\frac{29}{30}$). Given that it is in one of these positions, the probability there is a blue immediately behind it is $\frac{10}{29}$. Thus $\Pr(X_1=1)=\frac{10}{30}$.