Showing that $P(X=k \mid X+Y=n)=\frac{1}{n+1}$

262 Views Asked by At

I have seen this question.

However, mine is slightly different.

Let $p,q\in (0,1), p+q=1$. Assume that random variables $X$ and $Y$ are independent and both have the geometric distribution with parameters $p,q$, i.e.,

$$P(X=k)=P(Y=k)=q^kp\,,$$

where $k\in\mathbb{N}_0=\{0,1,2,...\}$.

I would like to show that

$$P(X=k\mid X+Y=n)=\frac{1}{n+1}$$

The questions I have seen here seem to arrive to the conclusion that it's equal to $\frac{1}{n-1}$. How do I arrive to $\frac{1}{n+1}$?

3

There are 3 best solutions below

0
On BEST ANSWER

We have: $$P(X=k\mid X+Y=n)=\frac{P((X=k) \cap (X+Y=n))}{P(X+Y=n)}$$ Now: $$\begin{align} P((X=k) \cap (X+Y=n))~&=~P((X=k) \cap (Y=n-k))\\&=P(X=k)\, P(Y=n-k)\\&=q^k p\;q^{n-k}p\\&=q^n p^2\end{align} $$ whereas $$\begin{align} P(X+Y=n)&=\sum_{i=0}^n P((X=i) \cap (Y=n-i))\\&=\sum_{i=0}^n P(X=i) \, P(Y=n-i)\\&=\sum_{i=0}^n q^i p\, q^{n-i} p\\&=\sum_{i=0}^n q^n p^2\\&= (n+1)\,q^n p^2 \end{align}$$ and you only have to divide to get the result.

1
On

The question you linked is doing the same as you, but the OP is considering an alternative definition for the Geometric distribution (i.e., $k$ is starting at $1$ and not at $0$ as you defined). Hence, following the same procedure you will get the result you want.

This is not unique to this calculus: the expected value also depends on the definition you are considering (although the variance no). Check the properties at https://en.wikipedia.org/wiki/Geometric_distribution.

0
On

By convolution, \begin{align*} P(X+Y=n)=\sum_{k=0}^n P(X=k)P(Y=n-k) \\ =\sum_{k=0}^n (q^kp)(q^{n-k}p) \\ =\sum_{k=0}^n q^np^2 \\ =q^np^2(n+1) \end{align*}

Thus, \begin{align*} P(X=k|X+Y=n)=\frac{P(X=k)P(Y=n-k)}{P(X+Y=n)} \\ =\frac{q^np^2}{q^np^2(n+1)}=\frac{1}{n+1} \end{align*}

Your confusion may be stemming from there being two widely used definitions for the Geometric PMF (see the Wikipedia for more info).