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
105 s111.4 sX + Y?

X is normal with mean 60 s and standard deviation 5 s; Y is independent and normal with mean 45 s and standard deviation 4 s. Find the probability P that X + Y is more than 111.4 s. Round z to two decimals.

μX = 60, σX = 5μY = 45, σY = 4X + Y > 111.4 s
P =
2.Normal distributionHard
0.03 mm0D − d?

Hole diameters D are normal with mean 25.03 mm and standard deviation 0.02 mm. Shaft diameters d are independent and normal with mean 25 mm and standard deviation 0.01 mm. A randomly chosen shaft fits when D − d > 0. Find the probability P that it fits. Round z to two decimals.

hole: μ = 25.03 mm, σ = 0.02 mmshaft: μ = 25 mm, σ = 0.01 mm
P =
3.Confidence intervalsMedium
μ₁ − μ₂0LU = ?x̄₁ − x̄₂E99%

The battery life of two phone models is compared. Model 1: 40 phones, mean 120 h, known standard deviation 13 h. Model 2: 80 phones, mean 123.5 h, known standard deviation 5 h. Find the upper limit of the 99% confidence interval for μ₁ − μ₂.

n₁ = 40x̄₁ = 120 hσ₁ = 13 hn₂ = 80x̄₂ = 123.5 hσ₂ = 5 h99%
upper limit = h
4.Confidence intervalsHard
n = 20Lσ = ?s = 695%

The diameters of 20 machined shafts have a sample standard deviation of 6 µm. Assuming the diameters are normally distributed, find the upper limit σ of the 95% confidence interval for the population standard deviation. With df = 19, 2.5% of the χ² distribution lies below 8.907 and 2.5% lies above 32.852.

n = 20s = 6 µmχ² = 8.907, 32.852
σ = µm
5.Hypothesis tests & confidence intervalsMedium
−1.961.96z = ?

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

n₁ = 100x̄₁ = 49.5 mmσ₁ = 8 mmn₂ = 80x̄₂ = 53.7 mmσ₂ = 12 mm
z =
6.Hypothesis tests & confidence intervalsHard
H₀H₁μ₀x̄cμ₀ + 3α = 0.05βσ = 25, power 95%, n = ?

A one-sided z test at α = 0.05 must detect a shift of the mean of 3 units with a power of 95%. The standard deviation is 25. Find the minimum sample size n.

α = 0.05power = 95%δ = 3σ = 25zα = 1.645zβ = 1.645
n =
7.Linear regression & correlationMedium
xy126224324419520615xy246152025

The table gives 6 paired observations of x = car age in years and y = price in k€. Find the coefficient of determination r² of the least-squares line.

n = 6
r² =
8.Linear regression & correlationHard
xy3515637659851194xy5106080x = 4

The table gives 5 paired observations of x = hours studied and y = exam score. Use the least-squares line ŷ = a + b·x. Predict ŷ for x = 4.

n = 5x = 4
ŷ =
9.Chi-square testsMedium
no defectminormajorTotalday shift162777120night shift24332380Total4060100200

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 = 2002 × 3
χ² =
10.Chi-square testsHard

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

k = 7
df =

3Solutions

1.Normal distribution

Answer: P = 0.1587

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 sum

μ = 105 s, σ = √(5² + 4²) = 6.403 s

Standardise

z = (111.4 − 105)/6.403 = 1

Upper tail

P = 1 − Φ(1) = 1 − 0.8413 = 0.1587

Answer

P = 0.1587
2.Normal distribution

Answer: P = 0.9099

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 difference

μ = 25.03 − 25 = 0.03 mm, σ = 0.02236 mm

Standardise

z = (0 − 0.03)/0.02236 = −1.34

Probability

P = 1 − Φ(−1.34) = 0.9099

Answer

P = 0.9099
3.Confidence intervals

Answer: upper limit = 1.987 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̄₂ = 120 − 123.5 = −3.5

Standard error

SE = √(13²/40 + 5²/80) = 2.13

Margin of error

E = 2.576·2.13 = 5.487

Interval

−3.5 ± 5.487 → [−8.987, 1.987]

Answer

upper limit = 1.987 h

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

4.Confidence intervals

Answer: σ = 8.763 µm

Interval for a variance: (n − 1)s²/σ² has a χ² distribution with n − 1 degrees of freedom. The 95% interval for σ² runs from (n − 1)s² divided by the upper χ² value (2.5% above it) to (n − 1)s² divided by the lower χ² value (2.5% below it); the interval for σ is the square root of both limits. It is not symmetric around s.

Sum of squares

(n − 1)s² = 19·6² = 684

Limits for σ²

684/32.852 = 20.82
684/8.907 = 76.79

Limit for σ

σ = √76.79 = 8.763 µm

Answer

σ = 8.763 µm

95% interval for σ: [4.563, 8.763] µm.

5.Hypothesis tests & confidence intervals

Answer: z = −2.689

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 = √(8²/100 + 12²/80) = √2.44 = 1.562

Test statistic

z = (49.5 − 53.7)/1.562 = −2.689

Answer

z = −2.689

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

6.Hypothesis tests & confidence intervals

Answer: n = 752

Sample size for a test: to detect a true shift δ with power 1 − β in a one-sided z test at level α, the standard error must satisfy δ = (z_α + z_β)·σ/√n, so n = ((z_α + z_β)·σ/δ)², rounded up.

Solve for n

n = ((1.645 + 1.645)·25/3)² = 751.7

Round up

n = 752

Answer

n = 752
7.Linear regression & correlation

Answer: r² = 0.8887

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
ȳ = 128/6 = 21.33

Sums of squares and products

Sxx = Σ(x − x̄)² = 17.5
Sxy = Σ(x − x̄)(y − ȳ) = −36
Syy = Σ(y − ȳ)² = 83.33

Coefficient of determination

r² = −36²/(17.5·83.33) = 0.8887

Answer

r² = 0.8887

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

8.Linear regression & correlation

Answer: ŷ = 55.4

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̄ = 35/5 = 7
ȳ = 358/5 = 71.6

Sums of squares and products

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

Regression line

b = 216/40 = 5.4
a = 71.6 − 5.4·7 = 33.8
ŷ = 33.8 + 5.4·x

Prediction

ŷ = 33.8 + 5.4·4 = 55.4

Answer

ŷ = 55.4
9.Chi-square tests

Answer: χ² = 24.33

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

day shift: 120·40/200 = 24, 120·60/200 = 36, 120·100/200 = 60
night shift: 80·40/200 = 16, 80·60/200 = 24, 80·100/200 = 40

Chi-square statistic

χ² = (16 − 24)²/24 + (27 − 36)²/36 + (77 − 60)²/60 + (24 − 16)²/16 + (33 − 24)²/24 + (23 − 40)²/40
χ² = 24.33

Answer

χ² = 24.33

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

10.Chi-square tests

Answer: df = 6

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

Answer

df = 6

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