Probability Distributions: Bernoulli & Binomial


Probability Distributions: Bernoulli & Binomial

Simon
So today we're getting into two of the most useful random variables in all of probability: the Bernoulli and the binomial. And we'll see how they lead to the normal and Poisson distributions.

Anna
Right, the Bernoulli is the simplest possible random variable — it only takes two values, 0 or 1. You define what counts as a success, like flipping heads or rolling a six, and call that 1, and failure is 0.

Simon
Exactly. And importantly, the probabilities don't have to be equal. For a fair coin, p equals 0.5, but for rolling a six, p is 1/6. We usually call the success probability p and the failure probability q equals 1 minus p.

Anna
And a single Bernoulli trial is just that one experiment. But if you repeat independent Bernoulli trials and add up the number of successes, you get a binomial random variable. So flipping a coin 10 times and counting heads is binomial.

Simon
Right, it's the sum of n independent Bernoulli variables. And it's characterized by two parameters: the number of trials n and the probability of success p. We write X ~ Binomial(n, p).

Anna
And there's a clean formula for the probability of getting exactly k successes. It's n choose k times p to the k times q to the n minus k. That counts the number of ways to get k successes in n trials, each with probability p^k q^(n-k).

Simon
Let's test it on a small case. For n equals 2, the probability of zero successes is just q squared, because both trials have to be failures. For one success, there are two orders: success then failure, or failure then success, so 2pq. And for two successes, p squared.

Anna
Those coefficients 1, 2, 1 come from Pascal's triangle. For n equals 3, you'd get 1, 3, 3, 1. The formula gives exactly that: 3 choose 1 times p q squared, and so on.

Simon
And it's a good check that all probabilities sum to one. For n=2, q^2 + 2pq + p^2 = (p+q)^2 = 1. That generalizes to (p+q)^n = 1, which is a neat connection to the binomial theorem.

Anna
Let's do a concrete example. What's the probability of getting exactly three sixes when you roll a fair die 12 times?

Simon
Here a success is rolling a six, so p = 1/6. Then X ~ Binomial(12, 1/6). The probability that X = 3 is 12 choose 3 times (1/6)^3 times (5/6)^9. You can plug that into a calculator and get a number.

Anna
That formula is so much simpler than enumerating all the possibilities. And you mentioned that for large n, the binomial distribution looks like a normal distribution.

Simon
Yes, if n is large and p is not too extreme — so np and nq are both large — the binomial is approximately normal with mean np and standard deviation sqrt(npq). That makes calculations even easier.

Anna
But if p is very small or very large, so that np or nq is small, then the binomial is approximated by a Poisson distribution with parameter lambda = np. That's for rare events.

Simon
Exactly. So the Bernoulli and binomial are the foundations. They model everything from coin flips and dice rolls to defective parts and even image masks. And they connect directly to the normal and Poisson, which are everywhere in statistics.

Anna
Next time we'll dive into those limit distributions. But for now, we've got the core ideas: Bernoulli for a single trial, binomial for the sum of trials, and the powerful formulas that come with them.

Ask anything
We've read this whole study set, so questions about it get the best answers.