Combining Bernoulli distributions

b_d

New Member
#1
Combining Bernoulli distributions [Solved]

I'm looking for a way to find the standard deviation of a certain distribution. This distribution is created by performing n_0 Bernoulli trials with probability p_0. The number of successes is recorded as n_1. n_1 Bernoulli trials are then performed with p_1 probability of success. Essentially, I'm flipping n_0 coins, and then flipping again all the ones that land on heads.

When I compute this by hand with Excel, it ends up matching exactly a Bernoulli distribution with n_0 trials and p_0 * p_1 probability, which is very convenient because the variance is then n_0*p_0*p_1 * (1 - p_0*p_1). I also made a simulation, which appears to match well. But I have no proof, and I get stuck trying to prove it myself.

Has someone already done this? If not, could anyone help me?

Finally, at some point I'm going to need to do the same thing, but the probabilities are normally distributed. Is it possible to hand-calculate in this situation?
 
Last edited:

b_d

New Member
#2
I answered my own question! Turns out I was thinking about that way to abstractly. Flipping a bunch of coins, then flipping a number equal to the number of coins that landed on heads is the exact same thing as flipping a bunch of coins twice and counting all the coins that came up heads twice. So it boils down to one Bernoulli trial, with probability p_0 * p_1. A bunch of these makes the binomial distribution B(n_0, p_1 * p_2). And this can be expanded to more recursions.
 
Last edited:

Dason

Ambassador to the humans
#3
Maybe I'm misunderstanding your process but I don't see those two procedures as equivalent. For instance lets say you flip two coins, one of them comes up heads. Then you flip that coin again and it's tails. There was only one head in total - but if we used your second procedure we would have ended up with two heads.

Am I misunderstanding you?
 

b_d

New Member
#4
Maybe I'm misunderstanding your process but I don't see those two procedures as equivalent. For instance lets say you flip two coins, one of them comes up heads. Then you flip that coin again and it's tails. There was only one head in total - but if we used your second procedure we would have ended up with two heads.

Am I misunderstanding you?
What I meant was look at each individual coin, and see if it comes up heads twice. In your example, one coin came up tails and was discarded. The other came up heads, so we flipped it again, but it came up tails and was also discarded. If a coin had come up heads, and when flipped again also came up as heads, we would count it as a success.
 

Dason

Ambassador to the humans
#5
Oh - so you're only counting coins that came up heads for both tosses? I thought you were counting the total number of heads.

Then yes it's just a binomial(n0, p0*p1) experiment since the probability that any given coin is heads for both tosses is p0*p1.