The Bernoulli Trial and Bernoulli Distribution
What you'll learn: You'll discover the simplest building block of probability—an experiment with just two outcomes—and how to model it mathematically.
The Bernoulli Trial
A Bernoulli trial is any experiment or random process that has exactly two possible outcomes. We conventionally label these outcomes as:
- Success (often coded as 1)
- Failure (often coded as 0)
The names "success" and "failure" are just labels—they don't imply anything good or bad. For example, if you're modeling whether it rains tomorrow, "success" might mean "it rains" and "failure" means "it doesn't rain."
The key feature: each Bernoulli trial has a fixed probability p of success and probability 1 - p of failure.
Examples of Bernoulli Trials
- Flipping a coin (heads/tails)
- Testing whether a manufactured part is defective (yes/no)
- Checking if a patient responds to treatment (responds/doesn't respond)
- Whether a customer makes a purchase (buys/doesn't buy)
The Bernoulli Random Variable
The Bernoulli distribution describes a random variable X that takes value 1 with probability p and value 0 with probability 1 - p.
The PMF is:
- P(X = 1) = p
- P(X = 0) = 1 - p
We write X ~ Bernoulli(p) to indicate that X follows a Bernoulli distribution with parameter p.
Expectation and Variance
- E[X] = p (the probability of success)
- Var(X) = p(1 - p)
Key Takeaway: A Bernoulli trial is the fundamental building block of probability—any experiment with two outcomes—modeled by a Bernoulli random variable that equals 1 (success) or 0 (failure) with fixed probabilities.