Finding variance of random variable in trial with sampling without replacement We have 20 cards, 5 green, 5 yellow, 5 red and 5 blue.
We take out cards until we first encounter the same color of card as the first card that was sampled.
Let $X$ be a random variable, defined by the number of cards that was taken out in the trial. (From the beggining to the end).
If we sample the cards without replacement what is the variance of $X$.

What i tried:
I tried to look for a distribution that will fit.
Negative binom doesnt fit -> the success chance is not constant.
Hypergeometric doesnt fit -> the size of the sample is not constant.
So i tried to calculate $E[X]$ in order to solve it using $V[x] = E[X^2]-(E[X])^2$ and it is getting realy complicated:

I probably miss something, can anyone help?
Thanks.
 A: So the hard part of this question is determining $\operatorname{Pr}(X=x)$, as is often the case. It is often first useful to identify $\mathcal{X}$, the possible values $X$ can take. So let's ask ourself - Can $X=0$ ? No, because we definitely draw at least one card. can $X=1$ ? No, because we definitely draw another card after the first one. Can $X=20$? No, because then we would have drawn more than two of the starting card, which doesnt make sense as the experiment would have ended by then. It's pretty obvious to see that the possible values of $X$ are $\mathcal{X}=\{2,...,17\}$. The fact that there are four colors here is kind of confusing - let's just assume that $5$ of the cards are red and the rest are black, and we assume that the first card we draw is red. What is the probability the next card drawn is red? Well, this is clearly $4/19$. So,
$$\operatorname{Pr}(X=2)=4/19$$
Assume the second card was black. What is the probability the third card is red? The number of red cards is the same, but the number of total cards is now smaller since we are sampling without replacement. Thus,
$$\operatorname{Pr}(\text{third card is red | all other cards black})=4/18$$
But in order to reach this point, the second card must have been black, which means
$$\operatorname{Pr}(X=3)=(1-4/19)\cdot4/18$$
Now assume the third card was black. What is the probability the fourth card is red? Once again, there is one fewer black card, so this is
$$\operatorname{Pr}(\text{fourth card is red | all other cards black})=4/17$$
Once again, in order to reach this point, all previous cards needed to be black. Thus
$$\operatorname{Pr}(X=4)=(1-4/19)\cdot(1-4/18)\cdot4/17$$
We can carry on with this pattern and see that $\forall x\in\mathcal{X}$,
$$\operatorname{Pr}(X=x)=\frac{4}{20-x+1}\prod_{k=2}^{x-1}\left(1-\frac{4}{20-k+1}\right)$$
Hence,
$$\mathrm{E}[X]=\sum_{x=2}^{17}x\cdot\Pr(X=x)=\sum_{x=2}^{17}\left[x\cdot\frac{4}{20-x+1}\prod_{k=2}^{x-1}\left(1-\frac{4}{20-k+1}\right)\right]=5$$
And,
$$\mathrm{E}[X^2]=\sum_{x=2}^{17}x^2\cdot\Pr(X=x)=\sum_{x=2}^{17}\left[x\cdot\frac{4}{20-x+1}\prod_{k=2}^{x-1}\left(1-\frac{4}{20-k+1}\right)\right]=33$$
Thus
$$\operatorname{Var}[X]=\mathrm{E}[X^2]-\mathrm{E}[X]^2=33-5^2=8.$$
