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 mm199.3 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 199.3 mm. Round z to two decimals.

μX = 120, σX = 0.3μY = 80, σY = 0.4X + Y > 199.3 mm
P =
2.Normal distributionHard
235240245250255260265gbottom 70%

The bag weights are normally distributed with mean 250 g and standard deviation 5 g. Drag the cut-off so the shaded bottom 70% is to the left of it. Find the cut-off x.

μ = 250 gσ = 5 g70%
x = g
3.Confidence intervalsMedium
n = 21, s = 11LUx̄ = 107E = ?95%

A sample of 21 items has mean 107 and standard deviation s = 11. The population is roughly normal. Find the margin of error E of a 95% confidence interval for the mean.

n = 21x̄ = 107s = 1195%t(20) = 2.086
E =
4.Confidence intervalsHard
μ₁ − μ₂, t(29) = 1.6990L = ?Ux̄₁ − x̄₂E90%

Two fertilisers are tested. Plot group 1: 11 plots, mean yield 20 kg, standard deviation 3.5 kg. Plot group 2: 20 plots, mean 29 kg, standard deviation 8 kg. Assume equal variances (pooled t, df = n₁ + n₂ − 2). Find the lower limit of the 90% confidence interval for μ₁ − μ₂.

n₁ = 11x̄₁ = 20s₁ = 3.5n₂ = 20x̄₂ = 29s₂ = 890%t(29) = 1.699
lower 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 1.76 and the standard deviation of the differences is 6.2. Find the paired test statistic t for H₀: μd = 0.

n = 10d̄ = 1.76sd = 6.2
t =
6.Hypothesis tests & confidence intervalsHard
−1.961.96z = ?

In a trial, 23 of 150 patients on treatment A recover, and 57 of 250 patients on treatment B. Using the pooled proportion, find the test statistic z for H₀: p₁ = p₂.

x₁ = 23n₁ = 150x₂ = 57n₂ = 250
z =
7.Linear regression & correlationMedium
xy1192183134145964xy2465101520

The table gives 6 paired observations of x = car age in years and y = price in k€. Find Pearson's correlation coefficient r.

n = 6
r =
8.Linear regression & correlationHard
xy25446867988710106xy5106080100x = 7

The table gives 5 paired observations of x = hours studied and y = exam score. Use the least-squares line ŷ = a + b·x. A new observation (7, 83) is made. Find its residual e = y − ŷ.

n = 5(7, 83)
e =
9.Chi-square testsMedium
yesnoTotalmen3189120women5743100Total88132220

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 = 2202 × 2
χ² =
10.Chi-square testsHard
yesnoTotalline 1463480line 2384280line 3162440Total100100200dfα = 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 = 2003 × 2α = 0.01
χ² =

3Solutions

1.Normal distribution

Answer: P = 0.9192

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 = (199.3 − 200)/0.5 = −1.4

Upper tail

P = 1 − Φ(−1.4) = 1 − 0.08076 = 0.9192

Answer

P = 0.9192
2.Normal distribution

Answer: x = 252.6 g

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

z from the table

z ≈ 0.52

Back to the original units

x = 250 + 0.52·5 = 252.6 g

Answer

x = 252.6 g
3.Confidence intervals

Answer: E = 5.007

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 = 20, t = 2.086

Margin of error

E = 2.086·11/√21 = 5.007

Answer

E = 5.007
4.Confidence intervals

Answer: lower limit = −13.33 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² = (10·3.5² + 19·8²)/29 = 46.16
sp = 6.794

Margin of error

E = 1.699·6.794·√(1/11 + 1/20) = 4.333

Interval

−9 ± 4.333 → [−13.33, −4.667]

Answer

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

Answer: t = 0.8977

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 = 6.2/√10 = 1.961

Test statistic

t = 1.76/1.961 = 0.8977

Answer

t = 0.8977

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

6.Hypothesis tests & confidence intervals

Answer: z = −1.807

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

Sample proportions

p̂₁ = 23/150 = 0.1533
p̂₂ = 57/250 = 0.228
p̂ = 80/400 = 0.2

Standard error under H₀

SE = √(0.2·0.8·(1/150 + 1/250)) = 0.04131

Test statistic

z = (0.1533 − 0.228)/0.04131 = −1.807

Answer

z = −1.807

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

7.Linear regression & correlation

Answer: r = −0.9579

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
ȳ = 77/6 = 12.83

Sums of squares and products

Sxx = Σ(x − x̄)² = 17.5
Sxy = Σ(x − x̄)(y − ȳ) = −50.5
Syy = Σ(y − ȳ)² = 158.8

Correlation coefficient

r = −50.5/√(17.5·158.8) = −0.9579

Answer

r = −0.9579
8.Linear regression & correlation

Answer: e = −1.95

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
ȳ = 394/5 = 78.8

Sums of squares and products

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

Regression line

b = 246/40 = 6.15
a = 78.8 − 6.15·6 = 41.9
ŷ = 41.9 + 6.15·x

Predicted value

ŷ = 41.9 + 6.15·7 = 84.95

Residual

e = 83 − 84.95 = −1.95

Answer

e = −1.95

The point lies below the line.

9.Chi-square tests

Answer: χ² = 22.08

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

men: 120·88/220 = 48, 120·132/220 = 72
women: 100·88/220 = 40, 100·132/220 = 60

Chi-square statistic

χ² = (31 − 48)²/48 + (89 − 72)²/72 + (57 − 40)²/40 + (43 − 60)²/60
χ² = 22.08

Answer

χ² = 22.08

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

10.Chi-square tests

Answer: χ² = 3.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 α.

Expected counts

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

Chi-square statistic

χ² = (46 − 40)²/40 + (34 − 40)²/40 + (38 − 40)²/40 + (42 − 40)²/40 + (16 − 20)²/20 + (24 − 20)²/20
χ² = 3.6

Decision

df = 2, χ²crit = 9.210
3.6 < 9.210

Answer

χ² = 3.6

χ² is below the critical value, so H₀ is not rejected: there is no significant evidence of a relationship.

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