# Line Order Probability

I am struggling to conceptualize conditional probability in this problem.

Four people A,B,C,D form a line in a random order.

a) Find the conditional probability that A is the first in line given that B is the last.

I believe this is $1/3$ because options A,C,D are the only choices for position 1 under the aforementioned scenario.

b) Find the conditional probability that A is the first given that A is not the last.

I believe this is $1/3$ because again there will only be $3$ choices for the first place given the condition set.

c) Find the conditional probability that A is first given that B is not the last.

d) Find the conditional probability that A is the first given that B is (not necessarily immediately) after A.

e) Find the conditional probability that A is standing in line before B given that A is before C.

## 3 Answers

Your answers on a) and b) are correct. To write them down (and get a better oversight on what you are doing) you need proper notation. You can choose for random variables $A,B,C,D$ that take values in $\{1,2,3,4\}$ and where e.g. $\{A=3\}$ stands for the event that person A takes the third position. Then to be found are the conditional probabilities:

• a) $P(A=1\mid B=4)$
• b) $P(A=1\mid A\neq4)$
• c) $P(A=1\mid B\neq4)$
• d) $P(A=1\mid B>1)$
• e) $P(A<B\mid A<C)$

When it comes to conditional probabilities then the following rule is essential:$$P(E\mid F)P(F)=P(E\cap F)$$

Solution of c): $$P(A=1\mid B\neq4)P(B\neq4)=P(A=1\wedge B\neq 4)=P(A=1\wedge B=2)+P(A=1\wedge B=3)$$

where $P(B\neq4)=\frac34$ and $P(A=1\wedge B=2)=P(B=2\mid A=1)P(A=1)=\frac13\frac14$.

Can you take it from here?

• So for c, the answer would be 1/9 = [(1/4)(1/3)] / (3/4) – Lucky12456 Feb 12 '18 at 18:22
• No. We have $P(A=1\mid B\neq4)\frac34=\frac13\frac14+\frac13\frac14$ leading to $P(A=1\mid B\neq4)=\frac29$. – drhab Feb 12 '18 at 18:45

Hint: use total probability theorem. For example, given $B$ is not the last, $B$ can be 1st, 2nd or 3rd, equally likely. Find the probability of $A$ being the 1st for each scenario and find the total probability of $A$ being the 1st.

• So the probability A is first in example c) is 1/4 +1/4 +1/4 +1/3? – Lucky12456 Feb 12 '18 at 10:30
• @Lucky12456 No. There are only 3 scenarios. How did you get 4 terms in the sum? – kludg Feb 12 '18 at 10:34
• I added the probability of each position. – Lucky12456 Feb 12 '18 at 10:37

The way to think of it is that knowing that (e.g.) B is last reduces the set of possible configurations from $24$ to $6$. Each configuration is equally likely, so all that matters is: of those $6$, how many have A first? There are $2$ configurations that have A first and B last (ACDB, ADCB), out of $6$ total that have B last, so the answer is $2/6=1/3$.

Similarly for c), say, there are $18$ configurations where B is not last ($24-6$, since there are $6$ where B is last). Of those, $4$ have A first: ABCD, ABDC, ACBD, ADBC. So the answer is $4/18=2/9.$