Random Variables and Probability Distributions
A random variable assigns a numerical value to each outcome of an experiment, and a probability distribution describes how probability is allocated to those values. In brief: if X counts heads in two fair independent coin tosses, X can be 0, 1 or 2 with probabilities 1/4, 1/2 and 1/4. Several experimental outcomes can produce the same variable value.
Random variables let probability describe counts, measurements and numerical summaries using a common framework. The distinction between discrete values and continuous measurements determines how probabilities are represented and calculated. This guide explains probability tables, density and cumulative distribution functions, with examples that separate a variable’s possible values from the original sample-space outcomes.
What is a random variable?
A random variable is a rule mapping each possible outcome to a number. The rule itself is fixed; uncertainty comes from which experimental outcome occurs. If an experiment records two coin tosses, a variable X might count heads, while another variable Y might record whether the first toss is a head.
For X counting heads, HH maps to 2, HT and TH map to 1, and TT maps to 0. The variable’s possible values are therefore fewer than the four detailed outcomes. To find P(X = 1), add the probabilities of every outcome that maps to 1.
Different random variables can be defined on the same experiment and need not contain the same information. A two-die total does not reveal the individual faces, while the ordered pair does. Define the variable in words, including units when appropriate, before assigning a distribution or calculating probabilities.
What is a discrete probability distribution?
A discrete random variable takes values in a finite or countably infinite set. Examples include a success count, a die face and the number of trials until an event occurs. Its probability mass function assigns a probability P(X = x) to each possible value x.
Every assigned probability must be nonnegative, and the probabilities over all possible values must sum to 1. A table failing either condition cannot be a complete probability distribution. Values outside the support, the set of possible values with positive probability, have probability zero.
To find the probability of an event involving several discrete values, add their masses. If X counts heads in two fair independent tosses, P(X ≤ 1) = P(X = 0) + P(X = 1) = 1/4 + 1/2 = 3/4. The values are mutually exclusive outcomes for X.
How do you build a probability distribution table?
List the variable’s distinct possible values and gather all experimental outcomes producing each value. For two fair independent coin tosses, the four sequences each have probability 1/4. Grouping them by head count gives probabilities 1/4 for zero, 1/2 for one and 1/4 for two.
Check the total: 1/4 + 1/2 + 1/4 = 1. The middle value is more likely because two sequences map to it. A distribution table is therefore not necessarily uniform even when the underlying detailed outcomes are equally likely.
If one table probability is missing, subtract the known probabilities from 1, provided the listed values cover the whole support. For probabilities 0.2, 0.5 and an unknown third value, the missing probability is 0.3. If the table omits additional possible values, that subtraction would combine their probability rather than isolate one entry.
- Define the numerical quantity X.
- List every possible value of X.
- Identify all experimental outcomes giving each value.
- Add their probabilities within each group.
- Check nonnegativity and a total probability of 1.
| x | Contributing outcomes | P(X = x) |
|---|---|---|
| 0 | TT | 1/4 |
| 1 | HT, TH | 1/2 |
| 2 | HH | 1/4 |
What is a continuous probability distribution?
A continuous model can assign values throughout intervals, such as a modelled waiting time or measured length. When the distribution has a probability density function f, probabilities are areas under its curve. The density must be nonnegative, and the total area over all possible values must equal 1.
For a continuous distribution with a density, the probability of any single exact value is zero, while an interval can have positive probability. This does not make exact values logically impossible; it reflects how probability is spread over infinitely many points. Events such as X = 2 and 1.9 ≤ X ≤ 2.1 therefore require different interpretations.
A density height is not itself a probability and can exceed 1 if the total area remains 1. For a uniform distribution on [0, 0.5], the density is 2 throughout that interval, giving area 2 × 0.5 = 1. Probabilities come from area, not from reading the vertical height alone.
How do you calculate probabilities in a continuous uniform model?
Suppose X is uniformly distributed from 0 to 10 minutes. Equal-length subintervals have equal probabilities, and the density is 1/10 across that interval. The probability that X lies between 2 and 5 minutes is the interval length 3 divided by the total length 10, giving 0.3.
The probability X exceeds 7 is likewise 3/10. Since individual endpoints have probability zero in this model, P(2 < X < 5) equals P(2 ≤ X ≤ 5). This endpoint equivalence does not generally hold for discrete distributions, where a boundary value can carry positive probability.
A uniform waiting-time model is an assumption, not a universal description of waiting. Other mechanisms can concentrate probability near some values more than others. State the interval and uniformity explicitly before using interval-length ratios, just as equally likely finite outcomes must be stated before using simple counting.
What is a cumulative distribution function?
The cumulative distribution function, or CDF, is F(x) = P(X ≤ x). It gives the probability accumulated up to a threshold. Every CDF is nondecreasing, approaches 0 toward sufficiently low extremes and approaches 1 toward sufficiently high extremes, with the appropriate limits for the distribution’s support.
For the two-toss head count, F(x) is 0 below 0, 1/4 from 0 up to but not including 1, 3/4 from 1 up to but not including 2, and 1 from 2 onward. The jumps occur at values carrying positive probability.
For a continuous uniform variable on [0, 10], F(x) = x/10 between 0 and 10, with 0 below and 1 above that interval. The identity P(a < X ≤ b) = F(b) − F(a) works generally. For discrete inclusive lower bounds, account separately for any probability at a.
How do distributions describe centre, spread and model families?
A distribution specifies more than a typical value: it assigns probabilities across the possible range. Its expectation is a probability-weighted mean when it exists, while variance measures squared spread around that mean when finite. Two distributions can share a mean while differing greatly in spread or shape.
Named families organise common structures. A Bernoulli distribution models one 0–1 trial, a binomial distribution counts successes in fixed independent trials and a uniform distribution spreads probability evenly over its stated support. Parameters such as a success probability or interval endpoints determine a particular member of a family.
The background idea is to translate uncertainty into a numerical object that can be analysed consistently. A model distribution may be chosen from mechanism assumptions or estimated from data, but it should not be confused with a frequency table from one finite sample. The latter is observed evidence rather than automatically the exact underlying distribution.
What mistakes should you avoid with random variables and distributions?
Do not confuse the random variable’s value with the probability of that value. In a count model, X = 3 describes three successes, while P(X = 3) might be 0.2. The first is a possible measurement; the second is a probability between zero and one.
For discrete tables, include all values or clearly identify omitted zero-probability entries. For continuous density graphs, calculate areas rather than treating heights as point probabilities. Check whether endpoints carry probability before changing strict inequalities to inclusive ones.
Finally, define the model and its domain before using formulas. Not every numerical quantity has a finite mean or variance, and not every continuous-looking measurement is modelled identically. Clear variable definitions, valid probability totals and careful distinction between mass, density and cumulative probability make distribution calculations interpretable.