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
680 kg713.9 kgT = X₁ + … + X₈?

The masses of passengers with luggage are independent and normal with mean 85 kg and standard deviation 12 kg. Find the probability P that the total mass of 8 of them exceeds 713.9 kg. Round z to two decimals.

μ = 85 kgσ = 12 kgn = 8> 713.9 kg
P =
2.Normal distributionHard
35455565758595pointsbottom 40%

The exam scores are normally distributed with mean 65 points and standard deviation 10 points. Drag the cut-off so the shaded bottom 40% is to the left of it. Find the cut-off x.

μ = 65 pointsσ = 10 points40%
x = points
3.Confidence intervalsMedium
n = 12, s = 2.5LUx̄ = 78.5E = ?90%

A sample of 12 items has mean 78.5 and standard deviation s = 2.5. The population is roughly normal. Find the margin of error E of a 90% confidence interval for the mean.

n = 12x̄ = 78.5s = 2.590%t(11) = 1.796
E =
4.Confidence intervalsHard
μ₁ − μ₂, t(24) = 2.7970L = ?Ux̄₁ − x̄₂E99%

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

n₁ = 9x̄₁ = 28s₁ = 2n₂ = 17x̄₂ = 30.5s₂ = 299%t(24) = 2.797
lower limit = kg
5.Hypothesis tests & confidence intervalsMedium
−2.0932.093t = ?df = 19

Two teaching methods are compared. Group 1: 9 students, mean score 27.5, standard deviation 9.5. Group 2: 12 students, mean score 36.4, standard deviation 7.5. Assume equal population variances and use the pooled two-sample t test. Find the test statistic t for H₀: μ₁ = μ₂, taking the difference as x̄₁ − x̄₂ (group 1 minus group 2).

n₁ = 9x̄₁ = 27.5s₁ = 9.5n₂ = 12x̄₂ = 36.4s₂ = 7.5
t =
6.Hypothesis tests & confidence intervalsHard
H₀H₁μ₀x̄cμ₀ + 2α = 0.01βσ = 14, power 90%, n = ?

A one-sided z test at α = 0.01 must detect a shift of the mean of 2 units with a power of 90%. The standard deviation is 14. Find the minimum sample size n.

α = 0.01power = 90%δ = 2σ = 14zα = 2.326zβ = 1.282
n =
7.Linear regression & correlationMedium
xy1859216624862710030109xy2025306080100

The table gives 5 paired observations of x = temperature in °C and y = ice creams sold. Find Pearson's correlation coefficient r.

n = 5
r =
8.Linear regression & correlationHard
xy122231331432543640xy2463040x = 1.5

The table gives 6 paired observations of x = advertising spend in k€ and y = sales in k€. Use the least-squares line ŷ = a + b·x. A new observation (1.5, 28) is made. Find its residual e = y − ŷ.

n = 6(1.5, 28)
e =
9.Chi-square testsMedium
no defectminormajorTotalday shift10384593night shift19373490Total297579183

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

row total = 90column total = 29N = 183
E =
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 10 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.05.

α = 0.05
χ²crit =

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 total

μT = 680 kg, σT = 12·√8 = 33.94 kg

Standardise

z = (713.9 − 680)/33.94 = 1

Probability

P = 1 − Φ(1) = 0.1587

Answer

P = 0.1587
2.Normal distribution

Answer: x = 62.5 points

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

z from the table

z ≈ −0.25

Back to the original units

x = 65 − 0.25·10 = 62.5 points

Answer

x = 62.5 points
3.Confidence intervals

Answer: E = 1.296

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.

Critical value

df = n − 1 = 11, t = 1.796

Margin of error

E = 1.796·2.5/√12 = 1.296

Answer

E = 1.296
4.Confidence intervals

Answer: lower limit = −4.806 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² = (8·2² + 16·2²)/24 = 4
sp = 2

Margin of error

E = 2.797·2·√(1/9 + 1/17) = 2.306

Interval

−2.5 ± 2.306 → [−4.806, −0.194]

Answer

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

Answer: t = −2.403

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 ≤ α.

Pooled variance

sp² = (8·9.5² + 11·7.5²)/19 = 70.57
sp = 8.4

Standard error

SE = 8.4·√(1/9 + 1/12) = 3.704

Test statistic

t = (27.5 − 36.4)/3.704 = −2.403

Answer

t = −2.403

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

6.Hypothesis tests & confidence intervals

Answer: n = 638

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 = ((2.326 + 1.282)·14/2)² = 637.9

Round up

n = 638

Answer

n = 638
7.Linear regression & correlation

Answer: r = 0.9895

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̄ = 120/5 = 24
ȳ = 420/5 = 84

Sums of squares and products

Sxx = Σ(x − x̄)² = 90
Sxy = Σ(x − x̄)(y − ȳ) = 402
Syy = Σ(y − ȳ)² = 1834

Correlation coefficient

r = 402/√(90·1834) = 0.9895

Answer

r = 0.9895
8.Linear regression & correlation

Answer: e = 2.09

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
ȳ = 199/6 = 33.17

Sums of squares and products

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

Regression line

b = 63.5/17.5 = 3.629
a = 33.17 − 3.629·3.5 = 20.47
ŷ = 20.47 + 3.629·x

Predicted value

ŷ = 20.47 + 3.629·1.5 = 25.91

Residual

e = 28 − 25.91 = 2.09

Answer

e = 2.09

The point lies above the line.

9.Chi-square tests

Answer: E = 14.26

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 = 90·29/183 = 14.26

Answer

E = 14.26
10.Chi-square tests

Answer: χ²crit = 16.92

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 = 10 − 1 = 9

Table

χ²crit(df = 9, α = 0.05) = 16.919

Answer

χ²crit = 16.919

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

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