Probability theory provides a framework for understanding randomness and uncertainty in a variety of real-world contexts. At the core of this framework lies the concept of random variables. In this article, we explore two fundamental types—Bernoulli and Binomial random variables—and dive into the essential concept of variance as a measure of spread for a random variable.
What is a Random Variable?
A random variable is a function that assigns a numerical value to each outcome in a sample space of a random experiment.
Types:
- Discrete: Takes on countable values (e.g., 0, 1, 2, …)
- Continuous: Takes on any value within a given range (e.g., weight, height, time)
Bernoulli Random Variable
The Bernoulli random variable is the simplest kind of discrete random variable. It takes only two possible values: 1 (for success) and 0 (for failure).
Definition:
P(X = 1) = p
P(X = 0) = 1 - p
X ~ Bernoulli(p)
Mean: E[X] = p
Variance: Var(X) = p(1 – p)
Binomial Random Variable
The Binomial random variable represents the number of successes in n independent Bernoulli trials.
Definition:
P(X = k) = C(n, k) * p^k * (1 - p)^(n - k)
Where:
n: number of trialsp: probability of success on each trialC(n, k): number of combinations
Mean: E[X] = np
Variance: Var(X) = np(1 – p)
Variance of a Random Variable
The variance of a random variable measures how much the values of the variable differ (spread out) from the expected value (mean).
Formula:
Var(X) = E[(X - μ)^2] = E[X^2] - (E[X])^2
Steps to Compute Variance (Discrete Case):
- Find
E[X] = Σ x * P(X = x) - Find
E[X²] = Σ x² * P(X = x) - Apply
Var(X) = E[X²] - (E[X])²
Applications and Examples
Flip a fair coin. X = 1 for heads, 0 for tails.
p = 0.5, E[X] = 0.5, Var(X) = 0.25
Flip a fair coin 5 times. X = number of heads.
n = 5, p = 0.5
E[X] = 2.5, Var(X) = 1.25
Real-Life Applications
- Quality control: Number of defective items in a batch
- Medical trials: Number of patients who respond to treatment
- Surveys: Estimating public opinion
- Elections: Probability of candidate winning
Conclusion

