<s>[INST] probability of number of draws A box contains 8 tickets. Two are marked 1, two marked 2, two marked 3, and two marked 4. 
Tickets are drawn at random from the box without replacement until a number appears that has appeared before. Let X be the number of draws that are made.
so the probability when X = 1 is: $4*\frac{2}{8}*\frac{1}{7}$ which is $\frac{1}{7}$.
when X = 2, in my understanding, the probability should be $4*\frac{2}{8}*\frac{6}{7}*\frac{1}{6}$, which is  $\frac{1}{7}$ again. I doubt my answer since I don't think the two probabilities will be the same, but I couldn't spot where my reasoning went wrong. Any help will be appreciated. Thank you.
 [/INST] You are right, the probabilities are not the same, although I am a little puzzled by your case "$X=1$." The smallest possible value of the number of draws until we get our first match is $2$.  But perhaps you are not counting the last draw.
So let $Y$ be the number of draws until the first match, including the draw that got us that match. It is easy to see that $P(Y=2)=\frac{1}{7}$.  It doesn't matter what we first drew. The probability that the next draw matches it is $\frac{1}{7}$.
For $Y=3$, there are two possible patterns, which I will call $abb$ and $aba$ (where $a\ne b$). We don't care what the first draw is, call it $a$. The probability of getting something different ($b$) on the next draw is $\frac{6}{7}$. And given we got $a$ then $b$ on the first two draws, the probability of drawing $b$ on the third is $\frac{1}{6}$. So the probability of a pattern of type $abb$ is $\frac{6}{7}\cdot\frac{1}{6}$.
Similarly, given that we got the pattern $ab$ on the first two draws, the probability of getting $a$ on the third is $\frac{1}{6}$. Thus
$$P(Y=3)=\frac{6}{7}\cdot\frac{1}{7}+\frac{6}{7}\cdot\frac{1}{6}=\frac{2}{7}.$$
The calculation can be collapsed into one step. Given that we got something different from $a$ on the second draw, there are $2$ (out of $6$) tickets that will give us a match, so the probability is $\frac{6}{7}\cdot\frac{2}{6}$. The mistake in the calculation is in the last term of your product.  You had $\frac{1}{6}$ there instead of the correct $\frac{2}{6}$.  The $4\cdot\frac{2}{8}$ part was unnecessary but harmless.
</s>