# Find probability and expectation [closed]

18 boys and 2 girls are made to stand in a line in a random order.Let $X$ be the number of boys standing in between the girls .Find $P[X=5]$ and $E[X]$. I proceed in this way: Note that $$P[X=0]=\frac{19.18!.2!}{20!}=\frac{19-0}{20\choose2}$$ $$P[X=1]=\frac{18.18!.2!}{20!}=\frac{19-1}{20\choose2}$$$$P[X=2]=\frac{17.18!.2!}{20!}=\frac{19-2}{20\choose2}$$So, $$P[X=x]=\frac{19-x}{20\choose2}$$,$x=0(1)18.$ so.$$P[X=5]=\frac{19-5}{20\choose2}=0.0737$$ and $$E[X]=\sum_{x=0}^{18}x.\frac{19-x}{20\choose2}=6$$

-
Crosspost: stats.stackexchange.com/q/33558/2970 –  cardinal Aug 2 '12 at 16:29
add comment

## closed as not constructive by cardinal, William, Noah Snyder, Norbert, rschwiebOct 15 '12 at 18:28

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

## 1 Answer

You got it all correct. Just to add a little bit of proof here, imagine the boys as black dots and the two girls as red dots. The configuration $X=5$ implies that the distance between the two red dots is $7$ dots. The number of working configurations is thus $20-7+1=14$ (just translate the fixed line between the red dots). Total configurations correspond to the choice of the position of red dots, which is $$\binom{20}{2} = 190$$ Thus $$P(X=5) = \frac{14}{190} = 0.0737$$ You got the rest correct.

-
:I put this question for such thinking. thank you –  Argha Aug 2 '12 at 16:31
This is a recurrent way of thinking in many brainteasers. You just fix one variable (how the guys are positioned) and just count configurations by looking at the other variable (girls). An example is the following : you got a $n\times p$ rectangle filled with $1 \times 1$ squares (like in a notepad). You start from the bottom-left corner. You can only go up or right. How many path will lead you to the top-right corner ? –  vanna Aug 2 '12 at 16:37
add comment