Calculating the expectation of types A certain region is inhabited by $r$ distinct types of a species of insect. Each insect caught will, independently of the types of the previous catches, be of the type $i$ with probability 
$$P_i, i= 1,\dots,r$$. Calculate the mean number of types of insects that are caught before the first type 1 catch.
The solution I am looking at defines an indicator as
$$X_j = 1$$ when type j is caught before type 1
$$X_j = 0$$ otherwise
Then $$\mathbb{E}[X_j] = P\{ \textrm{type j before type 1}\} = P\{ j|\textrm{j or i}\} = \frac{P_j}{P_j + P_1}$$
But I don’t understand how 
$$P\{ \textrm{type j before type 1}\} = P\{ j|\textrm{j or i}\} $$
Can someone explain how this step is correct?
 A: When we think about the event $X_j$, we are only interested in which is caught first: an insect of type $1$ or an insect of type $j$. And to determine which is caught first, we only need to think about the first time that a type $1$ or a type $j$ is caught (call this event $C_j$). This is because once $C_j$ happens then $X_j$ is determined, and any captures before $C_j$ don't affect $X_j$.
So at the capture $C_j$ we know that either a type $j$ or a type $1$ was captured. At $C_j$, the probability that a type $j$ was captured is
$$\mathbb{P}(\textrm{type } j \textrm{ captured} \mid \textrm{type } j \textrm{ or } 1\textrm{ captured}) = \frac{\mathbb{P}(\textrm{type } j \textrm{ captured} \cap (\textrm{type } j \textrm{ or } 1\textrm{ captured}))}{\mathbb{P}(\textrm{type } j \textrm{ or } 1\textrm{ captured})}.$$
The numerator is just the probability that an insect of type $j$ is captured, so has probability $P_j$. The denominator has probability $P_1 + P_j$. Substituting this into the formula above, the probability of $X_j$ is the probability that a type $j$ was chosen at capture $C_j$, which is
$$\mathbb{P}(X_j) = \mathbb{P}(\textrm{type } j \textrm{ captured} \mid \textrm{type } j \textrm{ or } 1\textrm{ captured}) = \frac{P_j}{P_1 + P_j}.$$
