Probability of One Geometric Random Variable when Sum of Two is given

probabilitystatistics

This problem comes directly from MIT OCW 6.041 assignment #4, question #3. The solution is given. I think the solution is wrong. The question is as follows:

Suppose that X and Y are independent, identically distributed, geometric random variables with parameter p. Show that

$P(X=i|X+Y=n)=\frac{1}{n-1}$, for $i$=1,2,…,$n$−1.

The solution given makes use of the fact that $X$ and $Y$ are independent, specifically the solution writes [Call this equation A]

$P(X=i∩X+Y=n)=P(X=i∩Y=n−i)=P(X=i)P(Y=n−i).$

This seems incorrect to me because if n and i are given, then $Y$ is completely dependent on those two values. $Y$ has been implicitly specified. So the distributions are not independent. Further, the supposed solution to the problem is that all the $X=i$ are equally likely if we specify the sum of $X$ and $Y$, whereas prior to that sum $X$ follows a geometric distribution. That sure seems like dependence to me. Just using the law of multiplication the solution should have
$$
P(X=i∩X+Y=n)=P(X=i∩Y=n−i)=P(X=i)P(Y=n−i | X=i).
$$

$X$ is specified, one can't just throw away that dependence. In other words, the quantity $n-i$ is not independent of $X$, so $Y$ cannot be independent of $X$ either, given the conditioning.

Here is my alternative solution. I'm going to use Bayes' Rule:

$$
P(X=i|X+Y=n)= \frac{P(X+Y=n|X=i) P(X=i)}{\sum_{j=1}^{n-1} P(X+Y=n|X=j) P(X=j)}.
$$

The key, I think, is to recognize that $P(X+Y=n|X=j) = P(Y=n-j)$. This is to say, that if $X$ is given to be $j$, then the distribution of $X+Y$ is just the distribution of $Y$. This makes sense to me because I am adding a geometric random variable, $Y$, to a constant $j$, so the distribution will also be a geometric random variable. So, the conditional probability comes out of the sum and cancels, leaving

$$
P(X=i|X+Y=n)= \frac{P(X=i)}{\sum_{j=1}^{n-1} P(X=j)} = \frac{p(1-p)^{i-1}}{1-(1-p)^{n-1}},\; \mathrm{for} \; i=1,2,…,n−1.
$$

All the conditional probabilities sum to 1, they are all non-negative, they are exclusive, and they are exhaustive. This looks like a valid probability distribution to me.

Even the content of that final equation looks correct to me. $X+Y=n$ is given, and we want to know what the probability of seeing any particular $X=i$ value is. We know that $X$ is now limited to the interval $[1,n-1]$, because it is a geometric variable ($X \ge 1$) and we know that it is added to another geometric variable to get $n$, so $X \le n-1$. So all I have to do is re-weight the probabilities I had before conditioning such that the now-allowed values sum to 1 and I should be done.

My question is: why is equation A used in the solution when every time I look at it, it appears wrong and I have a perfectly sensible solution that appears better in every way? What am I missing about equation A?

Edit:
I'm going to answer the opposite of my question. The mistake I made was pulling $P(X+Y=n|X=j) = P(Y=n-j)$ out of the sum in the denominator. The identity is correct, but that probability literally depends on $j$ and I can't pull it out of the sum. That was silly. Plugging in the probabilities for the geometric variables I get the same answer as the answer key.

Furthermore, the identity I argue is true actually proves the identity I thought was untrue. If I multiply both sides of my identity by $P(X=i)$ and use the multiplication rule to combine the conditional and marginal probabilities, I find $P(X=j∩X+Y=n) = P(Y=n-j)P(X=i)$, which I spent so many hours thinking was wrong.

It appears I made a mathematical error that led me to a specious answer which got me to believing a prior logical error. What a ride.

Best Answer

This seems incorrect to me because if n and i are given, then Y is completely dependent on those two values. Y has been implicitly specified.

No, the value for $Y$ in the event has been specified. We do not yet know that that event has occurred; we still seek the probability for that.

$$\{\omega\in\Omega: X(\omega)=\imath, (X+Y)(\omega)=n\}=\{\omega\in\Omega: X(\omega)=\imath, Y(\omega)=n-\imath\}$$

In short, the event $X=\imath, X+Y=n$ and the event $X=\imath, Y=n-\imath$ are identical.


Next, $X$ and $Y$ are independent random variables, so $\mathsf P(X=x,Y=y)=\mathsf P(X=x)\mathsf P(Y=y)$ for all values of $x$ and $y$, including constants: $\imath$ and $n-\imath$.

$$\mathsf P(X=\imath, Y=n-\imath)=\mathsf P(X=i)\,\mathsf P(Y=n-\imath)$$


Now we can seek the conditional probability using the above:

$$\begin{align}\mathsf P(X=\imath\mid X+Y=n)&=\dfrac{\mathsf P(X=\imath, X+Y=n)}{\mathsf P(X+Y=n)}&&\text{by definition}\\[1ex]&=\dfrac{\mathsf P(X=\imath, Y=n-\imath)}{\mathsf P(X+Y=n)}&&\text{by identicallity of the events}\\[1ex]&=\dfrac{\mathsf P(X=\imath)\,\mathsf P(Y=n-\imath)}{\mathsf P(X+Y=n)}&&\text{by independence of }X, Y\end{align}$$