I have $X_i \space (i=1,\cdots ,n)$ which has Bernoulli($p_i$), where $p_i$s are different.
(independent non-identical Bernoulli trials).
I am having trouble finding the conditional probability of $X_i$ given $S_n = X_1 + \cdots + X_n = K$
($K < n$).
Is there any exact solution or approximation for $ P(X_i=1 | X_1 + \cdots + X_n = K )$ ?
I found that there is the exact solution when $p_i$s are the same (for independent identical Bernoulli trials).
Applying Bayes rule and writing $q_i=1-p_i$ it can be deduced that:$$P\left(X_{i}=1\mid S_{n}=k\right)=\frac{p_{i}P\left(S_{n}-X_{i}=k-1\right)}{p_{i}P\left(S_{n}-X_{i}=k-1\right)+q_{i}P\left(S_{n}-X_{i}=k\right)}$$