[Math] Probability $A$ is before $B$ when the 26 letters are arranged randomly

combinatoricsprobability

The 26 letters A, B, … , Z are arrange in a random order. [Equivalently, the letters are selected sequentially at random without replacement.]

a) What is the probability that A comes before B in the random order?

b) What is the probability that A comes before Z in the random order?

c) What is the probability that A comes just before B in the random order?

Any help would be much appreciated. I was thinking that for part c the answer would be $1/26$ because we have $25!$ ways of having A right before B and $26!$ total arrangements. Not sure how to proceed with a and b, however.

Edit:

Thank you. For parts (a) and (b) is there a more formal way of getting $1/2$? Such as the formula for the total number of ways we can have $A$ before $B$ over the total number of arrangements? Would it be 25 choose 1 … 2 choose 1 over $26!$ since we can have a in the first spot and B in any spot after it? Then we can have a in the 2nd spot and B in any spot after it. Also, for part (c), doesn't $A$ have to come immediately before $B$, so wouldn't the probability be $1/26$?

Best Answer

a) From symmetry, the probability that $A$ comes before $B$ is same as the probability that $B$ comes before $A$, and the sum of these $2$ probabilities is $1$. Hence, the probability that $A$ comes before $B$ is $0.5$.

b) Here $B$ is replaced with $Z$ and by exchanging the roles of $B$ and $Z$, we get the same probability as in case (a): $0.5$.

c) If $A$ has to come just before $B$, $B$ shouldn't occur at the $1$st position, which has probability of $25/26$. After $B$'s position has been chosen(other than the $1$st position), there are 25 possibilities for position just before $B$ (everything except $B$) and only $1$ possibility is favourable (A coming before B). Hence the required probability is $(25/26)\cdot(1/25) = 1/26$.