2.1–2.2 Two Categorical Variables
Two-Way Tables
Two-way (contingency) table: counts or relative frequencies for 2 categorical variables at the same time.
| Sport | No sport | Total | |
|---|---|---|---|
| 9th | 45 | 55 | 100 |
| 12th | 30 | 70 | 100 |
| Total | 75 | 125 | 200 |
Joint rel. freq. = 1 cell ÷ the table total: P(9th & sport) = 45/200 = 0.225 of all 200 students here.
Marginal rel. freq. = a row or column total ÷ the table total: P(sport) = 75/200 = 0.375 of all students.
Conditional rel. freq. = cell ÷ its own row (or column) total: P(sport | 9th) = 45/100 = 0.45 of 9th.
Reverse it: P(9th | sport) = 45/75 = 0.60. Same cell, different denominator → a different answer! Read carefully.
Graphs
Side-by-side bar, segmented bar + mosaic plots show 1 variable's distribution for each level of the other.
Segmented bar: each bar = 100% of 1 group, split into conditional %s → easy to compare groups.
Mosaic plot: bar widths show the relative size of each group; segment heights show conditional proportions.
Association
Association: conditional distributions differ across groups. 45% of 9th vs 30% of 12th play → associated.
No association: conditional proportions are (about) equal across every level of the other variable.
Pick the right denominator: the condition ("of 9th graders") names the row or column you divide by.
2.3–2.4 Simulation & Probability Basics
Key Terms
Random process: results determined by chance. Outcome: result of 1 trial. Event: a set of outcomes.
Probability: the long-run relative frequency of an outcome or event over a very large number of trials.
Law of large numbers: for independent trials, as # of trials ↑, the relative frequency settles near 1 value.
Simulation Steps
1. Model: assign values to outcomes by chance (digits 0–2 = hit, 3–9 = miss → P(hit) = 0.3 each shot).
2. Run many trials w/ a random number generator. 3. Record the counts of each outcome + the total.
4. Estimate: P(event) ≈ (# trials w/ the event) ÷ (total # of trials). More trials → a better estimate.
| Sim. trials | Got event | Estimate |
|---|---|---|
| 50 | 19 | 0.38 |
| 500 | 168 | 0.336 |
| 5,000 | 1,512 | 0.302 |
Empirical rel. freq. from real or simulated data estimates the true (theoretical) probability of the event.
Probability Rules
Sample space: the set of all possible nonoverlapping outcomes of a random process; P(sample space) = 1.
Equally likely outcomes: P(E) = (# outcomes in E) ÷ (total # outcomes). 1 die roll: P(even) = 3/6 = 0.5.
Range: 0 ≤ P(E) ≤ 1. Complement: P(not E) = 1 − P(E); written as E′, EC or Ē in AP exam questions + answers.
At least 1: P(at least 1) = 1 − P(none). 10 shots w/ P(miss) = 0.7 each → 1 − 0.710 ≈ 0.972 chance.
2.5–2.7 Probability Rules
Joint & Mutually Exclusive
Joint probability: P(A ∩ B) = chance A AND B both happen (the intersection of events A + B in a diagram).
Mutually exclusive (disjoint): A + B can't happen at the same time → P(A ∩ B) = 0. E.g., roll a 2 + a 5.
Conditional & Multiplication
Conditional: P(A | B) = P(A ∩ B) ÷ P(B). Read "|" as "given"; knowing B shrinks the sample space.
General multiplication rule: P(A ∩ B) = P(A) · P(B | A). Works for ANY 2 events, independent or not.
Tree diagram: multiply along branches for "and"; add end products across branches for "or." Each fork sums to 1.
Tree e.g.: P(rain) = 0.3, P(late | rain) = 0.4, P(late | no rain) = 0.1 → P(late) = 0.12 + 0.07 = 0.19 total.
Independence & Union
Independent ⇔ P(A | B) = P(A): knowing B doesn't change A's chance. Then P(A ∩ B) = P(A) · P(B).
Check w/ the table: P(sport | 9th) = 0.45 vs P(sport) = 0.375 → they differ → NOT independent events.
Union (A or B or both): P(A ∪ B) = P(A) + P(B) − P(A ∩ B). Subtract the overlap so it isn't counted twice.
| Rule | Formula | Key word |
|---|---|---|
| Complement | 1 − P(A) | not |
| Addition | P(A)+P(B)−P(A∩B) | or |
| Multiplication | P(A)·P(B|A) | and |
| Indep. only | P(A)·P(B) | and |
E.g.: P(A) = 0.5, P(B) = 0.4, P(A ∩ B) = 0.2 → P(A ∪ B) = 0.7, & P(A | B) = 0.5 = P(A) → A, B independent.
2.8–2.9 Discrete Random Variables
Probability Distributions
Random variable X: takes numerical values that result from a random phenomenon (# of late buses in a day).
Discrete: countable values. Its probability distribution gives every value + its probability; all P's sum to 1.
| x (late buses) | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| P(X = x) | 0.1 | 0.3 | 0.4 | 0.2 |
| P(X ≤ x) | 0.1 | 0.4 | 0.8 | 1.0 |
Cumulative distribution: P(X ≤ x). Above, P(X ≤ 1) = 0.1 + 0.3 = 0.4, so P(X ≥ 2) = 1 − 0.4 = 0.6 chance.
Build one from the rules of probability (tree, table) or estimate it w/ a simulation; show as a table, graph or rule.
Missing P? Use the sum-to-1 rule: if the 3 known P's add to 0.85, the 4th (missing) P must be 0.15.
Mean & Standard Deviation
Expected value: μX = E(X) = Σ xi · P(xi). Above: 0(0.1) + 1(0.3) + 2(0.4) + 3(0.2) = 1.7 late buses per day.
SD: σX = √[Σ (xi − μX)² · P(xi)]. Above: variance = 0.81, so σX = √0.81 = 0.9 buses per day, typically.
Variance = σX² = V(X). Parameters: μX + σX are single, fixed values, not sample statistics (like x̄ or s).
Interpret in Context
Mean: "Over many, many days, the avg # of late buses per day will be about 1.7." It's a long-run average.
SD: "The # of late buses typically varies by about 0.9 from the mean of 1.7, over the long run of days."
2.10 The Binomial Distribution
Is It Binomial? (BINS)
| Letter | Condition |
|---|---|
| B | Binary: success / failure |
| I | Independent trials |
| N | Fixed Number of trials n |
| S | Same P(success) p each trial |
Binomial X counts the # of successes in n independent trials, each w/ success prob p + failure prob 1 − p.
Not binomial: no fixed n ("until the 1st success"), or p changes from trial to trial (draw w/o replacing).
Formulas
P(X = x) = nCx · px · (1 − p)n − x, for x = 0, 1, 2, …, n (the binomial probability function in the CED).
nCx = # of ways to arrange x successes among n trials (10C2 = 45). Calculator: n, MATH → PROB → nCr, x.
Mean μX = np. SD σX = √[np(1 − p)]. n = 10, p = 0.3 → μX = 3 & σX ≈ 1.45 successes per 10 trials of shots.
E.g.: n = 10, p = 0.3: P(X = 2) = 45(0.3)²(0.7)8 ≈ 0.233; P(X ≤ 2) ≈ 0.383, so P(X ≥ 3) ≈ 0.617 for this shooter.
Calculator & Keywords
binompdf(n, p, x) → P(X = x). binomcdf(n, p, x) → P(X ≤ x). Rewrite every question in ≤ form first.
At least 3: P(X ≥ 3) = 1 − P(X ≤ 2). More than 3: 1 − P(X ≤ 3). At most 3: P(X ≤ 3) directly. Fewer than 3: P(X ≤ 2).
Simulate: 1 random digit per trial w/ digits set to match p; count successes in each run of n trials.
Interpret μ: "If many groups of 10 shots are taken, the avg # made will be about 3 per group of 10."
2.11 The Normal Distribution
Continuous Random Variables
Continuous random variable: any value in an interval. Probability = area under the curve; total area = 1.
P(X = 1 exact value) = 0 for a continuous variable, so P(X < 180) = P(X ≤ 180). Only intervals matter.
Normal Curves
Normal curve: continuous, unimodal, bell-shaped + symmetric. It is set by 2 parameters: mean μ + SD σ.
Smaller σ → taller curve, values more concentrated around μ. Larger σ → shorter, more spread-out curve.
Standard normal: μ = 0 & σ = 1. Any normal value converts to it w/ the z-score z = (x − μ) ÷ σ (z = # of SDs).
Use: many continuous variables (heights, test scores) are well modeled by a normal curve, not all.
Normal in context: "Heights of adult men here are approx. N(170 cm, 8 cm)." Name variable + units.
Empirical Rule (68–95–99.7)
| Within | Approx. % | Heights μ = 170, σ = 8 |
|---|---|---|
| μ ± 1σ | 68% | 162 to 178 cm |
| μ ± 2σ | 95% | 154 to 186 cm |
| μ ± 3σ | 99.7% | 146 to 194 cm |
Tails: (100 − 68) ÷ 2 = 16% lie above μ + 1σ (178 cm); (100 − 95) ÷ 2 = 2.5% lie above μ + 2σ (186 cm).
Use the rule only when values land right on μ ± 1, 2 or 3σ; otherwise use technology or a z-table.
Sketch It
Draw a bell curve, label μ, mark μ ± 1σ, 2σ + 3σ, shade the region asked for + label its boundary values.
2.11 Normal Calculations & Percentiles
Area From a Value
Steps: 1) define X + its model N(μ, σ); 2) sketch + shade; 3) find z or use tech; 4) answer in context.
E.g.: X ~ N(170, 8). P(X > 180): z = (180 − 170)/8 = 1.25 → area ≈ 0.106, so about 10.6% are taller.
Between: P(162 < X < 178) = normalcdf(162, 178, 170, 8) ≈ 0.683, matching the 68% of the empirical rule.
Calculator: normalcdf(lower, upper, μ, σ). Use −1E99 or 1E99 for a missing lower or upper bound on the area.
z-table: gives area to the LEFT of z. For area to the right, use 1 − table value (1 − 0.894 = 0.106 here).
Value From an Area (Percentiles)
invNorm(area to the LEFT, μ, σ). 90th percentile: invNorm(0.90, 170, 8) ≈ 180.3 cm (z ≈ 1.28).
| Want | Means | Area to enter |
|---|---|---|
| Lowest p% | P(X < xa) = p/100 | p/100 |
| Highest p% | P(X > xb) = p/100 | 1 − p/100 |
| Extreme p% | p% split in 2 tails | p/200 + 1 − p/200 |
Middle 95%: 2.5% in each tail → invNorm(0.025, 170, 8) to invNorm(0.975, 170, 8) → 154.3 to 185.7 cm.
Compare Relative Position
z-scores or percentiles compare values from different normal distributions: higher z = relatively higher.
E.g.: a test A score w/ z = 1.5 beats a test B score w/ z = 1.2 relative to their groups (both normal).
Unknown μ or σ: z = (x − μ)/σ still works; plug in a known percentile's z (e.g., z = 1.28 for the 90th) + solve.
2.12 Sampling Distributions & CLT
Sampling Distributions
Sampling distribution: the distribution of a statistic (x̄, p̂) over ALL possible samples of the same size n.
Simulate it: assume a parameter value, draw many random samples, record the statistic each time + graph them.
Randomization distribution: randomly re-assign response values to treatment groups many times; record the statistic.
Why: it shows how much a statistic varies by chance alone → helps judge if an observed result is unusual.
| Distribution of | What varies |
|---|---|
| Population | values of all individuals |
| Sample data | values in 1 sample |
| Sampling dist. | a statistic, sample to sample |
Central Limit Theorem (CLT)
CLT: the sampling distribution of a sample mean x̄ from a random sample is approximately normal in shape.
Bigger n → better normal approximation, even when the population itself is skewed or not normal.
Larger samples also make a statistic vary less from sample to sample → a narrower sampling distribution.
Exam Moves
3 distributions: name which one a question is about; "distribution of x̄" ≠ the distribution of the data.
Is it unusual? Locate the observed statistic in the simulated distribution; few values as extreme → unusual.
Dotplot e.g.: 200 simulated p̂'s, only 3 at or above the observed 0.62 → about 1.5% → unusual by chance.