# What is the probability of selecting Alex?

Consider a $2\times 2$ matrix $A$ such that $A_{11}=A_{22}=10$ and $A_{12}=A_{21}=5$. $A_{ij}$ is the number of students getting subject $i$ and code $j$.

We want to select $3$ students according to the following algorithm:

First randomly select a student having subject $1$ and then randomly select a student having subject $2$.

If these two students have the same code, then select a third student randomly who has a different code. Else, select a third student randomly from the remaining students.

What is the probability that under this algorithm, a particular student Alex, who has subject $1$ and code $1$ is selected in our sample?

This is simple, just some computations, where I believe I am messing up. I will show the working, and kindly mention where I am messing up. The answer is supposed to come $0.1$.

So the desired probability is sum of two probabilities: probability that Alex is selected in first time + probability that Alex is selected in third time.

Prob that Alex is selected in first time is $1/15$, since we are selecting one out of $15$ individuals in the first round, i.e. one out of those having subject $1$.

Now to find the prob that Alex is selected in 3rd round, we condition on the event that the earlier two students had the same code (Code 2, as otherwise Alex won't be selected) or different code.

It is to find this prob that I am messing up. I am losing sight of the probability of conditioning event and conditioned event. Any help is appreciated.

Let $A$ be the event that we pick Alex on the third draw. We exhaust all possibilities for where the first two draws came from as follows: \begin{align*}P(A)&=P(A\cap(A_{1,1},A_{2,1}))+P(A\cap(A_{1,1},A_{2,2}))+P(A\cap(A_{1,2},A_{2,1}))+P(A\cap(A_{1,2},A_{2,2}))\\&=0+P(A|A_{1,1},A_{2,2})P(A_{1,1},A_{2,2})+P(A|A_{1,2},A_{2,1})P(A_{1,2},A_{2,1})+P(A|A_{1,2},A_{2,2})P(A_{1,2},A_{2,2}).\end{align*}
In the first two cases where the probability is nonzero, there are 28 students remaining, so these conditional probabilities are $1/28.$ $P(A_{1,1},A_{2,2})=(10/15)^{2},$ and $P(A_{1,2},A_{2,1})=(5/15)^{2},$ using independence of the first two draws, so this takes care of the first two terms. The conditional probability in the last term is $1/15,$ since there are 15 students with Code 1, none of which have yet been selected, and lastly, $P(A_{1,2},A_{2,2})=(5/15)(10/15),$ again using independence.
• Thanks. So the answer does not really come to be $0.1$. I wonder if the answer given is incorrect. – Landon Carter Feb 7 '17 at 18:55