Unit 2 · Topic 2.8 Beta

Introduction to Random Variables and Probability Distributions

4 min read · freeNot practiced

So far, events have been described in words: "the sum is 8", "the student takes art". Often the outcome of a chance process is naturally a number: how many people are in a car, how many goals a team scores, how many of 12 songs are rock songs. A number like that is a random variable, and its probabilities form a distribution, just as data values did in Unit 1.

Random variables

A random variable is a numerical value that depends on the outcome of a chance process. Name it with a capital letter and define it in context, saying what is counted or measured and for which randomly chosen individual:

Let X = the number of people in a randomly chosen car at the toll booth.

The definition has to describe a number. "Let X = the people in the car" or "Let X = rock songs" names things, not a number, and the exam does not give credit for it. Lower-case xx stands for a particular value: P(X=3)P(X = 3) is the probability that the car holds 3 people.

A random variable is discrete if its values are separate, usually counts: people in a car, goals in a game, heads in 3 flips. It is continuous if it can take any value in an interval, like the time to run a mile. This unit treats discrete random variables first; continuous ones come later in the unit, in topic 2.11.

Probability distributions

The probability distribution of a discrete random variable lists every value with its probability.

xx12345
P(X=x)P(X = x)0.450.300.120.090.04

Two rules make a distribution valid, the same two rules as in topic 2.4: every probability is from 0 to 1, and the probabilities add to exactly 1. The second rule finds a missing value: if the probability for 5 people were blank, it would be 1−(0.45+0.30+0.12+0.09)1 - (0.45 + 0.30 + 0.12 + 0.09)=0.04= 0.04.

Probability histogram of X, the number of people in a car at a toll booth: P(X = 1) = 0.45, P(X = 2) = 0.30, P(X = 3) = 0.12, P(X = 4) = 0.09, P(X = 5) = 0.04. The bars add to 1.
Figure 1. A probability histogram: one bar per value, its height the probability. LevlPrep original diagram.

A probability histogram draws the distribution with one bar per value. Describe its shape as you would a histogram of data. The figure is skewed right: most cars carry 1 or 2 people, and a few carry 4 or 5.

Building a distribution

Worked example 1. A fair coin is flipped 3 times. Let H = the number of heads. Give the probability distribution of H.

List the 8 equally likely outcomes: HHH, HHT, HTH, THH, HTT, THT, TTH, TTT.

Count the heads in each: one outcome has 3, three have 2, three have 1, one has 0.

Distribution: P(H=0)=18P(H = 0) = \frac{1}{8}, P(H=1)=38P(H = 1) = \frac{3}{8}, P(H=2)=38P(H = 2) = \frac{3}{8}, P(H=3)=18P(H = 3) = \frac{1}{8}. Check: they add to 1.

The values 0, 1, 2, 3 are not equally likely. Values are equally likely only when the underlying outcomes give each one the same number of ways.

Probabilities from a distribution

To find the probability of an event, write it with an inequality, then add the probabilities of the values it includes. The words matter:

WordsInequalityFor the car data
at least 3X≥3X \ge 30.12+0.09+0.040.12 + 0.09 + 0.04=0.25= 0.25
more than 3X>3X > 30.09+0.04=0.130.09 + 0.04 = 0.13
fewer than 3X≤2X \le 20.45+0.30=0.750.45 + 0.30 = 0.75
at most 3X≤3X \le 30.45+0.30+0.120.45 + 0.30 + 0.12=0.87= 0.87

"Fewer than 3" read as "3 or fewer" is one of the most common slips on the exam. Fewer than 3 people means 1 or 2.

A cumulative probability adds everything up to a boundary: P(X≤3)=0.87P(X \le 3) = 0.87. Cumulative probabilities also give single values by subtraction: P(X=3)P(X = 3)=P(X≤3)−P(X≤2)= P(X \le 3) - P(X \le 2)=0.87−0.75= 0.87 - 0.75=0.12= 0.12. And the complement rule still works: P(X≥2)P(X \ge 2)=1−P(X=1)= 1 - P(X = 1)=0.55= 0.55.

Worked example 2. Let G = the number of goals a team scores in a randomly chosen game, with probabilities 0.25, 0.35, 0.22, 0.12, 0.06 for 0 to 4 goals. Find and interpret P(G≤1)P(G \le 1).

Add the values up to the boundary: P(G≤1)P(G \le 1)=0.25+0.35= 0.25 + 0.35=0.60= 0.60.

Interpretation: in the long run, the team scores 1 goal or fewer in about 60% of its games.

Every answer in this topic should be checkable: probabilities between 0 and 1, the whole distribution adding to 1, and an event's inequality written down before any adding begins.

Spot a mistake on this page?