# Two Questions About the Binomial Distribution

I have two questions about using the binomial distribution to derive the probability of k successes in n independent experiments, where each experiment has probability p of success and probability (1-p) of failure. My first question is: suppose the probability of success and failure differ between experiments. For instance, suppose that instead of flipping ten fair coins, one is flipping five coins biased towards heads and five coins biased towards tails. Suppose one wants to find out the probability of getting k heads in this case. Can one use the binomial distribution to approximate this? In particular, suppose one just average the probabilities of success (e.g. heads), then use the binomial distribution to work out the probability of getting k successes as if all the experiments had that average probability of success. How well will the resultant sum approximate the probability you are after?

My second question is bipartite. Here's the set-up. Suppose one does not know what the probability of success for the experiments are. Instead, one has a probability (or credence) distribution over such probabilities. So, maybe one is 0.5 confident that the probability of success is e.g. 0.5, but also 0.2 confident that it is 0.6 and 0.2 confident that it is 0.4, and so on. Now suppose you want to calculate the probability of there being k successes in n experiments. Here comes the two parts of the question. The first part is: how do you do this? How do you calculate the probability of k success in this case? The second part is: what sort of distributions over probabilities will approximate just taking one's best guess at the probability of the probability of each experiment being successful, and then using the binomial distribution to find the probability of k successes as if that best guess the true probability? I'm thinking of the best guess as the mean value of one's credence distribution.

Thanks! For those who are interested, I care about this because of how it relates to voting. In deciding whether it's rational to vote, one important question is how likely your vote is to be decisive. If there are an odd number of voters, one's vote is decisive just in case exactly (1/n-1) voters vote for your preferred candidate. You can treat each voter as an independent experiment with some probability of voting for one of two candidates. These questions shed light on how much you can use the binomial distribution to shed light on the probability of one's vote being decisive

To your first question, averaging the different values for $p$ is not always going to work. As an example, if one coin has $p_{Heads} = 1$ and the other coin has $p_{Heads} =0$ then in this case $p_{avg} = 0.5$.
Now let's think about 2 coin flips, and let's say we are interested in the probability of getting 2 heads (HH). In the case above when you are using $p_{avg}$, you will never get HH, so in this case $P(HH) = 0$. Compare this to the result of flipping one fair coin twice (or 2 fair coins once each), and $P(HH) = 0.25$. Even though both calculations use $p=0.5$, the calculated probabilities don't line up with the actual probabilites. There may be cases where using $p_{avg}$ makes sense, but it's not always a good assumption to make.
In your example, if you are flipping 5 coins with one bias (call this $p_1$) and 5 coins with another bias $p_2$, and you want to know the probability of getting $k$ heads out of 10 flips. If $A$ is the event where you get $k$ heads in 10 flips, then to find $P(A)$ you need to find all the different possible outcomes that give you $k$ heads out of the total number of possible outcomes $(2^{10})$. It's the same process as if you flip a fair coin 3 times and want to calculate the probability of getting 2 heads in 3 flips.