Statistics 2: Statistical Inference: cram pack

Formula sheets, the key method steps for every topic and 10 practice problems, with full solutions at the back.

New problemsBack to the course

In the print window, choose “Save as PDF” to keep a copy on your device.

1Formulas and methods

Normal distribution

z-score
z = (x − μ)/σ
Below x
P(X < x) = Φ(z)
Above x
P(X > x) = 1 − Φ(z)
Between
Φ(z2) − Φ(z1)
Percentile
x = μ + z·σ

Method

  1. Convert the value to a z-score: z = (x − μ)/σ.
  2. Look up Φ(z), the area to the left of z.
  3. For the area to the right use 1 − Φ(z); for an interval subtract the two left areas.
  4. For a percentile, work backwards: find z for the area, then x = μ + z·σ.

Confidence intervals

σ known
x̄ ± z·σ/√n
σ unknown
x̄ ± t·s/√n, df = n − 1
Critical z
90%: 1.645, 95%: 1.96, 99%: 2.576
Sample size
n = (z·σ/E)², rounded up

Method

  1. Decide between z (population σ known) and t (only the sample s, with n − 1 degrees of freedom).
  2. Find the critical value for the confidence level.
  3. Margin of error: E = critical value × standard deviation/√n.
  4. Interval: x̄ ± E.

Hypothesis tests & confidence intervals

z-test for a mean
z = (x̄ − μ0)/(σ/√n)
t-test for a mean
t = (x̄ − μ0)/(s/√n), df = n − 1
Two-sided at 5%
reject H0 if |z| > 1.96
Confidence interval
x̄ ± z·σ/√n

Method

  1. State H₀ and H₁ and decide whether the test is one- or two-sided.
  2. Calculate the test statistic: (x̄ − μ₀)/(σ/√n), or with s and t.
  3. Compare with the critical value, or find the p-value.
  4. Reject H₀ if the statistic is beyond the critical value (p below α), and state the conclusion in words.

Linear regression & correlation

Sums of squares
Sxx = Σ(x − x̄)² = Σx² − (Σx)²/n, Sxy = Σxy − ΣxΣy/n
Slope
b = Sxy/Sxx
Intercept
a = ȳ − b·x̄
Correlation
r = Sxy/√(SxxSyy)
Residual
e = y − ŷ

Chi-square tests

Test statistic
χ² = Σ(O − E)²/E
Goodness of fit
E = n·p, df = k − 1 − (estimated parameters)
Independence
E = row total × column total / grand total, df = (r − 1)(c − 1)
Critical values (α = 0.05)
df 1: 3.841, 2: 5.991, 3: 7.815, 4: 9.488
Decision
reject H0 if χ² > χ²crit

2Practice problems

1.Normal distributionMedium
248.5257.5P = ?

The bag weights are normally distributed with mean 250 g and standard deviation 5 g. What fraction lies between 248.5 and 257.5 g? Give P as a decimal.

μ = 250σ = 5x1 = 248.5x2 = 257.5
P =
2.Normal distributionHard
μ = 32x = ?95%

The delivery times are normally distributed with mean 32 min and standard deviation 6 min. Find the value x below which 95% of them lie (the 95th percentile).

μ = 32σ = 6P = 95%
x = min
3.Confidence intervalsMedium
n = 16, sd​ = 0.60L = ?Ud̄ = 2.5E95%

The blood pressure of 16 patients is measured before and after a treatment. The differences d = before − after (mmHg) have mean 2.5 and standard deviation 0.6. Find the lower limit of the 95% confidence interval for the mean difference.

n = 16d̄ = 2.5sd = 0.695%t(15) = 2.131
lower limit = mmHg
4.Confidence intervalsHard
μ₁ − μ₂, t(14) = 2.1450L = ?Ux̄₁ − x̄₂E95%

Two fertilisers are tested. Plot group 1: 5 plots, mean yield 94 kg, standard deviation 9.5 kg. Plot group 2: 11 plots, mean 101 kg, standard deviation 7 kg. Assume equal variances (pooled t, df = n₁ + n₂ − 2). Find the lower limit of the 95% confidence interval for μ₁ − μ₂.

n₁ = 5x̄₁ = 94s₁ = 9.5n₂ = 11x̄₂ = 101s₂ = 795%t(14) = 2.145
lower limit = kg
5.Hypothesis tests & confidence intervalsMedium
−1.961.96z = ?

