# Probability of arranging a word, conditionally

Consider rearranging the letters in the word RACECAR at random to form a word.

What is the probability that the random word ends with an R given that the word starts with the three letter sequence ACE

I get that let $A = \{ \text{End with r}\}$ and $B$ be the other event (ACE).

I get that the conditional probability,

$$P(A | B) = {({1\over210})\over({1\over21})} = {1\over10}$$

Is this correct?

I calculate $$P(AB) = {6\over1260} = {1\over210}\,\,\,\, \rm{and} \,\,\,\,P(B) = {60\over1260} = {1\over21}$$

If you want to approach directly using definitions...

It may help you to think instead of rearranging the letters in $\color{red}{RAC}E\color{blue}{CAR}$.

We have then your event $B$ corresponds to beginning with $ACE$ where $A$ and $C$ are of either color.

Since every letter in this rephrased problem are distinct, we can treat the sample space as being of size $7!$

To calculate $Pr(B)$, we first count $|B|$. Pick which color the leading $A$ is, pick which color the leading $C$ is. You are left with the remaining $A$ and $C$ as well as both $R$'s to arrange at the end. Dividing by the sample space size, we have then$Pr(B)=\frac{2\cdot 2\cdot 4!}{7!}=\frac{2}{105}$, not $\frac{1}{21}$ like you wrote in your attempt.

To calculate $Pr(A\cap B)$, we approach similarly. Pick the color of the leading $A$, pick the color of the leading $C$, pick the color of the final $R$. This leaves only three characters to arrange just before the end. We have then $Pr(A\cap B)=\frac{2\cdot 2\cdot 2\cdot 3!}{7!}=\frac{1}{105}$

We have then $Pr(A\cap B)/Pr(B)=(\frac{1}{105})/(\frac{2}{105})=\frac{1}{2}$

As you have not shared any of your calculations in how you arrived at the numbers you write, I cannot tell you why your calculations are incorrect.

If we know the word starts with $ACE$ then we just need to calculate the probability that the last four letters - which are some combination of $RRCA$ - end with $R$.

The last letter is equally likely to be the $R$, $R$, $C$ or $A$, so the probability it is an $R$ is $2/4=1/2.$

Assuming there is no distinction between the letters of one type, you have 3! outcomes matching this choice. The total number of outcomes is $\frac{7!}{2!2!2!}$. Now divide the former throuhh the latter.