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
−3−2−10123zshaded area between −z and z = 0.2358

Drag z so that the shaded area between −z and z under the standard normal curve is 0.2358. Find z to two decimals.

A = 0.2358
z =
2.Normal distributionHard
380420460500540580620hbottom 25%

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

μ = 500 hσ = 40 h25%
x = h
3.Confidence intervalsMedium
n = 15, sd​ = 3.30L = ?Ud̄ = −6.9E95%

The blood pressure of 15 patients is measured before and after a treatment. The differences d = before − after (mmHg) have mean −6.9 and standard deviation 3.3. Find the lower limit of the 95% confidence interval for the mean difference.

n = 15d̄ = −6.9sd = 3.395%t(14) = 2.145
lower limit = mmHg
4.Confidence intervalsHard
μ₁ − μ₂, t(10) = 3.1690LU = ?x̄₁ − x̄₂E99%

Two fertilisers are tested. Plot group 1: 5 plots, mean yield 98 kg, standard deviation 2.5 kg. Plot group 2: 7 plots, mean 105.5 kg, standard deviation 7.5 kg. Assume equal variances (pooled t, df = n₁ + n₂ − 2). Find the upper limit of the 99% confidence interval for μ₁ − μ₂.

n₁ = 5x̄₁ = 98s₁ = 2.5n₂ = 7x̄₂ = 105.5s₂ = 7.599%t(10) = 3.169
upper limit = kg
5.Hypothesis tests & confidence intervalsMedium
−2.2282.228t = ?df = 10

Two teaching methods are compared. Group 1: 7 students, mean score 112, standard deviation 2.5. Group 2: 5 students, mean score 116.6, standard deviation 4.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₁ = 7x̄₁ = 112s₁ = 2.5n₂ = 5x̄₂ = 116.6s₂ = 4.5
t =
6.Hypothesis tests & confidence intervalsHard
σ = 5, n = ?x̄ − Ex̄ + Ex̄E = 2.590%

How large must a sample be so that the 90% confidence interval for a mean has a margin of error of at most 2.5? The standard deviation is 5. Find the smallest sample size n.

σ = 5E = 2.590%
n =
7.Linear regression & correlationMedium
xy130238339443549xy24304050

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

n = 5
r =
8.Linear regression & correlationHard
xy16601860206122752487xy2060708090x = 17

The table gives 5 paired observations of x = temperature in °C and y = ice creams sold. Use the least-squares line ŷ = a + b·x. Predict ŷ for x = 17.

n = 5x = 17
ŷ =
9.Chi-square testsMedium
coughno coughTotalsmokers295180non-smokers481260Total7763140

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
yesnoTotalage 18–307525100age 31–50211940age 51+301040Total12654180dfα = 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.05 whether the two variables are independent (no continuity correction). Compute the test statistic χ², then compare it with the critical value from the table.

N = 1803 × 2α = 0.05
χ² =

3Solutions

1.Normal distribution

Answer: z = 0.3

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 of z

Φ(z) = (1 + 0.2358)/2 = 0.6179

Read the z-table backwards

Find 0.6179 inside the table and read off z.

z = 0.30

Answer

z = 0.30
2.Normal distribution

Answer: x = 473 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.25

z from the table

z ≈ −0.67

Back to the original units

x = 500 − 0.67·40 = 473 h

Answer

x = 473 h
3.Confidence intervals

Answer: lower limit = −8.728 mmHg

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.

Critical value

df = 14, t = 2.145

Margin of error

E = 2.145·3.3/√15 = 1.828

Interval

−6.9 ± 1.828 → [−8.728, −5.072]

Answer

lower limit = −8.728 mmHg
4.Confidence intervals

Answer: upper limit = 3.672 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² = (4·2.5² + 6·7.5²)/10 = 36.25
sp = 6.021

Margin of error

E = 3.169·6.021·√(1/5 + 1/7) = 11.17

Interval

−7.5 ± 11.17 → [−18.67, 3.672]

Answer

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

Answer: t = −2.282

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² = (6·2.5² + 4·4.5²)/10 = 11.85
sp = 3.442

Standard error

SE = 3.442·√(1/7 + 1/5) = 2.016

Test statistic

t = (112 − 116.6)/2.016 = −2.282

Answer

t = −2.282

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

6.Hypothesis tests & confidence intervals

Answer: n = 11

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.645·5/2.5)² = 10.82

Round up

n = 11

Answer

n = 11
7.Linear regression & correlation

Answer: r = 0.9743

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̄ = 15/5 = 3
ȳ = 199/5 = 39.8

Sums of squares and products

Sxx = Σ(x − x̄)² = 10
Sxy = Σ(x − x̄)(y − ȳ) = 43
Syy = Σ(y − ȳ)² = 194.8

Correlation coefficient

r = 43/√(10·194.8) = 0.9743

Answer

r = 0.9743
8.Linear regression & correlation

Answer: ŷ = 58.25

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̄ = 100/5 = 20
ȳ = 343/5 = 68.6

Sums of squares and products

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

Regression line

b = 138/40 = 3.45
a = 68.6 − 3.45·20 = −0.4
ŷ = −0.4 + 3.45·x

Prediction

ŷ = −0.4 + 3.45·17 = 58.25

Answer

ŷ = 58.25
9.Chi-square tests

Answer: χ² = 26.52

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

smokers: 80·77/140 = 44, 80·63/140 = 36
non-smokers: 60·77/140 = 33, 60·63/140 = 27

Chi-square statistic

χ² = (29 − 44)²/44 + (51 − 36)²/36 + (48 − 33)²/33 + (12 − 27)²/27
χ² = 26.52

Answer

χ² = 26.52

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

10.Chi-square tests

Answer: χ² = 7.5

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

age 18–30: 70, 30
age 31–50: 28, 12
age 51+: 28, 12

Chi-square statistic

χ² = (75 − 70)²/70 + (25 − 30)²/30 + (21 − 28)²/28 + (19 − 12)²/12 + (30 − 28)²/28 + (10 − 12)²/12
χ² = 7.5

Decision

df = 2, χ²crit = 5.991
7.5 > 5.991

Answer

χ² = 7.5

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

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