Introduction to Statistics · Chapter 4 · Random Variables

Probability Distribution Function (PDF) for a Discrete Random Variable

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

PDF for a Discrete Random Variable · bookSHelf Intro Stats§4.1

Learning objectives — by the end of this section you will be able to

Objectives

  1. Define a random variable for a described situation and list the values it can take on §4.1.1
  2. State the two characteristics every discrete PDF must have definition
  3. Check whether a given table is a legitimate discrete PDF §4.1.1
  4. Read probabilities like P(x=4)P(x=4), P(x>1)P(x>1), and P(x5)P(x\geq5) off a table §4.1.1
  5. Build a probability distribution table from a description given in words §4.1.2
4.1

§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.

PDF for a Discrete Random Variable · bookSHelf Intro Stats§4.1

§4.1.1 — the test every candidate table has to pass

Probability Distribution Function (PDF) for a Discrete Random Variable

Definition 4.1.1 — Probability Distribution Function (PDF) for a Discrete Random Variable

A discrete probability distribution function has two characteristics:

  1. Each probability is between zero and one, inclusive.
  2. The sum of the probabilities is one.

Figure: every probability fits under 1, and stacked end to end they fill exactly 1.

PDF for a Discrete Random Variable · bookSHelf Intro Stats§4.1

§4.1.1 — the shorthand for one entry in the table

The Notation P(x)P(x)

Definition 4.1.2 — The Notation P(x)P(x)

For a discrete random variable XX, the expression

P(x)=the probability that X takes on the value xP(x) = \text{the probability that } X \text{ takes on the value } x

Figure: the notation just names which rows of the table you take.

P(x)P(x) names the second column of the distribution table. The row labelled x=3x=3 carries the number P(x=3)P(x=3), read aloud as "the probability that XX equals 3."

PDF for a Discrete Random Variable · bookSHelf Intro Stats§4.1

§4.1.1 — a row test and a column test, in that order

Check each row, then check the column

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)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.

PDF for a Discrete Random Variable · bookSHelf Intro Stats§4.1

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.

PDF for a Discrete Random Variable · bookSHelf Intro Stats§4.1

§4.1.1 — the notation stretched to cover more than one value

P(x)P(x) can name more than one row

P(x>1)P(x>1) is the probability XX comes out greater than 1, and P(x5)P(x\geq5) is the probability it comes out 5 or more. To evaluate one of those, add up the P(x)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)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.

PDF for a Discrete Random Variable · bookSHelf Intro Stats§4.1

Insight Note — read the inequality, then point at the rows

P(x5)P(x\geq5) is not a new kind of object.

Cover the table with your hand, uncover only the rows where xx is 5 or more, and add what is showing. Every probability question in this section reduces to choosing which rows to uncover.

PDF for a Discrete Random Variable · bookSHelf Intro Stats§4.1

Your turn — total the column, then select rows

Try It Now 4.1.1

Try It Now 4.1.1 — Table 4.1.1, nurse calls per 12-hour shift (50 patients)

Let XX = the number of times a patient rings the nurse during a 12-hour shift. Why is this a discrete probability distribution function (two reasons)?

xxP(x)P(x)
0450\frac{4}{50}
1850\frac{8}{50}
21650\frac{16}{50}
31450\frac{14}{50}
4650\frac{6}{50}
5250\frac{2}{50}

Both characteristics hold

1. Largest entry 1650=0.32\frac{16}{50}=0.32, smallest 250=0.04\frac{2}{50}=0.04 — nothing negative, nothing over 1.

2. 450+850+1650+1450+650+250=5050=1\tfrac{4}{50}+\tfrac{8}{50}+\tfrac{16}{50}+\tfrac{14}{50}+\tfrac{6}{50}+\tfrac{2}{50}=\tfrac{50}{50}=1

PDF for a Discrete Random Variable · bookSHelf Intro Stats§4.1

Worked example — confirm the two characteristics hold

Example 4.1.1

Example 4.1.1 — Table 4.1.2, nights per week a newborn's crying wakes its mother (50 mothers)

Let XX = the number of times per week a newborn's crying wakes its mother after midnight. Explain why this is a discrete PDF.

xxP(x)P(x)
0250\frac{2}{50}
11150\frac{11}{50}
22350\frac{23}{50}
3950\frac{9}{50}
4450\frac{4}{50}
5150\frac{1}{50}

Both characteristics of Definition 4.1.1 hold

a. Every entry is a count out of 50, from 150=0.02\frac{1}{50}=0.02 up to 2350=0.46\frac{23}{50}=0.46 — between 0 and 1.

b. 250+1150+2350+950+450+150=1\tfrac{2}{50}+\tfrac{11}{50}+\tfrac{23}{50}+\tfrac{9}{50}+\tfrac{4}{50}+\tfrac{1}{50}=1

Not a coincidence — every one of the 50 mothers is counted in exactly one row.

PDF for a Discrete Random Variable · bookSHelf Intro Stats§4.1

Try it in rāSHio

Let the tool total the column for you

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)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

§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.

  1. Name the random variable in a full sentence, not just a letter.
  2. List every value XX can take on — including the small ones buried in the last clause.
  3. Attach P(x)P(x) to each value by converting the percentages to decimals, then check the total.
PDF for a Discrete Random Variable · bookSHelf Intro Stats§4.1

Insight Note — percentages are already probabilities in disguise

"She attends three days 80% of the time" is P(x=3)=0.80P(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.

PDF for a Discrete Random Variable · bookSHelf Intro Stats§4.1

Your turn — name it, list the values, attach the probabilities

Try It Now 4.1.2

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 XX and what values does it take on?

XX = practices Rosa attends in a week — 0, 1, 2

xxP(x)P(x)
00.02
10.08
20.90

Check: 0.02+0.08+0.90=1.000.02+0.08+0.90=1.00, every entry between 0 and 1 — a legitimate PDF.

PDF for a Discrete Random Variable · bookSHelf Intro Stats§4.1

Worked example — three moves, one description

Example 4.1.2

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 XX. b. What values does XX take on? c. Construct the PDF table — what does the P(x)P(x) column sum to?

a. XX = days per week Mai attends class.  b. 0, 1, 2, 3.

xxP(x)P(x)
00.01
10.04
20.15
30.80

c. 0.01+0.04+0.15+0.80=1.000.01+0.04+0.15+0.80=1.00 It has to — the four listed values are the only possibilities.

PDF for a Discrete Random Variable · bookSHelf Intro Stats§4.1

Key Terminology — the four terms this section defined

The vocabulary

The variable

random variable — a quantity whose value is determined by the outcome of a chance experiment; written with a capital letter, usually XX.
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)P(x) — the probability that XX takes on the particular value xx.

4.1

The headline result of §4.1

Two checks, applied in order, are the whole test.

0P(x)1andP(x)=10 \le P(x) \le 1 \quad\text{and}\quad \sum 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
PDF for a Discrete Random Variable · bookSHelf Intro Stats§4.1

§4.1 — conclusions

What §4.1 leaves you with

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.