# Conditional distribution of successes in first m independent Bernoulli trials given the total number of successes

This is my attempt:

I have, so far, let

$$Y_{mi} = \begin{cases} 1\ & \text {if }i^\text{th } \text{trial in first }m\text{ trials}\\ 0&\text{otherwise} \end{cases}$$

Indeed, $$Y_m = \sum_{i=1}^mY_{mi}$$

I think this is what I need to calculate:

$$P(Y_{mi} =1 | X=x) = \frac{P(Y_{mi} =1, X=x)}{P(X=x)}$$

I am struggling to go from here and any help would be appreciated!

• Can you try to write $X$ as a function of $Y_m$ and another random variable? And can you tell what the marginal distribution of $Y_m$ is? Oct 24, 2015 at 19:44
• If this was too obscure a hint, can you try to write $X$ using the $Y_{mi}$'s you used to define $Y_m$, plus additional and independent Bernoulli variates? Oct 25, 2015 at 8:42

Let $Z_{n-m}$ be the number of successes in the remaining $n-m$ trials
$P(Y_m=y|X=x) = ...$ (you fill in this bit) $... = \frac{P(Y_m=y)P(Z_{n-m}=x-y)}{P(X=x)} =...$