Sub topic 3
Probability Distributions
Prerequisites and scope
This chapter assumes you can work with fractions, decimals, and percents. It also assumes you know the basic probability of simple events, such as the chance of rolling a 3 on a fair die. You should be able to read a simple bar graph or number line.
The previous chapters defined a random variable and separated discrete from continuous ones. Here we describe how likely each outcome of a random variable is. That description is the probability distribution. Everything later in this tutorial, including expected value, standard deviation, and the normal curve, is built on it.
What a probability distribution is
A probability distribution is a rule that tells you how the total probability of 1 is spread across the possible values of a random variable. It answers the question: for each value, or each range of values, how likely is it?
The form of the rule depends on the type of variable.
- For a discrete variable, the distribution assigns a probability to each possible value. It is often shown as a table or a bar graph.
- For a continuous variable, the distribution is a curve. Probability is the area under the curve over a range of values.
In both cases, the total probability is 1, which is the same as 100%.
Discrete distributions
A table of values and probabilities
Suppose a random variable X is the number of heads in two fair coin flips. The possible values are 0, 1, and 2. The four equally likely outcomes are TT, HT, TH, and HH. Counting them gives this distribution.
| x | P(X = x) |
|---|---|
| 0 | 1/4 |
| 1 | 2/4 = 1/2 |
| 2 | 1/4 |
Each probability lies between 0 and 1, and the probabilities add to 1/4 + 1/2 + 1/4 = 1.
The two rules every discrete distribution follows
- Every probability is at least 0 and at most 1.
- The probabilities of all possible values add to exactly 1.
If a table breaks either rule, it is not a valid distribution. On the GRE, a common use of rule 2 is to find a missing probability. If three of four probabilities are 0.1, 0.2, and 0.4, the fourth must be 1 − 0.7 = 0.3.
Probabilities of events
An event is a set of values, such as "X is at least 1." For a discrete variable, you add the probabilities of the values in the event. In the coin example:
- P(X ≥ 1) = P(1) + P(2) = 1/2 + 1/4 = 3/4.
- P(X ≤ 1) = P(0) + P(1) = 1/4 + 1/2 = 3/4.
The complement shortcut is often faster. P(X ≥ 1) = 1 − P(X = 0) = 1 − 1/4 = 3/4.
A worked example with unequal probabilities
A variable takes the values 1, 2, 3, and 4 with probabilities 0.1, 0.2, 0.3, and 0.4. The probabilities add to 1, so this is valid. The distribution is not uniform, because larger values are more likely.
- P(X ≤ 2) = 0.1 + 0.2 = 0.3.
- P(X > 2) = 0.3 + 0.4 = 0.7, which equals 1 − 0.3.
- P(X is even) = P(2) + P(4) = 0.2 + 0.4 = 0.6.
The next chapter uses this same distribution to compute an expected value of 3 and a variance of 1.
from fractions import Fraction
values = [1, 2, 3, 4]
probs = [Fraction(1, 10), Fraction(2, 10), Fraction(3, 10), Fraction(4, 10)]
print(sum(probs)) # 1
p_even = sum(p for v, p in zip(values, probs) if v % 2 == 0)
print(p_even) # 3/5The first line confirms rule 2. The second computes P(X is even) as 3/5, which is 0.6.
Continuous distributions
Probability is area
A continuous variable can take any value in an interval, so there are infinitely many possible values. A single exact value cannot carry a positive probability, or the total would exceed 1. Instead, the distribution is drawn as a curve called a density curve. The probability that the variable falls between two numbers is the area under the curve between them.
Two facts follow.
- The total area under the whole curve is 1.
- The probability of any single exact value is 0. So for a continuous variable, P(X ≤ 5) and P(X < 5) are equal.
That second fact surprises many learners. It does not mean the value 5 is impossible. It means the area above a single point has no width, so it is zero.
Why the height of the curve is not a probability
For a continuous variable, the height of the curve at a point is a density, not a probability. Heights can even exceed 1 for a narrow distribution. Only areas are probabilities. On the GRE, you will almost never calculate such an area directly. You will reason about it using symmetry and standard deviations, which later chapters develop.
A simple continuous example
Suppose a variable is equally likely to fall anywhere between 0 and 10. This is a uniform distribution. The density curve is a flat rectangle from 0 to 10. For the total area to be 1, the height must be 1/10, because 10 × (1/10) = 1.
The probability that the value falls between 2 and 5 is the rectangle's area: width 3 times height 1/10, which is 3/10 = 0.3.
low, high = 0, 10
height = 1 / (high - low)
a, b = 2, 5
prob = (b - a) * height
print(round(prob, 2)) # 0.3Comparing discrete and continuous distributions
| Feature | Discrete | Continuous |
|---|---|---|
| Possible values | Countable, such as 0, 1, 2 | Any value in an interval |
| Description | Table or bar graph | Density curve |
| Probability of one exact value | Can be greater than 0 | Always 0 |
| Probability of an event | Add probabilities | Find area under the curve |
| What must total 1 | Sum of probabilities | Total area |
Reading a distribution from a graph
GRE questions often show a distribution as a bar graph or a curve and ask about an event. A reliable routine is:
- Identify which values or range the event covers.
- Add the bars, or find the area, for that range.
- If the event is large, consider the complement and subtract from 1.
- Check that your answer is between 0 and 1.
For a bell-shaped curve, the area is usually estimated from symmetry. If the curve is symmetric about its center, the area to the left of the center is exactly 1/2. This idea becomes central in the chapters on the normal distribution.
From distributions to counts
A distribution describes probability, but GRE problems often ask about numbers of people or items. Multiply the probability by the group size to get an expected count.
If 30% of the values in a distribution of 2,000 measurements fall in a range, then about 0.30 × 2,000 = 600 measurements fall in that range. The word "about" matters. A probability gives a typical proportion, and an actual sample of values may differ slightly.
Common errors
- Probabilities that do not add to 1. Always check the sum of a discrete table before using it. Many problems rely on this sum to find a missing value.
- Treating curve height as probability. For continuous variables, use area.
- Assigning positive probability to one exact value of a continuous variable. The probability is 0. Only ranges have positive probability.
- Confusing "at most" and "less than" in discrete cases. For discrete variables, P(X ≤ 2) includes the value 2, while P(X < 2) does not. For continuous variables, the two are equal.
- Forgetting the complement. "At least one" is usually 1 minus "none."
- Using a count where a probability is needed. A frequency table gives counts. Divide each count by the total to get probabilities.
Turning a frequency table into a distribution
Sometimes a problem gives counts instead of probabilities. A survey of 50 households records the number of cars each owns.
| Cars | Households |
|---|---|
| 0 | 5 |
| 1 | 20 |
| 2 | 15 |
| 3 | 10 |
Divide each count by 50 to get probabilities: 0.10, 0.40, 0.30, and 0.20. These add to 1. If one household is chosen at random, the number of cars it owns is a random variable with this distribution. Then P(at least 2 cars) = 0.30 + 0.20 = 0.50.
counts = {0: 5, 1: 20, 2: 15, 3: 10}
total = sum(counts.values())
dist = {k: v / total for k, v in counts.items()}
print(dist) # {0: 0.1, 1: 0.4, 2: 0.3, 3: 0.2}
p_at_least_2 = sum(p for k, p in dist.items() if k >= 2)
print(round(p_at_least_2, 2)) # 0.5Exercises
Exercise
A discrete random variable takes the values 0, 1, 2, and 3. The probabilities of 0, 1, and 3 are 0.15, 0.35, and 0.25. What is P(X = 2), and what is P(X ≥ 2)?
Show answer
The probabilities must add to 1, so P(X = 2) = 1 − (0.15 + 0.35 + 0.25) = 1 − 0.75 = 0.25. Then P(X ≥ 2) = P(2) + P(3) = 0.25 + 0.25 = 0.50.
Exercise
A continuous variable is uniformly distributed between 20 and 60. What is the height of its density curve, and what is the probability that the variable falls between 30 and 45?
Show answer
The width is 60 − 20 = 40, so the height is 1/40 so the total area is 1. The interval from 30 to 45 has width 15, so the probability is 15 × (1/40) = 15/40 = 3/8 = 0.375.
Exercise
A continuous variable has P(X < 8) = 0.62. What are P(X ≤ 8) and P(X > 8)? Would your answers change if X were discrete?
Show answer
For a continuous variable the single point 8 has probability 0, so P(X ≤ 8) = 0.62 and P(X > 8) = 1 − 0.62 = 0.38. If X were discrete, P(X ≤ 8) would equal 0.62 plus P(X = 8), and P(X > 8) would be 1 − P(X ≤ 8), so the answers would depend on P(X = 8).
Exercise
In a set of 1,200 measurements, the probability that a randomly chosen measurement falls in a certain range is 0.35. About how many measurements fall in that range?
Show answer
Multiply the probability by the total: 0.35 × 1,200 = 420. About 420 measurements fall in the range.