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
200 mm201 mmX + Y?

X is normal with mean 120 mm and standard deviation 0.3 mm; Y is independent and normal with mean 80 mm and standard deviation 0.4 mm. Find the probability P that X + Y is more than 201 mm. Round z to two decimals.

μX = 120, σX = 0.3μY = 80, σY = 0.4X + Y > 201 mm
P =
2.Normal distributionHard
4 s0X − Y?

Runner A's lap time X and runner B's lap time Y are independent and normal: X has mean 52 s and standard deviation 4 s, Y has mean 48 s and standard deviation 3 s. Find the probability P that X is greater than Y. Round z to two decimals.

μX = 52 s, σX = 4 sμY = 48 s, σY = 3 s
P =
3.Confidence intervalsMedium
x̄E₁ = 8.295%, n = 25x̄E₂ = ?99%, n = 25

A 95% confidence interval for a mean, based on 25 observations and a known σ, has a margin of error of 8.2. What is the margin of error E₂ of a 99% interval from the same data?

95%n₁ = 25E₁ = 8.299%
E₂ =
4.Confidence intervalsHard
μ₁ − μ₂, t(24) = 2.7970L = ?Ux̄₁ − x̄₂E99%

Two fertilisers are tested. Plot group 1: 10 plots, mean yield 84.5 kg, standard deviation 6.5 kg. Plot group 2: 16 plots, mean 80.5 kg, standard deviation 9.5 kg. Assume equal variances (pooled t, df = n₁ + n₂ − 2). Find the lower limit of the 99% confidence interval for μ₁ − μ₂.

n₁ = 10x̄₁ = 84.5s₁ = 6.5n₂ = 16x̄₂ = 80.5s₂ = 9.599%t(24) = 2.797
lower limit = kg
5.Hypothesis tests & confidence intervalsMedium
t −2.06402.064

A sample of 25 students has a mean score of 201.9 and a sample standard deviation of 8. Find the test statistic t for H₀: μ = 200.

μ₀ = 200x̄ = 201.9s = 8n = 25
t =
6.Hypothesis tests & confidence intervalsHard
z −2.57602.576

A sample of 64 measurements has mean 50.7. The population standard deviation is 5. Find the upper limit U of the 99% confidence interval for the mean.

x̄ = 50.7σ = 5n = 6499%
U =
7.Linear regression & correlationMedium
xy134231338440543648xy246304050

The table gives 6 paired observations of x = advertising spend in k€ and y = sales in k€. Find Pearson's correlation coefficient r.

n = 6
r =
8.Linear regression & correlationHard
xy145316661874207222822490xy1520256080ŷ = 60

The table gives 6 paired observations of x = temperature in °C and y = ice creams sold. Use the least-squares line ŷ = a + b·x. For which value x does the line predict ŷ = 60?

n = 6ŷ = 60
x =
9.Chi-square testsMedium
no defectminormajorTotalday shift214437102night shift11313476Total327571178

The contingency table shows observed counts. For a chi-square test of independence, find the expected count E for the cell “night shift, minor”.

row total = 76column total = 75N = 178
E =
10.Chi-square testsHard
yesnoTotalplant A4060100plant B152540plant C116980Total66154220dfα = 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.01 whether the two variables are independent (no continuity correction). Compute the test statistic χ², then compare it with the critical value from the table.

N = 2203 × 2α = 0.01
χ² =

3Solutions

1.Normal distribution

Answer: P = 0.02275

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

μ = 200 mm, σ = √(0.3² + 0.4²) = 0.5 mm

Standardise

z = (201 − 200)/0.5 = 2

Upper tail

P = 1 − Φ(2) = 1 − 0.9772 = 0.02275

Answer

P = 0.02275
2.Normal distribution

Answer: P = 0.7881

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

μ = 52 − 48 = 4 s, σ = 5 s

Standardise

z = (0 − 4)/5 = −0.8

Probability

P = 1 − Φ(−0.8) = 0.7881

Answer

P = 0.7881
3.Confidence intervals

Answer: E₂ = 10.78

Confidence interval for a mean: x̄ ± margin of error. With a known population σ the margin is z·σ/√n; with only the sample standard deviation s, use t with n − 1 degrees of freedom: t·s/√n. Critical values: z = 1.645 (90%), 1.96 (95%), 2.576 (99%). To get a margin E or smaller, you need n ≥ (z·σ/E)², rounded up.

Ratio of margins

E₂/E₁ = (2.576/1.96)·√(25/25) = 1.314

New margin

E₂ = 8.2·1.314 = 10.78

Answer

E₂ = 10.78
4.Confidence intervals

Answer: lower limit = −5.584 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² = (9·6.5² + 15·9.5²)/24 = 72.25
sp = 8.5

Margin of error

E = 2.797·8.5·√(1/10 + 1/16) = 9.584

Interval

4 ± 9.584 → [−5.584, 13.58]

Answer

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

Answer: t = 1.188

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

SE = 8/√25 = 8/5 = 1.6

Test statistic

t = (201.9 − 200)/1.6 = 1.188

Answer

t = 1.188
t0.025; df = 24 = 2.064

|t| < 2.064, so H₀ is not rejected at the 5% level (two-sided).

6.Hypothesis tests & confidence intervals

Answer: U = 52.31

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

Margin of error

E = 2.576·5/√64 = 1.61

Interval limit

U = 50.7 + 1.61 = 52.31

Answer

U = 52.31
7.Linear regression & correlation

Answer: r = 0.9414

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
ȳ = 234/6 = 39

Sums of squares and products

Sxx = Σ(x − x̄)² = 17.5
Sxy = Σ(x − x̄)(y − ȳ) = 54
Syy = Σ(y − ȳ)² = 188

Correlation coefficient

r = 54/√(17.5·188) = 0.9414

Answer

r = 0.9414
8.Linear regression & correlation

Answer: x = 15.11

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̄ = 114/6 = 19
ȳ = 437/6 = 72.83

Sums of squares and products

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

Regression line

b = 231/70 = 3.3
a = 72.83 − 3.3·19 = 10.13
ŷ = 10.13 + 3.3·x

Solve for x

x = (60 − 10.13)/3.3 = 15.11

Answer

x = 15.11
9.Chi-square tests

Answer: E = 32.02

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 count

E = 76·75/178 = 32.02

Answer

E = 32.02
10.Chi-square tests

Answer: χ² = 15.89

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

plant A: 30, 70
plant B: 12, 28
plant C: 24, 56

Chi-square statistic

χ² = (40 − 30)²/30 + (60 − 70)²/70 + (15 − 12)²/12 + (25 − 28)²/28 + (11 − 24)²/24 + (69 − 56)²/56
χ² = 15.89

Decision

df = 2, χ²crit = 9.210
15.89 > 9.210

Answer

χ² = 15.89

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

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