Suppose that X and Y are independent random variables with the same parameter p.

What is the value of

$\displaystyle P[X=i|X+Y=n]$

Want to make sure my solution is correct

$\displaystyle P[X=i|X+Y=n]=\frac{P[X=i]P[Y=n-i]}{P[X+Y=n]}$

$\displaystyle =\frac{(1-p)^{i-1}p(1-p)^{n-i-1}p}{(1-p)^{n-1}p}$

$\displaystyle =p(1-p)$

Correct?