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
72 kg73 kgT = X₁ + … + X₆?

The masses of boxes are independent and normal with mean 12 kg and standard deviation 0.8 kg. Find the probability P that the total mass of 6 of them is below 73 kg. Round z to two decimals.

μ = 12 kgσ = 0.8 kgn = 6< 73 kg
P =
2.Normal distributionHard
380420460500540580620hbottom 15%

The battery lifetimes are normally distributed with mean 500 h and standard deviation 40 h. Drag the cut-off so the shaded bottom 15% is to the left of it. Find the cut-off x.

μ = 500 hσ = 40 h15%
x = h
3.Confidence intervalsMedium
μ₁ − μ₂0L = ?Ux̄₁ − x̄₂E99%

The battery life of two phone models is compared. Model 1: 50 phones, mean 79 h, known standard deviation 3 h. Model 2: 100 phones, mean 76.5 h, known standard deviation 17 h. Find the lower limit of the 99% confidence interval for μ₁ − μ₂.

n₁ = 50x̄₁ = 79 hσ₁ = 3 hn₂ = 100x̄₂ = 76.5 hσ₂ = 17 h99%
lower limit = h
4.Confidence intervalsHard
μ₁ − μ₂, t(24) = 1.7110LU = ?x̄₁ − x̄₂E90%

Two fertilisers are tested. Plot group 1: 12 plots, mean yield 11.5 kg, standard deviation 2 kg. Plot group 2: 14 plots, mean 6 kg, standard deviation 7 kg. Assume equal variances (pooled t, df = n₁ + n₂ − 2). Find the upper limit of the 90% confidence interval for μ₁ − μ₂.

n₁ = 12x̄₁ = 11.5s₁ = 2n₂ = 14x̄₂ = 6s₂ = 790%t(24) = 1.711
upper limit = kg
5.Hypothesis tests & confidence intervalsMedium
−2.2622.262t = ?df = 9

10 employees take a typing test before and after a training course. For each person the difference d = after − before (words per minute) is recorded. The mean difference is 9.18 and the standard deviation of the differences is 8.8. Find the paired test statistic t for H₀: μd = 0.

n = 10d̄ = 9.18sd = 8.8
t =
6.Hypothesis tests & confidence intervalsHard
σ = 10, n = ?x̄ − Ex̄ + Ex̄E = 295%

How large must a sample be so that the 95% 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 = 295%
n =
7.Linear regression & correlationMedium
xy2645698151015xy51051015

The table gives 5 paired observations of x = load in kN and y = extension in mm. Find the coefficient of determination r² of the least-squares line.

n = 5
r² =
8.Linear regression & correlationHard
xy12221931841751268xy246101520ŷ = 21

The table gives 6 paired observations of x = car age in years and y = price in k€. Use the least-squares line ŷ = a + b·x. For which value x does the line predict ŷ = 21?

n = 6ŷ = 21
x =
9.Chi-square testsMedium
improvednot improvedTotalnew drug334780placebo303060Total6377140

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 = 1402 × 2
χ² =
10.Chi-square testsHard
dfα = 0.05α = 0.0113.8416.63525.9919.21037.81511.34549.48813.277511.07015.086612.59216.812714.06718.475815.50720.090916.91921.6661018.30723.209

A chi-square goodness-of-fit test compares observed counts in 8 categories with fully specified expected proportions (no parameters are estimated from the data). Using the table, find the critical value χ²crit at significance level α = 0.01.

α = 0.01
χ²crit =

3Solutions

1.Normal distribution

Answer: P = 0.695

Sums and differences of normal variables: if X and Y are independent and normal, X + Y and X − Y are normal too. Means add or subtract: E(X ± Y) = μX ± μY. Variances always add, also for a difference: Var(X ± Y) = σX² + σY², so σ = √(σX² + σY²). Standard deviations never add directly. The total of n independent items with the same distribution has mean n·μ and standard deviation σ·√n. Then standardise as usual: z = (x − mean)/σ and read Φ(z).

Distribution of the total

μT = 72 kg, σT = 0.8·√6 = 1.96 kg

Standardise

z = (73 − 72)/1.96 = 0.51

Probability

P = Φ(0.51) = 0.695

Answer

P = 0.695
2.Normal distribution

Answer: x = 458 h

From an area back to z: Φ(z) is the area to the left of z. For a left-tail area A, find z with Φ(z) = A in the table. A right-tail area A means Φ(z) = 1 − A. A central area A between −z and z leaves (1 − A)/2 in each tail, so Φ(z) = (1 + A)/2. For a value x, use x = μ + zσ.

Area to the left

Φ(z) = 0.15

z from the table

z ≈ −1.04

Back to the original units

x = 500 − 1.04·40 = 458 h

Answer

x = 458 h
3.Confidence intervals

Answer: lower limit = −2.014 h

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.

Point estimate

x̄₁ − x̄₂ = 79 − 76.5 = 2.5

Standard error

SE = √(3²/50 + 17²/100) = 1.752

Margin of error

E = 2.576·1.752 = 4.514

Interval

2.5 ± 4.514 → [−2.014, 7.014]

Answer

lower limit = −2.014 h

The interval contains 0, so the data do not show a significant difference.

4.Confidence intervals

Answer: upper limit = 9.086 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² = (11·2² + 13·7²)/24 = 28.38
sp = 5.327

Margin of error

E = 1.711·5.327·√(1/12 + 1/14) = 3.586

Interval

5.5 ± 3.586 → [1.914, 9.086]

Answer

upper limit = 9.086 kg
5.Hypothesis tests & confidence intervals

Answer: t = 3.299

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

Standard error of the mean difference

SE = 8.8/√10 = 2.783

Test statistic

t = 9.18/2.783 = 3.299

Answer

t = 3.299

With df = 9, the two-sided 5% critical value is 2.262; |t| is larger, so H₀ is rejected.

6.Hypothesis tests & confidence intervals

Answer: n = 97

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.96·10/2)² = 96.04

Round up

n = 97

Answer

n = 97
7.Linear regression & correlation

Answer: r² = 0.8522

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
ȳ = 50/5 = 10

Sums of squares and products

Sxx = Σ(x − x̄)² = 40
Sxy = Σ(x − x̄)(y − ȳ) = 56
Syy = Σ(y − ȳ)² = 92

Coefficient of determination

r² = 56²/(40·92) = 0.8522

Answer

r² = 0.8522

About 85.22% of the variation in y is explained by the line.

8.Linear regression & correlation

Answer: x = 1.598

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̄ = 21/6 = 3.5
ȳ = 96/6 = 16

Sums of squares and products

Sxx = Σ(x − x̄)² = 17.5
Sxy = Σ(x − x̄)(y − ȳ) = −46

Regression line

b = −46/17.5 = −2.629
a = 16 − (−2.629)·3.5 = 25.2
ŷ = 25.2 − 2.629·x

Solve for x

x = (21 − 25.2)/(−2.629) = 1.598

Answer

x = 1.598
9.Chi-square tests

Answer: χ² = 1.061

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·63/140 = 36, 80·77/140 = 44
placebo: 60·63/140 = 27, 60·77/140 = 33

Chi-square statistic

χ² = (33 − 36)²/36 + (47 − 44)²/44 + (30 − 27)²/27 + (30 − 33)²/33
χ² = 1.061

Answer

χ² = 1.061

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

10.Chi-square tests

Answer: χ²crit = 18.48

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 = 8 − 1 = 7

Table

χ²crit(df = 7, α = 0.01) = 18.475

Answer

χ²crit = 18.475

Reject H₀ if the computed χ² is larger than this value.

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