0
$\begingroup$

Suppose we have an experiment of tossing a fair dice until the number $6$ results.

If $Y$ denotes the random variable of the number of throws until we get $6$, and $X$ denotes the random variable that counts the number of tosses which resulted in an even number, I need to calculate:

a. The conditional distribution of $X$ given $Y$.

b. The distribution of $X$.

my attempt:

a. If $Y=n$ then $X$ is a binomial distribution, $X \sim bin(n-1, 0.5)$

hence $P(X=k | Y=n) = \binom{n-1}{k-1} \frac{1}{2}^{k-1} \frac{1}{2}^{n-k}$.

b. $P(X=k) = \sum_{n=1}^{\infty}P(X=k | Y=n)P(Y=n)$

where $P(Y=n) = (\frac{5}{6}^{n-1})(\frac{1}{6})$

corrections please?

2 Answers 2

2

The conditional distribution of $X-1$ given $Y=n$ is $\text{Binomial}(n-1, 0.4)$

This is because the last throw is even ($6$), and the even outcomes in the rest of the throws are only $2$ and $4$ out of $1,2,3,4,5$ (as $6$ does not appear in these throws).

So $$P(X-1=m|Y=n)={n-1\choose m}0.4^m\cdot 0.6^{n-1-m}\text{ for }m=0,1,\ldots n-1$$ and by letting $k=m+1$: $$P(X=k|Y=n)={n-1\choose k-1}0.4^{k-1}\cdot 0.6^{n-k}\text{ for }k=1,2\ldots n$$

Now $Y\sim\text{Geometric}(1/6)$, so $P(Y=n)=\left(\frac{5}{6}\right)^{n-1}\frac{1}{6}$.

Also, in order to obtain $k$ even numbers you need at least $k$ throws ($Y\ge k)$. So after some algebraic manipulations:

$$P(X=k)=\sum_{n=k}^\infty P(X=k|Y=n)P(Y=n)=\left(\frac{2}{3}\right)^{k-1}\frac{1}{3}$$

So $X$ is a Geometric random variable with parameter $\frac{1}{3}$

Which makes sense, since the distribution of $X$ can be recast as coming from rolling a "virtual" die with only three faces ($2,3$ and $6$), until face $6$ appears (the throws which do not result in an even number being discarded).

With this observation, the distribution of $X$ can be calculated in a simpler way, without conditioning.

2

Your first part is not correct because the die is thrown until the first instance of $6$ is observed. This means that the number of even-numbered rolls observed before the first six can only be drawn from the set $\{2, 4\}$ out of $\{1, 2, 3, 4, 5\}$, and not $\{2, 4, 6\}$.

If $Y$ counts the total number of rolls needed to obtain the first $6$--that is to say, $Y$ counts the last roll of $6$--then $X$ will also need to count this final roll among the number of even-numbered of rolls. Therefore, our model is $$X - 1 \mid Y = y \sim \operatorname{Binomial}(n = y - 1, p = 2/5), \\ \Pr[X = x \mid Y = y] = \binom{y-1}{x-1} p^{x-1} (1-p)^{y-x}, \quad x = 1, 2, \ldots, y,$$ and $$Y \sim \operatorname{Geometric}(\theta = 1/6), \quad \Pr[Y = y] = (1-\theta)^{y-1} \theta, \quad y = 1, 2, \ldots.$$ Note the subtle differences in the specification of the conditional binomial distribution: the support of $X$ is on $\{1, 2, \ldots, y\}$, because if you rolled the die $Y = y$ times and the last roll was a $6$, then you could get as few as $1$ even number (i.e. none but the last) or as many as $y$ even numbers (all including the last).

With this in mind, we would obtain the unconditional distribution of $X$ by summing over the distribution of $Y$ via the law of total probability: $$\Pr[X = x] = \sum_{y=1}^\infty \Pr[X = x \mid Y = y] \Pr[Y = y].$$ I leave this as an exercise for the reader.