Two production lines make the same part. Line 1: a sample of 60 parts has mean length 125 mm, and the line's known standard deviation is 18 mm. Line 2: a sample of 40 parts has mean 118.4 mm, known standard deviation 3 mm. Find the test statistic z for H₀: μ₁ = μ₂, taking the difference as x̄₁ − x̄₂ (line 1 minus line 2).

n₁ = 60x̄₁ = 125 mmσ₁ = 18 mmn₂ = 40x̄₂ = 118.4 mmσ₂ = 3 mm
z =
6.Hypothesis tests & confidence intervalsHard
σ = 10, n = ?x̄ − Ex̄ + Ex̄E = 290%

How large must a sample be so that the 90% confidence interval for a mean has a margin of error of at most 2? The standard deviation is 10. Find the smallest sample size n.

σ = 10E = 290%
n =
7.Linear regression & correlationMedium
xy25046668389210105xy5106080100

The table gives 5 paired observations of x = hours studied and y = exam score. Find Pearson's correlation coefficient r.

n = 5
r =
8.Linear regression & correlationHard
xy36257478891011111313122xy5106080100120ŷ = 94

The table gives 6 paired observations of x = hours studied and y = exam score. Use the least-squares line ŷ = a + b·x. For which value x does the line predict ŷ = 94?

n = 6ŷ = 94
x =
9.Chi-square testsMedium
yesnoTotalmen362460women9030120Total12654180

The contingency table shows observed counts. Compute the chi-square statistic χ² for the test of independence between the row and column variables. Do not use a continuity correction.

N = 1802 × 2
χ² =
10.Chi-square testsHard

A chi-square goodness-of-fit test compares observed counts in 9 categories with fully specified expected proportions (no parameters are estimated from the data). How many degrees of freedom df does the test have?

k = 9
df =

3Solutions

1.Normal distribution

Answer: P = 0.5511

Normal distribution: convert a value x to a z-score, z = (x − μ)/σ, which counts standard deviations from the mean. A z-table (or Φ(z)) gives the area to the left of z, which is P(X < x). The area to the right is 1 − Φ(z), and the area between two values is the difference of their two areas.

z-scores

z₁ = (248.5 − 250)/5 = −0.3
z₂ = (257.5 − 250)/5 = 1.5

Area between

P = Φ(1.5) − Φ(−0.3) = 0.9332 − 0.3821 = 0.5511

Answer

P = 0.5511
2.Normal distribution

Answer: x = 41.87 min

Normal distribution: convert a value x to a z-score, z = (x − μ)/σ, which counts standard deviations from the mean. A z-table (or Φ(z)) gives the area to the left of z, which is P(X < x). The area to the right is 1 − Φ(z), and the area between two values is the difference of their two areas.

z for the percentile

Φ(z) = 0.95 → z = 1.645

Back to x

x = 32 + 1.645·6 = 41.87 min

Answer

x = 41.87 min
3.Confidence intervals

Answer: lower limit = 2.18 mmHg

Interval for a difference: estimate ± critical value × standard error. For two independent means with known σ: SE = √(σ₁²/n₁ + σ₂²/n₂) and z. With equal unknown variances: pooled s_p and t with n₁ + n₂ − 2 degrees of freedom. For paired data, work with the differences: d̄ ± t·s_d/√n.

Critical value

df = 15, t = 2.131

Margin of error

E = 2.131·0.6/√16 = 0.3196

Interval

2.5 ± 0.3196 → [2.18, 2.82]

Answer

lower limit = 2.18 mmHg
4.Confidence intervals

Answer: lower limit = −16.02 kg

Interval for a difference: estimate ± critical value × standard error. For two independent means with known σ: SE = √(σ₁²/n₁ + σ₂²/n₂) and z. With equal unknown variances: pooled s_p and t with n₁ + n₂ − 2 degrees of freedom. For paired data, work with the differences: d̄ ± t·s_d/√n.

Pooled standard deviation

sp² = (4·9.5² + 10·7²)/14 = 60.79
sp = 7.797

Margin of error

E = 2.145·7.797·√(1/5 + 1/11) = 9.02

Interval

−7 ± 9.02 → [−16.02, 2.02]

Answer

lower limit = −16.02 kg
5.Hypothesis tests & confidence intervals

Answer: z = 2.783

