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

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

A = 0.9668
z =
2.Normal distributionHard
μ = 65x = ?10%

The exam scores are normally distributed with mean 65 points and standard deviation 10 points. Find the value x below which 10% of them lie (the 10th percentile).

μ = 65σ = 10P = 10%
x = points
3.Confidence intervalsMedium
n = 11, s = 2LUx̄ = 33.5E = ?90%

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

n = 11x̄ = 33.5s = 290%t(10) = 1.812
E =
4.Confidence intervalsHard
σ = 40, n = ?x̄ − Ex̄ + Ex̄E = 0.595%

The population standard deviation is 40. 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 0.5?

σ = 40E = 0.595%
n =
5.Hypothesis tests & confidence intervalsMedium
−1.961.96z = ?

Two production lines make the same part. Line 1: a sample of 80 parts has mean length 88.5 mm, and the line's known standard deviation is 17 mm. Line 2: a sample of 60 parts has mean 92.7 mm, known standard deviation 18 mm. Find the test statistic z for H₀: μ₁ = μ₂, taking the difference as x̄₁ − x̄₂ (line 1 minus line 2).

n₁ = 80x̄₁ = 88.5 mmσ₁ = 17 mmn₂ = 60x̄₂ = 92.7 mmσ₂ = 18 mm
z =
6.Hypothesis tests & confidence intervalsHard
μ₀x̄c

A one-sided z test of H₀: μ = 80 against H₁: μ < 80 is done at α = 0.10 with a sample of 36; the standard deviation is known to be 6. In reality the mean is 78.1. Find the power 1 − β of the test in percent.

μ₀ = 80μ = 78.1σ = 6n = 36α = 0.10
1 − β = %
7.Linear regression & correlationMedium
xy14421762207523802698xy152025406080100

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
xy12321831841258xy24101520ŷ = 10

The table gives 5 paired observations of x = car age in years and y = price in k€. Use the least-squares line ŷ = a + b·x. For which value x does the line predict ŷ = 10?

n = 5ŷ = 10
x =
9.Chi-square testsMedium
lowmediumhighTotalurban44113691rural27263689Total713772180

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

row total = 91column total = 72N = 180
E =
10.Chi-square testsHard

A chi-square goodness-of-fit test checks whether counts in 8 categories follow a Poisson distribution whose mean is estimated from the same data. How many degrees of freedom df does the test have?

k = 8
df =

3Solutions

1.Normal distribution

Answer: z = 2.13

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.9668)/2 = 0.9834

Read the z-table backwards

Find 0.9834 inside the table and read off z.

z = 2.13

Answer

z = 2.13
2.Normal distribution

Answer: x = 52.18 points

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.1 → z = −1.282

Back to x

x = 65 + −1.282·10 = 52.18 points

Answer

x = 52.18 points
3.Confidence intervals

Answer: E = 1.093

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 = 10, t = 1.812

Margin of error

E = 1.812·2/√11 = 1.093

Answer

E = 1.093
4.Confidence intervals

Answer: n = 24587

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·40/0.5)² = 24586

Round up

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

n = 24587

Answer

n = 24587
5.Hypothesis tests & confidence intervals

Answer: z = −1.399

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 = √(17²/80 + 18²/60) = √9.013 = 3.002

Test statistic

z = (88.5 − 92.7)/3.002 = −1.399

Answer

z = −1.399

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

6.Hypothesis tests & confidence intervals

Answer: 1 − β = 73.17 %

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 = 80 − 1.282·1 = 78.72

z under the true mean

z = (78.72 − 78.1)/1 = 0.618

Power

power = P(Z < 0.618) = 73.17%
1 − β = 73.17%

Answer

1 − β = 73.17%
7.Linear regression & correlation

Answer: r = 0.9835

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
ȳ = 357/5 = 71.4

Sums of squares and products

Sxx = Σ(x − x̄)² = 90
Sxy = Σ(x − x̄)(y − ȳ) = 390
Syy = Σ(y − ȳ)² = 1747

Correlation coefficient

r = 390/√(90·1747) = 0.9835

Answer

r = 0.9835
8.Linear regression & correlation

Answer: x = 4.611

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
ȳ = 79/5 = 15.8

Sums of squares and products

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

Regression line

b = −36/10 = −3.6
a = 15.8 − (−3.6)·3 = 26.6
ŷ = 26.6 − 3.6·x

Solve for x

x = (10 − 26.6)/(−3.6) = 4.611

Answer

x = 4.611
9.Chi-square tests

Answer: E = 36.4

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 = 91·72/180 = 36.4

Answer

E = 36.4
10.Chi-square tests

Answer: df = 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 α.

Degrees of freedom

df = 8 − 1 − 1 = 6

Answer

df = 6

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