Inference for Distributions, Proportions and Two-Way Tables, AP/ECON 2500 Ch. 7–9 – Study Notes
offline

Source: Moore, McCabe & Craig, Introduction to the Practice of Statistics, 10th Ed., Ch. 7–9

Tags: t-test, t-distribution, degrees of freedom, confidence interval, matched pairs, two-sample t, proportion, z-test for proportions, chi-square test, two-way table, expected counts, ECON 2500

Difficulty: Intermediate | Prerequisites: Ch. 1-6 notes (descriptive stats, probability, sampling distributions, z-procedures)

Big Picture

Chapters 7-9 apply the inference framework from Chapter 6 to the situations you will encounter most often. Chapter 7 handles inference about means when sigma is unknown (the realistic case), using the t-distribution. Chapter 8 extends inference to proportions. Chapter 9 introduces chi-square tests for categorical data arranged in two-way tables. Together, these three chapters cover the core toolkit an economist needs to test claims about population parameters from sample data.

TL;DR

Chapter 7 replaces the z-procedures with t-procedures for means (one-sample, matched pairs, and two-sample). Chapter 8 covers confidence intervals and hypothesis tests for one or two population proportions. Chapter 9 introduces the chi-square test for independence and the chi-square goodness-of-fit test for categorical variables.


Key Terms

t-distribution

A family of bell-shaped distributions indexed by degrees of freedom (df). Wider and flatter than the standard Normal, especially for small df. As df increases, the t-distribution approaches the Normal.

Degrees of freedom (df)

For a one-sample t-procedure: df = n - 1. For a two-sample t-procedure the formula is more complex (software computes it, or you use the conservative df = smaller of n1 - 1 and n2 - 1).

One-sample t-test

A hypothesis test for the population mean when sigma is unknown. Uses the sample standard deviation s in place of sigma.

One-sample t-interval

A confidence interval for the population mean when sigma is unknown: x-bar ± t* x (s / square root of n), where t* comes from the t-distribution with df = n - 1.

Matched pairs t-procedure

Applied when each observation in one group is naturally paired with an observation in the other (e.g. before/after on the same person). Compute the differences, then do a one-sample t-procedure on those differences.

Two-sample t-procedure

Compares the means of two independent groups. The test statistic is based on (x-bar1 - x-bar2) divided by the standard error of the difference.

Pooled t-procedure

A two-sample t-procedure that assumes equal population variances and pools the two sample variances into one estimate. Use only when there is good reason to believe the variances are equal.

Sample proportion (p-hat)

The fraction of successes in the sample: p-hat = count of successes / n.

z-test for a proportion

Tests H0: p = p0 using the test statistic z = (p-hat - p0) / square root of [p0(1 - p0) / n].

z-interval for a proportion

Confidence interval: p-hat ± z* x square root of [p-hat(1 - p-hat) / n]. Uses the plus-four method for small samples.

Two-way table

A table of counts showing the relationship between two categorical variables, with rows for one variable and columns for the other.

Expected count

The count you would expect in a cell of a two-way table if the two variables were independent: expected = (row total x column total) / grand total.

Chi-square statistic

Measures how far the observed counts in a table differ from the expected counts: X-squared = sum of [(observed - expected) squared / expected].

Chi-square test for independence

Tests whether two categorical variables are independent. Large values of X-squared (i.e. small p-values from the chi-square distribution) provide evidence of association.


Core Content: Ch 7 – Inference for Distributions (t-Procedures)

One-Sample t-Procedures

When sigma is unknown (the usual case), replace sigma with s and use the t-distribution instead of the Normal:

  • t confidence interval: x-bar ± t* x (s / square root of n), with df = n - 1.

  • t test statistic: t = (x-bar - mu0) / (s / square root of n), with df = n - 1.

  • Look up t* or the p-value from the t-distribution table (or software) with n - 1 degrees of freedom.

Conditions: SRS from the population (or a randomised experiment), and either the population is approximately Normal or n is large (n ≥ 30 as a rough guideline). The t-procedures are robust against moderate non-normality but sensitive to outliers for small n.

Matched Pairs

When data come in natural pairs (before/after, twin A/twin B, same person under two conditions):

  • Compute the difference for each pair.

  • Apply the one-sample t-procedure to the differences.

  • H0 typically states that the population mean difference is 0.

Two-Sample t-Procedures

Comparing the means of two independent populations:

  • Two-sample t-interval: (x-bar1 - x-bar2) ± t* x square root of (s1-squared/n1 + s2-squared/n2).

  • Two-sample t-test statistic: t = (x-bar1 - x-bar2) / square root of (s1-squared/n1 + s2-squared/n2).

  • Degrees of freedom: use software for the exact (Welch) df, or conservatively use the smaller of n1 - 1 and n2 - 1.