Hypothesis test: the test statistic = (estimate − value under H₀)/(standard error under H₀). The p-value is the probability, assuming H₀ is true, of a statistic at least as extreme as the one observed: the area in one tail for a one-sided H₁, twice the tail area for a two-sided H₁. Reject H₀ when p ≤ α.

Standard error of the difference

SE = √(18²/60 + 3²/40) = √5.625 = 2.372

Test statistic

z = (125 − 118.4)/2.372 = 2.783

Answer

z = 2.783

|z| > 1.96, so H₀ is rejected at the 5% level (two-sided).

6.Hypothesis tests & confidence intervals

Answer: n = 68

Testing a mean: the test statistic measures how many standard errors the sample mean lies from the value claimed in H₀: z = (x̄ − μ₀)/(σ/√n) when σ is known, t = (x̄ − μ₀)/(s/√n) when it is estimated from the sample. A confidence interval is x̄ ± (critical value)·(standard error).

Solve for n

n = (1.645·10/2)² = 67.65

Round up

n = 68

Answer

n = 68
7.Linear regression & correlation

Answer: r = 0.9943

Least-squares regression: with x̄ and ȳ the means, Sxx = Σ(x − x̄)², Syy = Σ(y − ȳ)² and Sxy = Σ(x − x̄)(y − ȳ), the line ŷ = a + b·x has slope b = Sxy/Sxx and intercept a = ȳ − b·x̄, so it always passes through (x̄, ȳ). Pearson's correlation coefficient r = Sxy/√(Sxx·Syy) lies between −1 and 1; r² is the fraction of the variation in y explained by the line.

Means

x̄ = 30/5 = 6
ȳ = 396/5 = 79.2

Sums of squares and products

Sxx = Σ(x − x̄)² = 40
Sxy = Σ(x − x̄)(y − ȳ) = 272
Syy = Σ(y − ȳ)² = 1871

Correlation coefficient

r = 272/√(40·1871) = 0.9943

Answer

r = 0.9943
8.Linear regression & correlation

Answer: x = 8.109

Least-squares regression: with x̄ and ȳ the means, Sxx = Σ(x − x̄)², Syy = Σ(y − ȳ)² and Sxy = Σ(x − x̄)(y − ȳ), the line ŷ = a + b·x has slope b = Sxy/Sxx and intercept a = ȳ − b·x̄, so it always passes through (x̄, ȳ). Pearson's correlation coefficient r = Sxy/√(Sxx·Syy) lies between −1 and 1; r² is the fraction of the variation in y explained by the line.

Means

x̄ = 48/6 = 8
ȳ = 560/6 = 93.33

Sums of squares and products

Sxx = Σ(x − x̄)² = 70
Sxy = Σ(x − x̄)(y − ȳ) = 430

Regression line

b = 430/70 = 6.143
a = 93.33 − 6.143·8 = 44.19
ŷ = 44.19 + 6.143·x

Solve for x

x = (94 − 44.19)/6.143 = 8.109

Answer

x = 8.109
9.Chi-square tests

Answer: χ² = 4.286

Chi-square tests: compare observed counts O with the counts E expected under H₀ using χ² = Σ(O − E)²/E. Goodness of fit: E = n·p for each category, df = k − 1 (minus one more for each parameter estimated from the data). Independence in an r × c table: E = row total × column total / grand total, df = (r − 1)(c − 1). Reject H₀ when χ² exceeds the critical value for the chosen α.

Expected counts

men: 60·126/180 = 42, 60·54/180 = 18
women: 120·126/180 = 84, 120·54/180 = 36

Chi-square statistic

χ² = (36 − 42)²/42 + (24 − 18)²/18 + (90 − 84)²/84 + (30 − 36)²/36
χ² = 4.286

Answer

χ² = 4.286

df = 1. At α = 0.05 the critical value is 3.841, so H₀ (independence) is rejected.

10.Chi-square tests

Answer: df = 8

Chi-square tests: compare observed counts O with the counts E expected under H₀ using χ² = Σ(O − E)²/E. Goodness of fit: E = n·p for each category, df = k − 1 (minus one more for each parameter estimated from the data). Independence in an r × c table: E = row total × column total / grand total, df = (r − 1)(c − 1). Reject H₀ when χ² exceeds the critical value for the chosen α.

Degrees of freedom

df = 9 − 1 = 8

Answer

df = 8

ExamProblems · examproblems.com/courses/statistics-2-inference