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
160 g164.8 gT = X₁ + … + X₄?

The masses of bolts are independent and normal with mean 40 g and standard deviation 1.2 g. Find the probability P that the total mass of 4 of them is below 164.8 g. Round z to two decimals.

μ = 40 gσ = 1.2 gn = 4< 164.8 g
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
μ₁ − μ₂0LU = ?x̄₁ − x̄₂E99%

The battery life of two phone models is compared. Model 1: 40 phones, mean 113.5 h, known standard deviation 12 h. Model 2: 40 phones, mean 115 h, known standard deviation 12 h. Find the upper limit of the 99% confidence interval for μ₁ − μ₂.

n₁ = 40x̄₁ = 113.5 hσ₁ = 12 hn₂ = 40x̄₂ = 115 hσ₂ = 12 h99%
upper limit = h
4.Confidence intervalsHard
μ₁ − μ₂, t(19) = 1.7290LU = ?x̄₁ − x̄₂E90%

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

n₁ = 14x̄₁ = 11s₁ = 2.5n₂ = 7x̄₂ = 6s₂ = 890%t(19) = 1.729
upper limit = kg
5.Hypothesis tests & confidence intervalsMedium
−1.321.32p = ?

The mean of a population is claimed to be 250; the population standard deviation is known to be 15. A random sample of 100 observations has a mean of 248.02. Test H₀: μ = 250 against H₁: μ ≠ 250. Find the p-value p.

μ₀ = 250σ = 15n = 100x̄ = 248.02H₁: μ ≠ μ₀
p =
6.Hypothesis tests & confidence intervalsHard
μ₀x̄c

A one-sided z test of H₀: μ = 500 against H₁: μ > 500 is done at α = 0.05 with a sample of 36; the standard deviation is known to be 6. In reality the mean is 502.9. Find the probability of a Type II error β in percent.

μ₀ = 500μ = 502.9σ = 6n = 36α = 0.05
β = %
7.Linear regression & correlationMedium
xy147361569786910111113xy51050100

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

n = 6
r =
8.Linear regression & correlationHard
xy127223324422520620xy2462025x = 2.5

The table gives 6 paired observations of x = car age in years and y = price in k€. Use the least-squares line ŷ = a + b·x. Predict ŷ for x = 2.5.

n = 6x = 2.5
ŷ =
9.Chi-square testsMedium
lowmediumhighTotalurban23112559rural43162584Total662750143

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

row total = 84column total = 66N = 143
E =
10.Chi-square testsHard

A chi-square goodness-of-fit test compares observed counts in 8 categories with fully specified expected proportions (no parameters are estimated from the data). How many degrees of freedom df does the test have?

k = 8
df =

3Solutions

1.Normal distribution

Answer: P = 0.9772

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 = 160 g, σT = 1.2·√4 = 2.4 g

Standardise

z = (164.8 − 160)/2.4 = 2

Probability

P = Φ(2) = 0.9772

Answer

P = 0.9772
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: upper limit = 5.412 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̄₂ = 113.5 − 115 = −1.5

Standard error

SE = √(12²/40 + 12²/40) = 2.683

Margin of error

E = 2.576·2.683 = 6.912

Interval

−1.5 ± 6.912 → [−8.412, 5.412]

Answer

upper limit = 5.412 h

The interval contains 0, so the data do not show a significant difference.

4.Confidence intervals

Answer: upper limit = 8.961 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² = (13·2.5² + 6·8²)/19 = 24.49
sp = 4.948

Margin of error

E = 1.729·4.948·√(1/14 + 1/7) = 3.961

Interval

5 ± 3.961 → [1.039, 8.961]

Answer

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

Answer: p = 0.1868

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

Test statistic

SE = σ/√n = 15/√100 = 1.5
z = (248.02 − 250)/1.5 = −1.32

Tail area

Φ(1.32) = 0.9066
1 − Φ(1.32) = 0.0934

p-value

p = 2·0.0934 = 0.1868

Answer

p = 0.1868

p > 0.05, so H₀ is not rejected at the 5% level.

6.Hypothesis tests & confidence intervals

Answer: β = 10.47 %

Power of a test: power = 1 − β is the probability of rejecting H₀ when it is false. Find the cutoff x̄c from μ₀ and z_α, then compute the probability of landing beyond x̄c using the true mean: z = (x̄c − μ)/(σ/√n).

Critical sample mean

SE = 6/√36 = 1
x̄c = 500 + 1.645·1 = 501.6

z under the true mean

z = (501.6 − 502.9)/1 = −1.255

Type II error

power = P(Z > −1.255) = 89.53%
β = 100% − 89.53% = 10.47%

Answer

β = 10.47%
7.Linear regression & correlation

Answer: r = 0.9968

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̄ = 36/6 = 6
ȳ = 477/6 = 79.5

Sums of squares and products

Sxx = Σ(x − x̄)² = 70
Sxy = Σ(x − x̄)(y − ȳ) = 467
Syy = Σ(y − ȳ)² = 3136

Correlation coefficient

r = 467/√(70·3136) = 0.9968

Answer

r = 0.9968
8.Linear regression & correlation

Answer: ŷ = 23.98

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
ȳ = 136/6 = 22.67

Sums of squares and products

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

Regression line

b = −23/17.5 = −1.314
a = 22.67 − (−1.314)·3.5 = 27.27
ŷ = 27.27 − 1.314·x

Prediction

ŷ = 27.27 + (−1.314)·2.5 = 23.98

Answer

ŷ = 23.98
9.Chi-square tests

Answer: E = 38.77

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 = 84·66/143 = 38.77

Answer

E = 38.77
10.Chi-square tests

Answer: df = 7

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 = 8 − 1 = 7

Answer

df = 7

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