Conditions: two independent SRSs, each population approximately Normal or both sample sizes large.

When to Use What

  • One group, testing or estimating one mean → one-sample t.

  • Two measurements on the same individuals → matched pairs t.

  • Two separate groups being compared → two-sample t.


Core Content: Ch 8 – Inference for Proportions

One-Sample z-Test for a Proportion

Test H0: p = p0:

  • Test statistic: z = (p-hat - p0) / square root of [p0(1 - p0) / n].

  • Use p0 (the hypothesised value) in the denominator because you are computing under the assumption that H0 is true.

Conditions: SRS, np0 ≥ 10 and n(1 - p0) ≥ 10 (so the Normal approximation is valid).

One-Sample z-Interval for a Proportion

p-hat ± z* x square root of [p-hat(1 - p-hat) / n]

Here you use p-hat (not p0) because you are estimating, not testing.

The plus-four interval adds two successes and two failures to the data before computing, giving better coverage for small samples.

Two-Sample z-Procedures for Proportions

Comparing proportions from two independent groups:

  • Confidence interval: (p-hat1 - p-hat2) ± z* x SE, where SE = square root of [p-hat1(1 - p-hat1)/n1 + p-hat2(1 - p-hat2)/n2].

  • Test of H0: p1 = p2: Under H0, use the pooled proportion p-hat-pooled = (count1 + count2) / (n1 + n2) to compute SE = square root of [p-hat-pooled(1 - p-hat-pooled)(1/n1 + 1/n2)]. Test statistic: z = (p-hat1 - p-hat2) / SE.

Conditions: two independent SRSs, each sample large enough for the Normal approximation.


Core Content: Ch 9 – Analysis of Two-Way Tables

Two-Way Tables and Conditional Distributions

A two-way table cross-tabulates two categorical variables. You can compute:

  • Marginal distributions: The row totals and column totals, expressed as percentages of the grand total.

  • Conditional distributions: The distribution of one variable within a fixed level of the other (e.g. the percentage of each income bracket that voted for a given party).

Comparing conditional distributions across groups is how you spot an association between the two variables.

The Chi-Square Test for Independence

H0: The two variables are independent (no association). Ha: The two variables are associated.

Steps:

  • Compute expected counts for every cell: expected = (row total x column total) / grand total.

  • Compute the chi-square statistic: X-squared = sum of [(observed - expected) squared / expected].

  • Degrees of freedom: (number of rows - 1) x (number of columns - 1).

  • Find the p-value from the chi-square distribution. Large X-squared → small p-value → evidence of association.

Conditions: the data come from independent random samples or a randomised experiment, and all expected counts are at least 1, with no more than 20% less than 5.

Interpreting the Results

If you reject H0 (the variables are not independent), look at which cells contribute the most to X-squared to understand the nature of the association. Cells where (observed - expected) is large and positive have more observations than independence would predict; cells where it is large and negative have fewer.


Formulas and Diagrams

One-sample t-interval: x-bar ± t* x (s / square root of n), df = n - 1

One-sample t-statistic: t = (x-bar - mu0) / (s / square root of n), df = n - 1

Matched pairs: Compute differences d, then t = d-bar / (sd / square root of n), df = n - 1

Two-sample t-statistic: t = (x-bar1 - x-bar2) / square root of (s1-squared/n1 + s2-squared/n2)

Conservative df for two-sample: df = smaller of (n1 - 1) and (n2 - 1)

z-test for one proportion: z = (p-hat - p0) / square root of [p0(1 - p0) / n]

z-interval for one proportion: p-hat ± z* x square root of [p-hat(1 - p-hat) / n]

Pooled proportion (two-sample test): p-hat-pooled = (X1 + X2) / (n1 + n2)

Expected count (chi-square): (row total x column total) / grand total

Chi-square statistic: X-squared = sum of [(observed - expected) squared / expected]

Chi-square df: (rows - 1) x (columns - 1)


Real-World Applications

Economists use two-sample t-tests to compare outcomes between a treatment group and a control group in policy evaluations (e.g. does a job training programme raise average earnings?). Proportion tests appear in survey research (e.g. is the share of households below the poverty line different across two regions?). Chi-square tests are standard for analysing survey data with categorical responses (e.g. is there an association between education level and employment status?).


