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

The bag weights are normally distributed with mean 250 g and standard deviation 5 g. What fraction lies between 244 and 251 g? Give P as a decimal.

μ = 250σ = 5x1 = 244x2 = 251
P =
2.Normal distributionHard
μ = 250x = ?25%

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

μ = 250σ = 5P = 25%
x = g
3.Confidence intervalsMedium
n = 21, s = 19.5LUx̄ = 114.5E = ?95%

A sample of 21 items has mean 114.5 and standard deviation s = 19.5. The population is roughly normal. Find the margin of error E of a 95% confidence interval for the mean.

n = 21x̄ = 114.5s = 19.595%t(20) = 2.086
E =
4.Confidence intervalsHard
n = 30σ = ?Us = 11.995%

The diameters of 30 machined shafts have a sample standard deviation of 11.9 µm. Assuming the diameters are normally distributed, find the lower limit σ of the 95% confidence interval for the population standard deviation. With df = 29, 2.5% of the χ² distribution lies below 16.047 and 2.5% lies above 45.722.

n = 30s = 11.9 µmχ² = 16.047, 45.722
σ = µm
5.Hypothesis tests & confidence intervalsMedium
−2.0932.093t = ?df = 19

Two teaching methods are compared. Group 1: 13 students, mean score 54, standard deviation 4. Group 2: 8 students, mean score 57.8, 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₁ = 13x̄₁ = 54s₁ = 4n₂ = 8x̄₂ = 57.8s₂ = 4.5
t =
6.Hypothesis tests & confidence intervalsHard
H₀H₁μ₀x̄cμ₀ + 3α = 0.05βσ = 14, power 90%, n = ?

A one-sided z test at α = 0.05 must detect a shift of the mean of 3 units with a power of 90%. The standard deviation is 14. Find the minimum sample size n.

α = 0.05power = 90%δ = 3σ = 14zα = 1.645zβ = 1.282
n =
7.Linear regression & correlationMedium
xy159262358471574673xy24660657075

The table gives 6 paired observations of x = hours studied and y = exam score. Find the coefficient of determination r² of the least-squares line.

n = 6
r² =
8.Linear regression & correlationHard
xy1682199922117251292814831170xy15202530100150ŷ = 125

The table gives 6 paired observations of x = temperature in °C and y = ice creams sold. Use the least-squares line ŷ = a + b·x. For which value x does the line predict ŷ = 125?

n = 6ŷ = 125
x =
9.Chi-square testsMedium
improvednot improvedTotalnew drug243660placebo112940Total3565100

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 = 1002 × 2
χ² =
10.Chi-square testsHard
dfα = 0.05α = 0.0113.8416.63525.9919.21037.81511.34549.48813.277511.07015.086612.59216.812714.06718.475815.50720.090916.91921.6661018.30723.209

A chi-square goodness-of-fit test compares observed counts in 9 categories with fully specified expected proportions (no parameters are estimated from the data). Using the table, find the critical value χ²crit at significance level α = 0.01.

α = 0.01
χ²crit =

3Solutions

1.Normal distribution

Answer: P = 0.4642

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₁ = (244 − 250)/5 = −1.2
z₂ = (251 − 250)/5 = 0.2

Area between

P = Φ(0.2) − Φ(−1.2) = 0.5793 − 0.1151 = 0.4642

Answer

P = 0.4642
2.Normal distribution

Answer: x = 246.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.25 → z = −0.6745

Back to x

x = 250 + −0.6745·5 = 246.63 g

Answer

x = 246.63 g
3.Confidence intervals

Answer: E = 8.876

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 = 20, t = 2.086

Margin of error

E = 2.086·19.5/√21 = 8.876

Answer

E = 8.876
4.Confidence intervals

Answer: σ = 9.477 µm

Interval for a variance: (n − 1)s²/σ² has a χ² distribution with n − 1 degrees of freedom. The 95% interval for σ² runs from (n − 1)s² divided by the upper χ² value (2.5% above it) to (n − 1)s² divided by the lower χ² value (2.5% below it); the interval for σ is the square root of both limits. It is not symmetric around s.

Sum of squares

(n − 1)s² = 29·11.9² = 4107

Limits for σ²

4107/45.722 = 89.82
4107/16.047 = 255.9

Limit for σ

σ = √89.82 = 9.477 µm

Answer

σ = 9.477 µm

95% interval for σ: [9.477, 16] µm.

5.Hypothesis tests & confidence intervals

Answer: t = −2.018

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² = (12·4² + 7·4.5²)/19 = 17.57
sp = 4.191

Standard error

SE = 4.191·√(1/13 + 1/8) = 1.883

Test statistic

t = (54 − 57.8)/1.883 = −2.018

Answer

t = −2.018

With df = 19, the two-sided 5% critical value is 2.093; |t| is smaller, so H₀ is not rejected.

6.Hypothesis tests & confidence intervals

Answer: n = 187

Sample size for a test: to detect a true shift δ with power 1 − β in a one-sided z test at level α, the standard error must satisfy δ = (z_α + z_β)·σ/√n, so n = ((z_α + z_β)·σ/δ)², rounded up.

Solve for n

n = ((1.645 + 1.282)·14/3)² = 186.6

Round up

n = 187

Answer

n = 187
7.Linear regression & correlation

Answer: r² = 0.7582

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
ȳ = 397/6 = 66.17

Sums of squares and products

Sxx = Σ(x − x̄)² = 17.5
Sxy = Σ(x − x̄)(y − ȳ) = 59.5
Syy = Σ(y − ȳ)² = 266.8

Coefficient of determination

r² = 59.5²/(17.5·266.8) = 0.7582

Answer

r² = 0.7582

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

8.Linear regression & correlation

Answer: x = 23.65

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̄ = 141/6 = 23.5
ȳ = 745/6 = 124.2

Sums of squares and products

Sxx = Σ(x − x̄)² = 157.5
Sxy = Σ(x − x̄)(y − ȳ) = 898.5

Regression line

b = 898.5/157.5 = 5.705
a = 124.2 − 5.705·23.5 = −9.895
ŷ = −9.895 + 5.705·x

Solve for x

x = (125 − (−9.895))/5.705 = 23.65

Answer

x = 23.65
9.Chi-square tests

Answer: χ² = 1.648

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

new drug: 60·35/100 = 21, 60·65/100 = 39
placebo: 40·35/100 = 14, 40·65/100 = 26

Chi-square statistic

χ² = (24 − 21)²/21 + (36 − 39)²/39 + (11 − 14)²/14 + (29 − 26)²/26
χ² = 1.648

Answer

χ² = 1.648

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

10.Chi-square tests

Answer: χ²crit = 20.09

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

Table

χ²crit(df = 8, α = 0.01) = 20.090

Answer

χ²crit = 20.090

Reject H₀ if the computed χ² is larger than this value.

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