Discrete Random Variables
A discrete random variable assigns countable numerical values to the outcomes of a random experiment. Understanding how to describe, measure, and model discrete random variables is fundamental to probability theory and statistics.
This guide covers key definitions, probability distribution tables, the binomial distribution, expected value, variance, standard deviation, worked examples, memory aids, and a practice quiz.
1Introduction
In statistics, we often deal with experiments or phenomena whose outcomes are uncertain. A random variable is a way to assign numerical values to these outcomes, making them amenable to mathematical analysis.
A discrete random variable is a specific type of random variable where the possible outcomes are countable. Think of it as values you can list, like the number of heads in coin flips, the number of defective items in a sample, or the score on a die roll. Understanding discrete random variables is fundamental for probability theory and many real-world applications, from quality control to game theory.
Imagine tossing three coins. You cannot predict the exact outcome, but you can count the number of heads: 0, 1, 2, or 3. Each count has a specific probability. A discrete random variable captures exactly this idea -- assigning a countable number to every possible outcome of a random experiment.
Why It Matters
Quality Control
Counting the number of defective items in a production batch to maintain standards.
Finance & Insurance
Modeling the number of insurance claims, stock price movements, or loan defaults.
Genetics
Predicting the number of offspring with a certain trait based on inheritance probabilities.
Game Theory
Analyzing expected outcomes and strategies in games of chance and decision-making.
2Key Definitions
Random Variable (RV)
A variable whose value is a numerical outcome of a random phenomenon. Typically denoted by a capital letter (e.g., X, Y). Example: Let X be the number of heads in two coin tosses.
Discrete Random Variable
A random variable that can take on a finite or countably infinite number of values. These values are typically integers or can be listed (e.g., number of cars, children, die score).
Continuous Random Variable
A random variable that can take on any value within a given range or interval. Values are typically measurements (e.g., height, time, temperature).
Probability Distribution
A description of the possible values a random variable can take and the probability associated with each value. Often represented as a table, graph, or formula.
Probability Mass Function (PMF)
For a discrete RV X, the PMF P(X = x) gives the probability that X takes on a specific value x. Properties: 0 ≤ P(X = x) ≤ 1 for all x, and Σ P(X = x) = 1.
Cumulative Distribution Function (CDF)
F(x) = P(X ≤ x) gives the probability that X takes a value less than or equal to x. Calculated by summing all PMF values up to and including x.
Expected Value E(X)
The long-run average value of a random variable if the experiment were repeated many times. A measure of central tendency.
Variance Var(X)
A measure of the spread or dispersion of possible values around the expected value. Higher variance means more spread.
Standard Deviation SD(X)
The square root of the variance. Measures spread in the same units as the random variable, making it more interpretable.
3Probability Distribution Tables
A probability distribution table lists all possible values a discrete random variable X can take, along with their corresponding probabilities P(X = x).
Properties of a Valid Probability Distribution
- Each probability P(X = xᵢ) must be between 0 and 1 (inclusive).
- The sum of all probabilities must equal 1: Σ P(X = xᵢ) = 1.
Example: Number of Heads in 3 Coin Flips
Let X = number of heads. Possible outcomes: TTT, TTH, THT, HTT, THH, HTH, HHT, HHH
| X = x | 0 (TTT) | 1 (TTH, THT, HTT) | 2 (THH, HTH, HHT) | 3 (HHH) |
|---|---|---|---|---|
| P(X = x) | 1/8 | 3/8 | 3/8 | 1/8 |
Check: 1/8 + 3/8 + 3/8 + 1/8 = 8/8 = 1. All probabilities are between 0 and 1. This is a valid distribution.
A probability distribution table is like a complete recipe for a random variable. Once you have it, you can calculate the expected value, variance, and any probability you need. Always verify that all probabilities sum to 1 before using the table.
4Binomial Distribution
The Binomial Distribution is a specific type of discrete probability distribution that models the number of successes in a fixed number of independent trials, where each trial has only two possible outcomes (success or failure).
Conditions for a Binomial Distribution (BINS)
- Binary outcomes: Each trial has only two possible outcomes (success/failure).
- Independent trials: The outcome of one trial does not affect the outcome of another.
- Number of trials is fixed: The experiment consists of a fixed number, n, of trials.
- Same probability of success: The probability of success, p, is the same for each trial.
If X follows a Binomial Distribution, we write X ~ B(n, p), where n = number of trials, p = probability of success on a single trial, and 1 - p (often denoted q) = probability of failure.
Binomial PMF Formula
P(X = k) = C(n, k) · pᵏ · (1 - p)ⁿ⁻ᵏ
where C(n, k) = n! / [k!(n - k)!] is the binomial coefficient (number of ways to choose k successes from n trials).
Binomial Summary Formulas
Expected Value
E(X) = np
The average number of successes you expect over n trials.
Variance
Var(X) = np(1 - p)
Measures the spread of the number of successes around the mean.
Standard Deviation
SD(X) = √[np(1 - p)]
The spread in the same units as the random variable.
The shape of a binomial distribution depends on p. When p = 0.5, the distribution is symmetrical. When p < 0.5, it is skewed right (tail to the right). When p > 0.5, it is skewed left (tail to the left). As n increases, the distribution becomes more bell-shaped regardless of p.
5Expected Value E(X)
The expected value, or mean, of a discrete random variable X is the weighted average of all possible values, where the weights are their respective probabilities. It represents the long-run average outcome if the experiment were repeated many times.
E(X) = Σ x · P(X = x)
Sum over all possible values of x, each weighted by its probability.
Properties of Expected Value
- E(c) = c -- the expected value of a constant is the constant itself.
- E(aX) = aE(X) -- where a is a constant.
- E(X + Y) = E(X) + E(Y) -- the expected value of a sum is the sum of expected values.
- E(aX + b) = aE(X) + b -- combining the linear rules.
Think of the expected value as the "balancing point" or center of gravity of the probability distribution. If you built a physical histogram out of blocks, E(X) is where you'd place a fulcrum to perfectly balance it.
6Variance Var(X)
The variance measures how much the values of a random variable deviate from its expected value. It is the expected value of the squared difference between the random variable and its mean.
Definition Formula
Var(X) = Σ (x - E(X))² · P(X = x)
The average squared deviation from the mean, weighted by probability.
Computational Formula (Often Easier)
Var(X) = E(X²) - [E(X)]²
where E(X²) = Σ x² · P(X = x). "Mean of the squares minus the square of the mean."
Properties of Variance
- Var(c) = 0 -- the variance of a constant is zero (no spread).
- Var(aX) = a² Var(X) -- scaling by a constant squares the scaling factor.
- Var(X + c) = Var(X) -- adding a constant doesn't change the spread.
- For independent X and Y: Var(X + Y) = Var(X) + Var(Y).
7Standard Deviation SD(X)
The standard deviation is the square root of the variance. It provides a measure of spread in the same units as the random variable, making it more intuitive to interpret than variance.
SD(X) = √Var(X)
The square root of the variance gives spread in the same units as X.
A larger standard deviation means the probabilities are spread out over a wider range of values, resulting in a flatter, wider histogram. A smaller standard deviation means the probabilities are concentrated around the mean, resulting in a taller, narrower histogram.
8Worked Examples
Example 1: Simple Discrete Random Variable (Die Roll)
A fair six-sided die is rolled. Let X be the number shown on the die.
Step 1: Create the Probability Distribution Table
| X = x | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|
| P(X = x) | 1/6 | 1/6 | 1/6 | 1/6 | 1/6 | 1/6 |
Step 2: Calculate Expected Value E(X)
E(X) = Σ x · P(X = x)
= (1 · 1/6) + (2 · 1/6) + (3 · 1/6) + (4 · 1/6) + (5 · 1/6) + (6 · 1/6)
= (1/6)(1 + 2 + 3 + 4 + 5 + 6) = 21/6
E(X) = 3.5
Step 3: Calculate Variance (Computational Formula)
E(X²) = (1² · 1/6) + (2² · 1/6) + (3² · 1/6) + (4² · 1/6) + (5² · 1/6) + (6² · 1/6)
= (1/6)(1 + 4 + 9 + 16 + 25 + 36) = 91/6 ≈ 15.1667
Var(X) = E(X²) - [E(X)]² = 91/6 - (3.5)² = 15.1667 - 12.25
Var(X) ≈ 2.9167 (or 35/12)
Step 4: Calculate Standard Deviation SD(X)
SD(X) = √Var(X) = √2.9167
SD(X) ≈ 1.7078
Example 2: Binomial Distribution
A multiple-choice quiz has 10 questions, each with 4 possible answers, only one correct. A student guesses randomly on all questions. Let X be the number of correct answers.
Step 1: Identify n and p
n = 10 (10 questions), p = 1/4 = 0.25
X ~ B(10, 0.25)
Step 2: P(exactly 3 correct)
P(X = 3) = C(10, 3) · (0.25)³ · (0.75)⁷
= [10! / (3! · 7!)] · 0.015625 · 0.13348
= 120 · 0.015625 · 0.13348
P(X = 3) ≈ 0.2503 (about 25%)
Step 3: Expected Value
E(X) = np = 10 · 0.25
E(X) = 2.5 correct answers on average
Step 4: Variance and Standard Deviation
Var(X) = np(1 - p) = 10 · 0.25 · 0.75 = 1.875
SD(X) = √1.875 ≈ 1.369
9Key Formulas
| Concept | Formula | Notes |
|---|---|---|
| PMF | P(X = x) | Must sum to 1 over all x |
| CDF | F(x) = P(X ≤ x) = Σ P(X = t) for t ≤ x | Probability X is at most x |
| E(X) General | Σ x · P(X = x) | Weighted average of all values |
| Var(X) Definition | Σ (x - E(X))² · P(X = x) | Avg squared deviation from mean |
| Var(X) Computational | E(X²) - [E(X)]² | Often easier to calculate |
| SD(X) | √Var(X) | Same units as X |
| Binomial PMF | C(n,k) · pᵏ · (1-p)ⁿ⁻ᵏ | k successes in n trials |
| Binomial E(X) | np | Specific to binomial only |
| Binomial Var(X) | np(1 - p) | Specific to binomial only |
| Binomial SD(X) | √[np(1 - p)] | Specific to binomial only |
10Memory Aids
"Discrete: Data you can Count"
Discrete starts with D, just like Data. You can count discrete values (number of items, people, events). Continuous starts with C, just like Can't count -- you measure continuous values (height, time, temperature).
"BINS for Binomial"
Binary outcomes, Independent trials, Number of trials fixed, Same probability of success. If you can check all four BINS, it is a Binomial distribution.
"Mean of the Squares minus the Square of the Mean"
This phrase helps you remember the computational formula for variance: Var(X) = E(X²) - [E(X)]². First calculate E(X²), then subtract the square of E(X).
"Expected Value = Your Average Grade"
Think of expected value as what you "expect" to happen on average, like your average grade over many tests or your average winnings over many rounds of a game. It does not have to be a value that X can actually take -- just like a 3.5 average on a die.
11Common Mistakes
Confusing Discrete and Continuous Random Variables
Misidentifying the type of variable can lead to using incorrect formulas. Remember: discrete values can be counted (number of items), continuous values are measured (height, time).
Forgetting Σ P(X = x) = 1
Always check that the probabilities in your distribution table sum to 1. If they do not, there is an error in your distribution.
Using Binomial Formulas for Non-Binomial Distributions
E(X) = np and Var(X) = np(1 - p) are only valid for binomial distributions. For other discrete random variables, you must use the general formulas with summation.
Not Squaring Deviations for Variance
Forgetting to square the deviations (x - E(X)) when calculating variance, or forgetting to square the constant 'a' when computing Var(aX) = a² Var(X).
Presenting Variance as Standard Deviation
Calculating variance but presenting it as standard deviation. Remember SD(X) = √Var(X) -- you must take the square root.
Misidentifying n and p for Binomial
Ensure n is the total number of trials and p is the probability of success for a single trial. Swapping them or miscounting trials is a common source of errors.
Calculator Errors with Factorials
Especially with complex calculations involving many terms or binomial coefficients C(n, k). Double-check your input and use the nCr function on your calculator.
Quick Revision Summary
- ✓A discrete random variable assigns countable numerical values to outcomes of a random experiment.
- ✓The PMF gives P(X = x) for each value; all probabilities must sum to 1.
- ✓The ΔCDF F(x) = P(X ≤ x) gives the cumulative probability up to and including x.
- ✓Expected Value E(X) = Σ x · P(X = x) is the long-run average outcome.
- ✓Variance Var(X) = E(X²) - [E(X)]² measures the spread around the mean.
- ✓Standard Deviation SD(X) = √Var(X) gives spread in the same units as X.
- ✓The Binomial Distribution models the number of successes in n independent trials (check BINS conditions).
- ✓Binomial shortcuts: E(X) = np, Var(X) = np(1 - p), SD(X) = √[np(1 - p)].
- ✓Use general formulas for non-binomial distributions; use binomial shortcuts only when BINS conditions are met.
- ✓Always verify that your probability distribution is valid (all probabilities sum to 1, each between 0 and 1).
Frequently Asked Questions
- Why do we care about E(X) and Var(X)?
- E(X) tells you the center or typical outcome of a random process. Var(X) (and SD(X)) tells you how much variability or risk is involved. For example, two investments might have the same expected return, but one might have a much higher variance, indicating higher risk.
- What is the difference between PMF and CDF?
- PMF gives the probability of exactly one value (P(X = x)). CDF gives the probability of being less than or equal to a value (P(X ≤ x)). You can derive one from the other.
- Can a discrete random variable have an infinite number of values?
- Yes, as long as they are countable. For example, the number of coin flips until the first head appears (1, 2, 3, ...). This is called a Geometric distribution.
- How do I know if a problem involves a Binomial distribution?
- Check the BINS conditions: Binary outcomes, Independent trials, Fixed Number of trials, Same probability of success. If all four apply, it is likely Binomial.
- What are some real-world applications of discrete random variables?
- Quality control (number of defects), genetics (number of offspring with a certain trait), sports (number of goals scored), finance (number of stock price increases), and marketing (number of customers responding to an ad).
Practice Quiz
Test your knowledge — select the correct answer for each question.
1.Which of the following is a discrete random variable?
2.For a valid probability distribution, which must be true?
3.Given P(X=0) = 0.2, P(X=1) = 0.5, P(X=2) = 0.3, what is E(X)?
4.Using the distribution P(X=0) = 0.2, P(X=1) = 0.5, P(X=2) = 0.3, what is P(X <= 1)?
5.A random variable X has E(X) = 3 and Var(X) = 4. What is SD(X)?
6.Which scenario is best modeled by a Binomial distribution?
7.For a Binomial distribution X ~ B(n, p), the expected value formula is:
8.If X ~ B(5, 0.4), what is E(X)?
9.If X ~ B(5, 0.4), what is Var(X)?
10.The computational formula Var(X) = E(X²) - [E(X)]² is useful because:
Final Study Advice
- 1.Always verify your probability distribution sums to 1 before calculating E(X) or Var(X).
- 2.Before using binomial formulas, check all four BINS conditions to confirm the distribution is actually binomial.
- 3.Use the computational formula for variance (E(X²) - [E(X)]²) to save time and reduce arithmetic errors.
- 4.Practice interpreting E(X) and SD(X) in context -- what does the expected value mean for the specific problem?
- 5.Sketch a probability histogram to visualize the distribution -- it helps you check your work and understand the shape.