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

The IQ scores are normally distributed with mean 100 points and standard deviation 15 points. What fraction lies between 70.75 and 115.75 points? Give P as a decimal.

μ = 100σ = 15x1 = 70.75x2 = 115.75
P =
2.Normal distributionHard
557085100115130145pointstop 20%

The IQ scores are normally distributed with mean 100 points and standard deviation 15 points. Drag the cut-off so the shaded top 20% is to the right of it. Find the cut-off x.

μ = 100 pointsσ = 15 points20%
x = points
3.Confidence intervalsMedium
x̄E₁ = 5.690%, n = 25x̄E₂ = ?99%, n = 100

A 90% confidence interval for a mean, based on 25 observations and a known σ, has a margin of error of 5.6. What is the margin of error E₂ of a 99% interval based on 100 observations?

90%n₁ = 25E₁ = 5.699%n₂ = 100
E₂ =
4.Confidence intervalsHard
σ = 11, n = ?x̄ − Ex̄ + Ex̄E = 2.595%

The population standard deviation is 11. 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 2.5?

σ = 11E = 2.595%
n =
5.Hypothesis tests & confidence intervalsMedium
t −1.99801.998

A sample of 64 students has a mean score of 98.45 and a sample standard deviation of 4. Find the test statistic t for H₀: μ = 100.

μ₀ = 100x̄ = 98.45s = 4n = 64
t =
6.Hypothesis tests & confidence intervalsHard
z −1.64501.645

A sample of 100 measurements has mean 48.2. The population standard deviation is 15. Find the lower limit L of the 90% confidence interval for the mean.

x̄ = 48.2σ = 15n = 10090%
L =
7.Linear regression & correlationMedium
xy128336547756963xy54060

The table gives 5 paired observations of x = advertising spend in k€ and y = sales in k€. Find the coefficient of determination r² of the least-squares line.

n = 5
r² =
8.Linear regression & correlationHard
xy284166238321040xy51010203040ŷ = 36

The table gives 5 paired observations of x = load in kN and y = extension in mm. Use the least-squares line ŷ = a + b·x. For which value x does the line predict ŷ = 36?

n = 5ŷ = 36
x =
9.Chi-square testsMedium
busbikecarTotalstudents21333589staff27212371Total485458160

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

row total = 89column total = 58N = 160
E =
10.Chi-square testsHard
yesnoTotalline 1312960line 27723100line 3122840Total12080200dfα = 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.8276

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₁ = (70.75 − 100)/15 = −1.95
z₂ = (115.75 − 100)/15 = 1.05

Area between

P = Φ(1.05) − Φ(−1.95) = 0.8531 − 0.02559 = 0.8276

Answer

P = 0.8276
2.Normal distribution

Answer: x = 112.6 points

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

z from the table

z ≈ 0.84

Back to the original units

x = 100 + 0.84·15 = 112.6 points

Answer

x = 112.6 points
3.Confidence intervals

Answer: E₂ = 4.385

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.

Ratio of margins

E₂/E₁ = (2.576/1.645)·√(25/100) = 0.783

New margin

E₂ = 5.6·0.783 = 4.385

Answer

E₂ = 4.385
4.Confidence intervals

Answer: n = 75

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·11/2.5)² = 74.37

Round up

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

n = 75

Answer

n = 75
5.Hypothesis tests & confidence intervals

Answer: t = −3.1

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

SE = 4/√64 = 4/8 = 0.5

Test statistic

t = (98.45 − 100)/0.5 = −3.1

Answer

t = −3.1
t0.025; df = 63 = 1.998

|t| > 1.998, so H₀ is rejected at the 5% level (two-sided).

6.Hypothesis tests & confidence intervals

Answer: L = 45.73

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

Margin of error

E = 1.645·15/√100 = 2.468

Interval limit

L = 48.2 − 2.468 = 45.73

Answer

L = 45.73
7.Linear regression & correlation

Answer: r² = 0.9951

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̄ = 25/5 = 5
ȳ = 230/5 = 46

Sums of squares and products

Sxx = Σ(x − x̄)² = 40
Sxy = Σ(x − x̄)(y − ȳ) = 180
Syy = Σ(y − ȳ)² = 814

Coefficient of determination

r² = 180²/(40·814) = 0.9951

Answer

r² = 0.9951

About 99.51% of the variation in y is explained by the line.

8.Linear regression & correlation

Answer: x = 9.05

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
ȳ = 119/5 = 23.8

Sums of squares and products

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

Regression line

b = 160/40 = 4
a = 23.8 − 4·6 = −0.2
ŷ = −0.2 + 4·x

Solve for x

x = (36 − (−0.2))/4 = 9.05

Answer

x = 9.05
9.Chi-square tests

Answer: E = 32.26

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 = 89·58/160 = 32.26

Answer

E = 32.26
10.Chi-square tests

Answer: χ² = 28.78

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: 36, 24
line 2: 60, 40
line 3: 24, 16

Chi-square statistic

χ² = (31 − 36)²/36 + (29 − 24)²/24 + (77 − 60)²/60 + (23 − 40)²/40 + (12 − 24)²/24 + (28 − 16)²/16
χ² = 28.78

Decision

df = 2, χ²crit = 9.210
28.78 > 9.210

Answer

χ² = 28.78

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

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