Probability and StatisticsChapter 4
Discrete Random Variables
In this chapter
This chapter turns a random process into a number you can compute with: a discrete , its , and the two summary numbers, and , that describe it without listing every outcome. It closes with the single most common shape a discrete random variable takes in practice, the , and the for its own mean and standard deviation.
What a Random Variable Is
A random variable assigns a number to the outcome of a random process, before the outcome is known; it is discrete when its possible values can be counted and listed, with real gaps between them.
Ask two things: does it assign a number to an outcome not yet known? If so, it is a random variable. Then apply the same counting-versus-measuring test chapter 1 used for : can a value fall strictly between two consecutive possible values? If no, it is discrete.
A food truck owner tracks the number of food-allergy special orders in a randomly chosen lunch hour (hypothetical). The count can only be 0, 1, 2, 3, and so on, with nothing valid between 1 and 2, so it is a discrete random variable.
"Writing 'X = 3' and saying 'there's a 30% chance' are the same kind of statement." They are not: names a value the variable could take, while names how likely that value is — a random variable and its probability are different things. "A discrete random variable's values always have to be consecutive whole numbers starting at 0." Discreteness only requires listable values with real gaps between them; negative numbers, skipped values, or uneven spacing are still discrete.
Building a Valid Probability Distribution
A discrete random variable's probability mass function, or PMF (probability mass function), pairs every value it can take with the probability of that value.
A table is a valid PMF (probability mass function) only when both hold: every probability is between 0 and 1 inclusive, and all the probabilities sum to exactly 1. Passing only one rule is not enough.
The food truck owner drafts a table for 0, 1, 2, or 3 special orders per lunch hour: probabilities 0.35, 0.30, 0.25, 0.10. Each is between 0 and 1, and they sum to 1, so the table is a valid PMF (probability mass function).
"As long as every number is a legitimate probability, the table counts as valid." Not enough alone: a table of 0.35, 0.30, 0.25, 0.20 has four legal-looking numbers that sum to 1.10, claiming more than certainty across outcomes meant to cover every possibility. "A probability distribution has to spread probability equally across every value, or it isn't really random." Nothing requires equal probabilities; a distribution favoring one value heavily is exactly as valid as an even one, provided both rules above hold.
Expected Value: The Long-Run Average
The expected value, written , is a discrete random variable's long-run average outcome over many repetitions.
Multiply each possible value by its own probability, then add the products: . This describes where outcomes center over many repetitions, not what happens on any single trial.
For the food truck's table, computing from 0.35, 0.30, 0.25, 0.10 gives a long-run average that is not one of 0, 1, 2, or 3 — shown step by step below.
- List each value and its probability. From the table: with .
- Multiply each value by its probability. ; ; ; .
- Add the products. special orders.
Common slips: averaging the four values without weighting by probability at all; dividing the summed products by the number of outcomes (4), which double-counts weighting already done in step 2.
"The expected value is the value you'd most expect on any one trial — the most likely outcome." That quantity is the mode, and often disagrees with : here 0 is the single most likely count, at probability 0.35, yet . "Since it's an average, the expected value has to be one of the values the variable can take." It does not: an average of whole numbers is rarely a whole number itself, the same way a class's average sibling count can be 1.8 with no student actually having 1.8 siblings.
Standard Deviation: How Far Outcomes Stray
The standard deviation, written , measures how far a random variable's outcomes typically spread from its .
Square each value's distance from so distances above and below do not cancel, weight each by its probability, sum, then take the square root: .
For the food truck's table, ; weighting each squared distance from 1.10 by its probability and summing gives 0.99, so special orders.
"A standard deviation of 0 means the calculation went wrong, since a random variable is supposed to vary." It is not an error: correctly describes a random variable that always takes the same single value, with no variation at all. "Standard deviation and expected value are basically measuring the same thing." They answer different questions: asks where outcomes center; asks how far they typically wander from there, and two random variables can share one while differing sharply in the other.
The Binomial Distribution and When It Applies
A binomial random variable counts the number of successes across independent trials, each with the same two possible outcomes and the same probability of success ; written .
Check all three together: a fixed number of trials ; exactly two outcomes per trial, success (probability ) and failure (probability ); and trials that are independent, with unchanged from one trial to the next.
A basketball player makes 70% of free throws, each attempt treated as independent of the others (hypothetical), and attempts 8. "Number made" is binomial with , . What is the probability she makes exactly 6?
- Confirm the conditions and identify , , . Fixed trials, two outcomes, and independent, constant probability all hold; here , , , target .
- Count the arrangements. — the number of orders 6 makes and 2 misses could occur in across 8 attempts.
- Compute one arrangement's probability. .
- Multiply. — about a 30% chance of exactly 6 makes.
Common slips: leaving out , which gives the probability of one specific order of makes and misses, not all of them; swapping the exponents, , which computes the probability of misses instead of successes.
"Any count of 'successes out of some tries' qualifies as binomial." Not if the tries affect each other: drawing 8 cards without replacement to count reds changes the probability on every draw, breaking independence — a different distribution applies there. "'At least' can be answered by computing the probability of exactly that one number." "At least 6" asks about a range, and together, not the single value alone.
Mean and Standard Deviation of a Binomial Random Variable
A binomial random variable's and simplify to and , without needing the full probability table.
Multiply by for the mean; multiply by by and take the square root for the standard deviation. Both hold for any valid , not only .
For the free-throw shooter, , , : expected makes; makes.
"The shortcut only works when ." It holds for every valid ; is simply the easiest case to check by hand, since success and failure are equally likely there. " always comes out to a whole number, matching an actual possible count." Here , a value she can never actually make in one game of 8 attempts — the same "average need not be achievable" fact from applies to this shortcut too.
Seeing the Whole Distribution at OnceSynthesis
One last hypothetical: a call center where each incoming call is independently resolved on the first try with probability 0.6, and a supervisor tracks first-try resolutions out of 5 calls.
That count is a : a number attached to an outcome not yet observed, taking the listable values 0 through 5. Writing its means pairing each of those six values with a probability, valid only if every entry sits between 0 and 1 and all six sum to exactly 1. Every trial is independent with the same two outcomes and the same fixed probability, so the count is also binomial, , and its and both reduce to short expressions in and .
The , , describes the long-run average across many five-call stretches, not a guarantee about this one; the , , describes how far a typical stretch strays from that average. Neither number promises what happens next; together they describe the shape of what tends to happen across many repetitions, seen once as a table and once as a formula.
Sources
- 1 OpenStax Introductory Statistics §4.1: Probability Distribution Function (PDF) for a Discrete Random Variable — source
- 2 OpenStax Introductory Statistics §4.2: Mean or Expected Value and Standard Deviation — source
- 3 OpenStax Introductory Statistics §4.3: Binomial Distribution — source
- 4 NIST/SEMATECH e-Handbook of Statistical Methods §1.3.6.6.18: Binomial Distribution (states the closed-form PMF and the mean np, SD √(np(1−p))) — source