Introduction to Statistics · Chapter 4 · Random Variables
A probability stops being one number and becomes a table — every value a variable can take, paired with its share of one whole unit of probability.
bookSHelf · Introduction to Statistics · §4.1 · a self-paced section
Learning objectives — by the end of this section you will be able to
§4.1.1 — one table, every value a variable can take
A discrete probability distribution function pairs each value a random variable can take with the probability of that value. Two conditions decide whether a candidate table is a legitimate one — and both are things you can check by eye in a few seconds.
One unit of probability, spent across every value.
§4.1.1 — the test every candidate table has to pass
Definition 4.1.1 — Probability Distribution Function (PDF) for a Discrete Random Variable
A discrete probability distribution function has two characteristics:
Figure: every probability fits under 1, and stacked end to end they fill exactly 1.
§4.1.1 — the shorthand for one entry in the table
Definition 4.1.2 — The Notation P(x)
For a discrete random variable X, the expression
P(x)=the probability that X takes on the value x
Figure: the notation just names which rows of the table you take.
P(x) names the second column of the distribution table. The row labelled x=3 carries the number P(x=3), read aloud as "the probability that X equals 3."
§4.1.1 — a row test and a column test, in that order
Rule 1 — every row, on its own
No single probability may be negative, and none may exceed 1 — nothing is less likely than impossible or more likely than certain.
Rule 2 — the column, as a whole
Add every entry in the P(x) column. The total has to come out to exactly 1.
Both conditions must hold. A table that satisfies one but not the other is not a probability distribution function — and both are the only test you ever need to apply to a candidate table.
Context Pause — a distribution is a budget, not a list
You have exactly one unit of probability to spend.
Every value the variable can take gets some share of it — that is the real content of the second characteristic. If someone hands you a table whose column sums to 0.94, they did not hand you a distribution; they handed you an incomplete one.
§4.1.1 — the notation stretched to cover more than one value
P(x>1) is the probability X comes out greater than 1, and P(x≥5) is the probability it comes out 5 or more. To evaluate one of those, add up the P(x) entries for every row that qualifies — there is no formula to memorize, only addition applied to the rows you selected.
Check the column first: add the P(x) column before you do anything else with it. If the total isn't 1, the table is incomplete or wrong and no probability you compute from it will mean anything. If it is 1, you're free to start reading rows.
Insight Note — read the inequality, then point at the rows
P(x≥5) is not a new kind of object.
Cover the table with your hand, uncover only the rows where x is 5 or more, and add what is showing. Every probability question in this section reduces to choosing which rows to uncover.
Your turn — total the column, then select rows
Try It Now 4.1.1 — Table 4.1.1, nurse calls per 12-hour shift (50 patients)
Let X = the number of times a patient rings the nurse during a 12-hour shift. Why is this a discrete probability distribution function (two reasons)?
| x | P(x) |
|---|---|
| 0 | 504 |
| 1 | 508 |
| 2 | 5016 |
| 3 | 5014 |
| 4 | 506 |
| 5 | 502 |
Both characteristics hold
1. Largest entry 5016=0.32, smallest 502=0.04 — nothing negative, nothing over 1.
2. 504+508+5016+5014+506+502=5050=1
Worked example — confirm the two characteristics hold
Example 4.1.1 — Table 4.1.2, nights per week a newborn's crying wakes its mother (50 mothers)
Let X = the number of times per week a newborn's crying wakes its mother after midnight. Explain why this is a discrete PDF.
| x | P(x) |
|---|---|
| 0 | 502 |
| 1 | 5011 |
| 2 | 5023 |
| 3 | 509 |
| 4 | 504 |
| 5 | 501 |
Both characteristics of Definition 4.1.1 hold
a. Every entry is a count out of 50, from 501=0.02 up to 5023=0.46 — between 0 and 1.
b. 502+5011+5023+509+504+501=1
Not a coincidence — every one of the 50 mothers is counted in exactly one row.
Try it in rāSHio
Open rāSHio, paste the 50 mothers' nightly counts (0; 1; 1; 2; 2; 2; …) into File → Delimited List…, then choose Graph → Frequency Table with Discrete values checked.
The relative-frequency column it builds is the P(x) column of Table 4.1.2, and rāSHio totals it for you — so you can watch the second characteristic come out to 1 instead of adding the numerators by hand.
§4.1.2 — nobody hands you the table
Most of the time you get a paragraph — percentages scattered through a sentence — and building the table is the work. The same three moves, done in order, keep you out of trouble.
Insight Note — percentages are already probabilities in disguise
"She attends three days 80% of the time" is P(x=3)=0.80.
Written for a reader who hasn't taken statistics yet. Moving the decimal point two places left is the whole translation.
Your turn — name it, list the values, attach the probabilities
Try It Now 4.1.2 — Rosa's basketball practices
Rosa has basketball practice two days a week. 90% of the time she attends both practices, 8% one practice, 2% neither. What is X and what values does it take on?
X = practices Rosa attends in a week — 0, 1, 2
| x | P(x) |
|---|---|
| 0 | 0.02 |
| 1 | 0.08 |
| 2 | 0.90 |
Check: 0.02+0.08+0.90=1.00, every entry between 0 and 1 — a legitimate PDF.
Worked example — three moves, one description
Example 4.1.2 — Mai's class attendance
Mai has classes three days a week: 80% of the time all three days, 15% two days, 4% one day, 1% no days. a. Define X. b. What values does X take on? c. Construct the PDF table — what does the P(x) column sum to?
a. X = days per week Mai attends class. b. 0, 1, 2, 3.
| x | P(x) |
|---|---|
| 0 | 0.01 |
| 1 | 0.04 |
| 2 | 0.15 |
| 3 | 0.80 |
c. 0.01+0.04+0.15+0.80=1.00 It has to — the four listed values are the only possibilities.
Key Terminology — the four terms this section defined
The variable
random variable — a quantity whose value is determined by the outcome of a chance experiment; written with a capital letter, usually X.
discrete random variable — one whose possible values can be listed as separate, countable numbers, with nothing in between.
Its distribution
probability distribution function (PDF) — the pairing of each value a discrete random variable can take with the probability of that value.
P(x) — the probability that X takes on the particular value x.
The headline result of §4.1
Two checks, applied in order, are the whole test.
0≤P(x)≤1and∑P(x)=1
Every candidate table — whether handed to you complete or built from a paragraph of percentages — passes or fails on those two lines. Nothing else about the table matters to the test.
§4.1 — conclusions
The core idea
A discrete PDF pairs every value a variable can take with its share of one whole unit of probability. Check each row on its own, then check that the column sums to exactly 1 — that is the entire test, and it is also how you build a table from a description.
The failure case
A column that sums to 0.99 usually means a value went unlisted, not an arithmetic slip — the smallest probability is often buried in the last clause of the description. Total the column before you trust any row you read from it.
Next: §4.2 — Mean or Expected Value and Standard Deviation, turning this same table into a single summary number.