# “Expected Probability”: Withdrawing a white ball from a bucket with a random variable X = number of whites

I have a problem with the subject of "Expected Probability" (I don't really know what is the right name for it).

This is an example of a question: (I am not looking for the specific answer, just for the idea)

What is the probability to withdraw 2 white balls (without returning) from a bucket, that contain X white balls and 120-X black balls. when X is a random variable.

from what I understand, I should represent the probability as function of X and then to get the expected value of it.

        P(two white)     →    X(X-1)/(120∙199)   →   E(X(X-1)/(120∙199))


is this correct? what am I really doing here? maybe you can forward me to a relevant place that I can read about this subject ?

thanks

-

You wrote:

        P(two white)     →    X(X-1)/(120∙199)   →   E(X(X-1)/(120∙199))


It seems hard to talk students out of using arrows in this way. I don't know where they learn to do that.

One could write $$\Pr(\text{two white}\mid X) = \frac{X(X-1)}{120\cdot199},$$ i.e. the conditional probability of getting two white balls given the value of the random variable $X$ is $X(X-1)/(200\cdot199)$. Then we'd have $$\Pr(\text{two white}) = \mathbb E(\Pr(\text{two white}\mid X)) = \mathbb E\left(\frac{X(X-1)}{120\cdot199}\right).$$

That last quantity depends on the probability distribution of the random variable $X$.

-
It's perfectly legitimate in some contexts to use an arrow, as in $A\to B$, to mean "if $A$ then $B$", and it's also legitimate to write things like $\left(\dfrac{n+1}{n}\right)^n\to e$ as $n\to\infty$. But if an arrow is intended merely to direct the reader's eyes to the next step, it's almost always better to rely on either well chosen words or correctly used mathematical notation. – Michael Hardy Jun 18 '13 at 17:24

For any fixed value of $X$, the probability you seek is $$\frac{\binom{X}{2}}{\binom{120}{2}} = \frac{X (X-1)}{120 \cdot 199}$$ as you write.

However now that $X$ is a random variable, it has some distribution. It is clear that $X$ is an integer in $[0,120]$, let's say that $\mathbb{P}[X=k] = p_k$ for $k \in [0,120]$. In case $k=0,k=1$ it's not possible to draw two white balls... Then,

$$\mathbb{P}[\text{draw 2 white balls}] = \sum_{k=2}^{120} p_k \frac{k (k-1)}{120 \cdot 199} = \frac{1}{199 \cdot 120} \sum_{k=2}^{120} p_k k (k-1),$$ which depends on the distribution of $X$.

EDIT Further simplification is possible.

Note that $\mathbb{E}[X^n] = \sum_{k=0}^{120}k^n p_k$. Then,

$$\begin{split} \mathbb{P}[\text{draw 2 white balls}] &= \frac{1}{199 \cdot 120} \sum_{k=2}^{120} p_k k (k-1) \\ &= \frac{1}{199 \cdot 120} \left( \sum_{k=0}^{120} p_k k (k-1) - p_0 \cdot 0 \cdot (-1) - p_1 \cdot 1 \cdot 0 \right) \\ &= \frac{1}{199 \cdot 120} \sum_{k=0}^{120} p_k k (k-1) \\ &= \frac{1}{199 \cdot 120} \left( \sum_{k=0}^{120} k^2 p_k - \sum_{k=0}^{120} k p_k \right) \\ &= \frac{\mathbb{E}[X^2] - \mathbb{E}[X]}{199 \cdot 120} \end{split}$$

-