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
22.738.3P = ?

The delivery times are normally distributed with mean 32 min and standard deviation 6 min. What fraction lies between 22.7 and 38.3 min? Give P as a decimal.

μ = 32σ = 6x1 = 22.7x2 = 38.3
P =
2.Normal distributionHard
μ = 250x = ?99%

The bag weights are normally distributed with mean 250 g and standard deviation 5 g. Find the value x below which 99% of them lie (the 99th percentile).

μ = 250σ = 5P = 99%
x = g
3.Confidence intervalsMedium
μ₁ − μ₂0LUx̄₁ − x̄₂E = ?95%

The battery life of two phone models is compared. Model 1: 100 phones, mean 141 h, known standard deviation 9 h. Model 2: 80 phones, mean 154.5 h, known standard deviation 16 h. Find the margin of error E of the 95% confidence interval for μ₁ − μ₂.

n₁ = 100x̄₁ = 141 hσ₁ = 9 hn₂ = 80x̄₂ = 154.5 hσ₂ = 16 h95%
E = h
4.Confidence intervalsHard
σ = 24, n = ?x̄ − Ex̄ + Ex̄E = 595%

The population standard deviation is 24. How large a sample n do you need so that a 95% confidence interval for the mean has a margin of error of at most 5?

σ = 24E = 595%
n =
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 114 mm, and the line's known standard deviation is 14 mm. Line 2: a sample of 40 parts has mean 115.7 mm, known standard deviation 13 mm. Find the test statistic z for H₀: μ₁ = μ₂, taking the difference as x̄₁ − x̄₂ (line 1 minus line 2).

n₁ = 100x̄₁ = 114 mmσ₁ = 14 mmn₂ = 40x̄₂ = 115.7 mmσ₂ = 13 mm
z =
6.Hypothesis tests & confidence intervalsHard
−1.961.96z = ?

In a trial, 45 of 300 patients on treatment A recover, and 13 of 120 patients on treatment B. Using the pooled proportion, find the test statistic z for H₀: p₁ = p₂.

x₁ = 45n₁ = 300x₂ = 13n₂ = 120
z =
7.Linear regression & correlationMedium
xy36256978299611101xy5106080100

The table gives 5 paired observations of x = hours studied and y = exam score. Find Pearson's correlation coefficient r.

n = 5
r =
8.Linear regression & correlationHard
xy251352462566670xy246506070x = 5.5

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 (5.5, 65) is made. Find its residual e = y − ŷ.

n = 5(5.5, 65)
e =
9.Chi-square testsMedium
lowmediumhighTotalurban603822120rural2021840Total804040160

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 = 1602 × 3
χ² =
10.Chi-square testsHard
passfailTotalage 18–305248100age 31–505941100age 51+572380Total168112280dfα = 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 = 2803 × 2α = 0.01
χ² =

3Solutions

1.Normal distribution

Answer: P = 0.7926

Normal distribution: convert a value x to a z-score, z = (x − μ)/σ, which counts standard deviations from the mean. A z-table (or Φ(z)) gives the area to the left of z, which is P(X < x). The area to the right is 1 − Φ(z), and the area between two values is the difference of their two areas.

z-scores

z₁ = (22.7 − 32)/6 = −1.55
z₂ = (38.3 − 32)/6 = 1.05

Area between

P = Φ(1.05) − Φ(−1.55) = 0.8531 − 0.06057 = 0.7926

Answer

P = 0.7926
2.Normal distribution

Answer: x = 261.6 g

Normal distribution: convert a value x to a z-score, z = (x − μ)/σ, which counts standard deviations from the mean. A z-table (or Φ(z)) gives the area to the left of z, which is P(X < x). The area to the right is 1 − Φ(z), and the area between two values is the difference of their two areas.

z for the percentile

Φ(z) = 0.99 → z = 2.326

Back to x

x = 250 + 2.326·5 = 261.63 g

Answer

x = 261.63 g
3.Confidence intervals

Answer: E = 3.925 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̄₂ = 141 − 154.5 = −13.5

Standard error

SE = √(9²/100 + 16²/80) = 2.002

Margin of error

E = 1.96·2.002 = 3.925

Answer

E = 3.925 h

The interval does not contain 0, so the means differ significantly.

4.Confidence intervals

Answer: n = 89

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.

Solve for n

n = (1.96·24/5)² = 88.51

Round up

A sample size is a whole number, and rounding down would make the margin too large.

n = 89

Answer

n = 89
5.Hypothesis tests & confidence intervals

Answer: z = −0.6836

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 = √(14²/100 + 13²/40) = √6.185 = 2.487

Test statistic

z = (114 − 115.7)/2.487 = −0.6836

Answer

z = −0.6836

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

6.Hypothesis tests & confidence intervals

Answer: z = 1.118

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̂₁ = 45/300 = 0.15
p̂₂ = 13/120 = 0.1083
p̂ = 58/420 = 0.1381

Standard error under H₀

SE = √(0.1381·0.8619·(1/300 + 1/120)) = 0.03726

Test statistic

z = (0.15 − 0.1083)/0.03726 = 1.118

Answer

z = 1.118

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

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̄ = 35/5 = 7
ȳ = 410/5 = 82

Sums of squares and products

Sxx = Σ(x − x̄)² = 40
Sxy = Σ(x − x̄)(y − ȳ) = 210
Syy = Σ(y − ȳ)² = 1126

Correlation coefficient

r = 210/√(40·1126) = 0.9895

Answer

r = 0.9895
8.Linear regression & correlation

Answer: e = −3

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̄ = 20/5 = 4
ȳ = 301/5 = 60.2

Sums of squares and products

Sxx = Σ(x − x̄)² = 10
Sxy = Σ(x − x̄)(y − ȳ) = 52

Regression line

b = 52/10 = 5.2
a = 60.2 − 5.2·4 = 39.4
ŷ = 39.4 + 5.2·x

Predicted value

ŷ = 39.4 + 5.2·5.5 = 68

Residual

e = 65 − 68 = −3

Answer

e = −3

The point lies below the line.

9.Chi-square tests

Answer: χ² = 17.07

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

urban: 120·80/160 = 60, 120·40/160 = 30, 120·40/160 = 30
rural: 40·80/160 = 20, 40·40/160 = 10, 40·40/160 = 10

Chi-square statistic

χ² = (60 − 60)²/60 + (38 − 30)²/30 + (22 − 30)²/30 + (20 − 20)²/20 + (2 − 10)²/10 + (18 − 10)²/10
χ² = 17.07

Answer

χ² = 17.07

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

10.Chi-square tests

Answer: χ² = 6.927

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: 60, 40
age 31–50: 60, 40
age 51+: 48, 32

Chi-square statistic

χ² = (52 − 60)²/60 + (48 − 40)²/40 + (59 − 60)²/60 + (41 − 40)²/40 + (57 − 48)²/48 + (23 − 32)²/32
χ² = 6.927

Decision

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

Answer

χ² = 6.927

χ² 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