Given 3 white balls and 1 black ball in a box.Take out ball by ball until getting a black one.Calculate the expected value for number of takes 
Given a container with 3 white balls and 1 black ball.
We take out balls randomly from the container, one by one, until a black one pop out. Calculate the expected value of number of balls taken out, if the balls are not returned back to the container.

The final answer is 2.5 but I can't understand why.
I thought about:
$Pr(X = i) = \frac{1}{5-i} \space(1 \le i \le 4) $
When $X$ is the pop attempt time.
Using the $E[X = x_i] = \Sigma_{i=1}^4 x_i \cdot Pr(X = x_i) = \Sigma_{i=1}^4 x_i\cdot \frac{1}{5-i} = \frac{1}{4} + \frac{2}{3} + \frac{3}{2} + 1 \ne 2.5$
It not seem to be the right way; what is the right way to solve such question?
thanks in advance.
 A: You have correctly found that $\mathrm{Pr}(X=1) = \frac 14.$
Now if you do not find the black ball on the first draw, the probability
to find it on the second draw is $\frac 13$;
but that says $\mathrm{Pr}(X=2 \mid X > 1) = \frac 13$.
For the calculation of expected value, you need $\mathrm{Pr}(X=2),$
which you can find by
$$\mathrm{Pr}(X=2) = \mathrm{Pr}(X=2 \mid X > 1) \, \mathrm{Pr}(X>1)
= \frac 13 \cdot \frac 34 = \frac 14.$$
And similarly $\mathrm{Pr}(X=i) = \frac 14$ for all $i \in \{1,2,3,4\}.$
As a further check you can add up the probabilities used in the expected value.
Since all outcomes must be counted, the probabilities should add up to $1$.
Sure enough, $4\cdot\frac14 = 1$, but $$\frac14 + \frac13 + \frac12 + \frac11 > 1.$$
An intuitive explanation why $\mathrm{Pr}(X=i) = \frac 14$
is that the balls might as well be lined up already inside
the container in the order in which you will pull them out.
For the results to be random the arrangement inside the container must be random,
and the black ball is equally likely to have been in any of the four possible places
in the sequence of balls.
A: You can determine each probability explicitly. Seems to me that your probabilities are wrong
$P(X=1) = \frac{1}{4}$
$P(X=2) = \frac{3}{4} \frac{1}{3} $
$P(X=3) = \frac{3}{4} \frac{2}{3} \frac{1}{2}$
Observe that all probabilities are equal to $1/4$. So the expected value is 2.5.