Common Misconceptions

  • Students use z-procedures when sigma is unknown. If sigma is unknown (it almost always is), you must use t, not z.

  • Students apply two-sample t when the data are matched pairs. If the same individuals are measured twice, use matched pairs on the differences.

  • Students forget to use the pooled proportion when testing H0: p1 = p2. The pooled estimate is required because the test assumes the two proportions are equal under H0.

  • Students check expected counts against the observed counts. The condition for the chi-square test is about expected counts, not observed counts.


Why It Matters / Exam Flags

⚠️ Distinguish clearly between one-sample, matched pairs, and two-sample designs. Exam questions will describe a scenario and expect you to choose the right procedure.

⚠️ For t-procedures, always report degrees of freedom. A one-sample t with n = 25 has df = 24.

⚠️ For proportions, know which formula to use in the denominator: p0 for a test, p-hat for an interval, p-hat-pooled for a two-sample test.

⚠️ In chi-square problems, always show the expected count calculation and check the conditions. Be prepared to identify which cells drive the result.

⚠️ State conclusions in context. "We reject H0" alone is not enough; always say what that means for the real-world question.


Quick Self-Test

  1. True or false: When sigma is unknown and n = 15, you should use the z-distribution for a confidence interval for mu. Answer: False. Use the t-distribution with df = 14.

  1. Fill in the blank: In a matched pairs design, you perform a one-sample t-test on the ___. Answer: Differences.

  1. True or false: When testing H0: p1 = p2, you use the individual sample proportions (not a pooled proportion) to compute the standard error. Answer: False. You use the pooled proportion.

  1. Fill in the blank: The degrees of freedom for a chi-square test on a 3 x 4 table are ___. Answer: (3 - 1) x (4 - 1) = 6.

  1. True or false: A large chi-square statistic provides evidence that the two variables are independent. Answer: False. A large chi-square statistic provides evidence against independence (i.e. evidence of association).


Practice Q&A

Q: A sample of 20 students has a mean exam score of 74 with s = 8. Construct a 95% confidence interval for the population mean. (Use t = 2.093 for df = 19.)*

A: 74 ± 2.093 x (8 / square root of 20) = 74 ± 2.093 x 1.789 = 74 ± 3.74. The interval is (70.26, 77.74).

Q: Ten runners record their 5K times before and after a training programme. The mean of the differences (before minus after) is 1.2 minutes with sd = 0.8. Test H0: mu-d = 0 vs. Ha: mu-d > 0 at alpha = 0.05. (t for one-sided 0.05 with df = 9 is approximately 1.833.)*

A: t = 1.2 / (0.8 / square root of 10) = 1.2 / 0.253 = 4.74. Since 4.74 > 1.833, reject H0. There is strong evidence that the training programme reduced 5K times.

Q: In a survey, 120 out of 400 people in City A and 90 out of 300 in City B support a policy. Test H0: p1 = p2 vs. Ha: p1 ≠ p2 at alpha = 0.05.

A: p-hat1 = 120/400 = 0.30, p-hat2 = 90/300 = 0.30. p-hat-pooled = (120 + 90) / (400 + 300) = 210/700 = 0.30. SE = square root of [0.30 x 0.70 x (1/400 + 1/300)] = square root of [0.21 x 0.00583] = square root of 0.001225 = 0.035. z = (0.30 - 0.30) / 0.035 = 0. P-value = 1.0. Do not reject H0. There is no evidence of a difference.

Q: A 2 x 3 two-way table has a chi-square statistic of 11.2. How many degrees of freedom does the test have, and is the result significant at alpha = 0.05? (Chi-square critical value at df = 2 and alpha = 0.05 is 5.991.)

A: df = (2 - 1) x (3 - 1) = 2. Since 11.2 > 5.991, the result is significant at the 5% level. There is evidence of an association between the two variables.


(This section intentionally left blank.)


Connections to Other Topics

The t-procedures in Chapter 7 are a direct extension of the z-procedures from Chapter 6, with the t-distribution replacing the Normal when sigma is unknown. The proportion inference in Chapter 8 uses the same CLT logic from Chapter 5 applied to p-hat rather than x-bar. The chi-square test in Chapter 9 is conceptually similar to a hypothesis test: you compare observed data to what you would expect under H0 (independence). Understanding Chapter 6's hypothesis-testing framework is essential for all three of these chapters.


Related Terms / Search Tags

t-distribution, t-test, t-interval, degrees of freedom, one-sample t, matched pairs, two-sample t, Welch t-test, pooled t-test, sample proportion, z-test for proportion, z-interval for proportion, plus-four interval, two-sample proportion test, pooled proportion, chi-square, chi-square test for independence, chi-square goodness-of-fit, two-way table, contingency table, expected count, observed count, marginal distribution, conditional distribution, association, ECON 2500, introductory statistics for economists