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
462548P = ?

The battery lifetimes are normally distributed with mean 500 h and standard deviation 40 h. What fraction lies between 462 and 548 h? Give P as a decimal.

μ = 500σ = 40x1 = 462x2 = 548
P =
2.Normal distributionHard
μ = 178x = ?97.5%

The heights of adult men are normally distributed with mean 178 cm and standard deviation 7 cm. Find the value x below which 97.5% of them lie (the 97.5th percentile).

μ = 178σ = 7P = 97.5%
x = cm
3.Confidence intervalsMedium
n = 9, sd​ = 7.50L = ?Ud̄ = 0.5E90%

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

n = 9d̄ = 0.5sd = 7.590%t(8) = 1.86
lower limit = mmHg
4.Confidence intervalsHard
μ₁ − μ₂, t(29) = 2.0450LU = ?x̄₁ − x̄₂E95%

Two fertilisers are tested. Plot group 1: 13 plots, mean yield 37.5 kg, standard deviation 3.5 kg. Plot group 2: 18 plots, mean 40.5 kg, standard deviation 2.5 kg. Assume equal variances (pooled t, df = n₁ + n₂ − 2). Find the upper limit of the 95% confidence interval for μ₁ − μ₂.

n₁ = 13x̄₁ = 37.5s₁ = 3.5n₂ = 18x̄₂ = 40.5s₂ = 2.595%t(29) = 2.045
upper limit = kg
5.Hypothesis tests & confidence intervalsMedium
−1.961.96z = ?

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

n₁ = 80x̄₁ = 65.5 mmσ₁ = 11 mmn₂ = 30x̄₂ = 73.7 mmσ₂ = 14 mm
z =
6.Hypothesis tests & confidence intervalsHard
μ₀x̄c

A one-sided z test of H₀: μ = 100 against H₁: μ < 100 is done at α = 0.10 with a sample of 25; the standard deviation is known to be 10. In reality the mean is 94.6. Find the power 1 − β of the test in percent.

μ₀ = 100μ = 94.6σ = 10n = 25α = 0.10
1 − β = %
7.Linear regression & correlationMedium
xy353458566667782883xy468607080

The table gives 6 paired observations of x = hours studied and y = exam score. Their sums are given. Find Pearson's correlation coefficient r from these sums.

n = 6Σx = 33Σy = 409Σx² = 199Σy² = 28631Σxy = 2361
r =
8.Linear regression & correlationHard
xy284146238271037xy51010203040x = 5

The table gives 5 paired observations of x = load in kN and y = extension in mm. Use the least-squares line ŷ = a + b·x. Predict ŷ for x = 5.

n = 5x = 5
ŷ =
9.Chi-square testsMedium
improvednot improvedTotalnew drug334780placebo4852100Total8199180

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
passfailTotalline 1453580line 2433780line 3122840Total100100200dfα = 0.05α = 0.0113.8416.63525.9919.21037.81511.34549.48813.277511.07015.086612.59216.812714.06718.475815.50720.090916.91921.6661018.30723.209

The table shows observed counts. Test at α = 0.05 whether the two variables are independent (no continuity correction). Compute the test statistic χ², then compare it with the critical value from the table.

N = 2003 × 2α = 0.05
χ² =

3Solutions

1.Normal distribution

Answer: P = 0.7139

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₁ = (462 − 500)/40 = −0.95
z₂ = (548 − 500)/40 = 1.2

Area between

P = Φ(1.2) − Φ(−0.95) = 0.8849 − 0.1711 = 0.7139

Answer

P = 0.7139
2.Normal distribution

Answer: x = 191.7 cm

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.975 → z = 1.96

Back to x

x = 178 + 1.96·7 = 191.72 cm

Answer

x = 191.72 cm
3.Confidence intervals

Answer: lower limit = −4.15 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 = 8, t = 1.86

Margin of error

E = 1.86·7.5/√9 = 4.65

Interval

0.5 ± 4.65 → [−4.15, 5.15]

Answer

lower limit = −4.15 mmHg
4.Confidence intervals

Answer: upper limit = −0.8004 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² = (12·3.5² + 17·2.5²)/29 = 8.733
sp = 2.955

Margin of error

E = 2.045·2.955·√(1/13 + 1/18) = 2.2

Interval

−3 ± 2.2 → [−5.2, −0.8004]

Answer

upper limit = −0.8004 kg
5.Hypothesis tests & confidence intervals

Answer: z = −2.891

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 = √(11²/80 + 14²/30) = √8.046 = 2.837

Test statistic

z = (65.5 − 73.7)/2.837 = −2.891

Answer

z = −2.891

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

6.Hypothesis tests & confidence intervals

Answer: 1 − β = 92.19 %

Power of a test: power = 1 − β is the probability of rejecting H₀ when it is false. Find the cutoff x̄c from μ₀ and z_α, then compute the probability of landing beyond x̄c using the true mean: z = (x̄c − μ)/(σ/√n).

Critical sample mean

SE = 10/√25 = 2
x̄c = 100 − 1.282·2 = 97.44

z under the true mean

z = (97.44 − 94.6)/2 = 1.418

Power

power = P(Z < 1.418) = 92.19%
1 − β = 92.19%

Answer

1 − β = 92.19%
7.Linear regression & correlation

Answer: r = 0.9727

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.

Centred sums

Sxy = 2361 − 33·409/6 = 111.5
Sxx = 199 − 33²/6 = 17.5
Syy = 28631 − 409²/6 = 750.8

Correlation coefficient

r = 111.5/√(17.5·750.8) = 0.9727

Answer

r = 0.9727
8.Linear regression & correlation

Answer: ŷ = 18.25

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
ȳ = 109/5 = 21.8

Sums of squares and products

Sxx = Σ(x − x̄)² = 40
Sxy = Σ(x − x̄)(y − ȳ) = 142

Regression line

b = 142/40 = 3.55
a = 21.8 − 3.55·6 = 0.5
ŷ = 0.5 + 3.55·x

Prediction

ŷ = 0.5 + 3.55·5 = 18.25

Answer

ŷ = 18.25
9.Chi-square tests

Answer: χ² = 0.8182

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

new drug: 80·81/180 = 36, 80·99/180 = 44
placebo: 100·81/180 = 45, 100·99/180 = 55

Chi-square statistic

χ² = (33 − 36)²/36 + (47 − 44)²/44 + (48 − 45)²/45 + (52 − 55)²/55
χ² = 0.8182

Answer

χ² = 0.8182

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

10.Chi-square tests

Answer: χ² = 8.1

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

line 1: 40, 40
line 2: 40, 40
line 3: 20, 20

Chi-square statistic

χ² = (45 − 40)²/40 + (35 − 40)²/40 + (43 − 40)²/40 + (37 − 40)²/40 + (12 − 20)²/20 + (28 − 20)²/20
χ² = 8.1

Decision

df = 2, χ²crit = 5.991
8.1 > 5.991

Answer

χ² = 8.1

χ² is above the critical value, so H₀ is rejected: the variables appear to be related.

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