Confidence Intervals & Hypothesis Testing Practice Quiz with a Step-by-Step Interactive Lesson
Use the question set below to practice confidence intervals and hypothesis testing with the most important statistics tools: confidence level \((1-\alpha)\), critical values (\(z^\*\), \(t^\*\), and \(\chi^2\) quantiles), and margin of error \(\text{ME}=z^\*\mathrm{SE}\); standard error and how sample size changes interval width; z confidence intervals and t confidence intervals for a mean \(\mu\) (including paired t methods); confidence intervals for a proportion \(\hat p\) and for a variance \(\sigma^2\) using the chi-square distribution; and the full hypothesis testing workflow: null and alternative hypotheses, test statistics (z, t, and \(\chi^2\)), p-values, significance level \(\alpha\), and decision-making that connects tests to confidence intervals. You will also strengthen core ideas like Type I vs. Type II error, statistical power, and when to use chi-square goodness-of-fit and chi-square independence tests. If you want a refresher, click Start lesson to open a step-by-step guide with worked examples and quick checks.
Answer the question set and review your mistakes at the end.
How this confidence intervals & hypothesis testing practice works
1. Take the practice set: answer the confidence intervals and hypothesis testing questions below.
2. Open the lesson (optional): review confidence interval formulas, critical values, margin of error, and hypothesis testing steps with clear examples.
3. Retry: return to the question set and apply the CI and hypothesis testing rules immediately.
What you will learn in the confidence intervals & hypothesis testing lesson
Confidence interval fundamentals
General CI structure: estimate \(\pm\) (critical value)\(\times\)(standard error)
Margin of error and standard error: how variability and \(n\) control precision
CI width: how confidence level and sample size affect interval width
Confidence intervals for means
z-interval for a mean (known \(\sigma\)): \(\bar x \pm z_{1-\alpha/2}\dfrac{\sigma}{\sqrt{n}}\)
t-interval for a mean (unknown \(\sigma\)): \(\bar x \pm t_{1-\alpha/2,\;n-1}\dfrac{s}{\sqrt{n}}\)
Paired t confidence intervals using differences \(d_i\) and \(df=n-1\)
Proportions and variance intervals
Proportion CI: \(\hat p \pm z_{1-\alpha/2}\sqrt{\hat p(1-\hat p)/n}\) (large-sample conditions)
Variance CI via chi-square: uses quantiles of \(\chi^2_{n-1}\) (normal population assumption)
Reading CI outputs and interpreting parameters \(\mu\), \(p\), and \(\sigma^2\) correctly
Hypothesis testing: z, t, and chi-square
Hypothesis testing steps: \(H_0\), \(H_1\), \(\alpha\), test statistic, p-value, conclusion
Common tests: one-sample z-test, one-sample/paired t-test, chi-square goodness-of-fit and independence tests
Errors and power: Type I error, Type II error, and how increasing \(n\) increases power
Purpose: Build a clear understanding of confidence intervals and hypothesis testing so you can choose the right method, compute results correctly, and interpret conclusions responsibly. You will practice the “core loop” of inference: pick a parameter (like \(\mu\), \(p\), or \(\sigma^2\)), compute an estimate and a standard error, use a critical value to build a confidence interval, and use a test statistic and p-value to run a hypothesis test at significance level \(\alpha\).
Success criteria
Interpret a \(100(1-\alpha)\%\) confidence interval as a long-run capture rate (not a probability about \(\mu\) after observing data).
Use the general CI form: estimate \(\pm\) critical value \(\times\) standard error.
Compute margin of error: \(\text{ME}=(\text{critical value})\times \mathrm{SE}\).
Choose z vs t for a mean and identify degrees of freedom for t intervals/tests.
Build a confidence interval for a proportion using \(\hat p\) and \(\sqrt{\hat p(1-\hat p)/n}\).
Build a confidence interval for a variance \(\sigma^2\) using the chi-square distribution (normal population assumption).
Run a hypothesis test: write \(H_0\) and \(H_1\), compute a test statistic (z, t, or \(\chi^2\)), find a p-value, and decide at level \(\alpha\).
Use the key connection: for a two-sided test at level \(\alpha\), reject \(H_0\!:\theta=\theta_0\) if \(\theta_0\) is outside the \(100(1-\alpha)\%\) CI.
Explain Type I error, Type II error, and how increasing sample size affects power.
Key vocabulary
Parameter: an unknown population value (like \(\mu\), \(p\), or \(\sigma^2\)).
Statistic / estimate: a number computed from data (like \(\bar x\), \(\hat p\), \(s^2\)).
Standard error (SE): the standard deviation of an estimator (often estimated from data).
Critical value: a quantile such as \(z_{1-\alpha/2}\) or \(t_{1-\alpha/2,\;df}\).
Margin of error: \(\text{ME}=(\text{critical value})\times \mathrm{SE}\).
Null / alternative hypotheses: \(H_0\) vs \(H_1\) statements about a parameter.
p-value: probability (under \(H_0\)) of a result at least as extreme as what you observed.
Type I error: rejecting a true \(H_0\) (probability \(\alpha\)).
Type II error: failing to reject a false \(H_0\) (probability \(\beta\)); power is \(1-\beta\).
Quick pre-check
Pre-check 1: Which statement best describes the meaning of a 95% confidence interval for a population mean \(\mu\)?
Hint: The randomness is in the interval (because it comes from random samples), not in \(\mu\).
Pre-check 2: Which describes a Type I error?
Hint: Type I error is a “false positive”: you reject a true null hypothesis.
Confidence Interval Basics
Confidence intervals, critical values, standard error, and margin of error
Learning goal: Build any common confidence interval using the same structure and interpret it correctly.
Key idea
Most confidence intervals follow the same blueprint: \[\text{CI} = \text{estimate} \pm (\text{critical value})\times(\text{standard error}).\] The margin of error is: \[\text{ME}=(\text{critical value})\times \mathrm{SE}.\] A higher confidence level (like 99% vs 95%) uses a larger critical value, which makes the interval wider. Larger sample size usually makes \(\mathrm{SE}\) smaller (often proportional to \(1/\sqrt{n}\)), which makes the interval narrower.
Critical values you’ll see often
z critical value: \(z_{1-\alpha/2}\) for two-sided confidence intervals when the sampling distribution is (approximately) normal.
t critical value: \(t_{1-\alpha/2,\;df}\) for means when \(\sigma\) is unknown (common in practice).
One-sided bounds: for a lower bound with confidence \(1-\alpha\), the critical value is \(z_{1-\alpha}\) (or \(t_{1-\alpha,\;df}\)).
Worked example
Example: A sample has \(\bar x=72\), known \(\sigma=12\), and \(n=36\). Find the 95% confidence interval for \(\mu\).
For 95%, use \(z_{0.975}\approx 1.96\). The standard error is \(\sigma/\sqrt{n}=12/\sqrt{36}=12/6=2\). So the margin of error is: \[\text{ME}=1.96(2)=3.92.\] The CI is: \[72\pm 3.92 \Rightarrow (68.08,\;75.92).\]
Try it
Try it 1: Approximate the margin of error if \(z^\*=1.96\) and \(\mathrm{SE}=0.5\).
Hint: Margin of error \(=\) \(z^\*\times \mathrm{SE}\).
Try it 2: What is the critical \(z\)-value for an 80% confidence interval?
Hint: 80% means \(\alpha=0.20\), so each tail has \(\alpha/2=0.10\). Use \(z_{1-\alpha/2}=z_{0.90}\).
Summary
General CI: estimate \(\pm\) (critical value)\(\times\)(SE).
Margin of error: \(\text{ME}=(\text{critical value})\times \mathrm{SE}\).
CI Width & Planning
What changes confidence interval width? (and how to plan \(n\))
Learning goal: Predict how confidence level and sample size affect CI width and solve for a required sample size.
Key idea
Confidence interval width is controlled by two pieces:
Standard error: larger \(n\Rightarrow\) smaller \(\mathrm{SE}\Rightarrow\) narrower interval. For many estimators, \(\mathrm{SE}\propto 1/\sqrt{n}\).
A common planning formula comes from \(\text{ME}=z^\*\sigma/\sqrt{n}\) (mean with known \(\sigma\)): \[n=\left(\frac{z^\*\sigma}{\text{ME}}\right)^2.\] This “square rule” explains why reducing margin of error can require much larger samples.
Worked example: sample size for a target margin of error
Example: You want a 95% CI for \(\mu\) with known \(\sigma=10\) and margin of error at most \(2\). What sample size \(n\) is needed?
Use \(z^\*\approx 1.96\): \[n=\left(\frac{1.96(10)}{2}\right)^2=\left(9.8\right)^2=96.04.\] Round up: \(n=97\).
Try it
Try it 1: Increasing the confidence level from 95% to 99% has what effect on the confidence interval width (all else equal)?
Hint: Higher confidence uses a larger critical value (like 2.576 instead of 1.96 for z).
Try it 2: To double the width of a confidence interval (holding confidence level and \(\sigma\) fixed), by what factor must \(n\) change?
Hint: Width is proportional to \(1/\sqrt{n}\). To double width, \(\sqrt{n}\) must be cut in half.
Summary
Higher confidence \(\Rightarrow\) wider CI (bigger critical value).
Larger sample size \(\Rightarrow\) narrower CI (smaller SE, often \(1/\sqrt{n}\)).
For many problems, planning \(n\) comes from \(n=\left(\frac{\text{critical}\times \sigma}{\text{ME}}\right)^2\).
Mean CIs & Paired t
Confidence intervals for a mean: z vs t, and paired t ideas
Learning goal: Choose the correct distribution and compute confidence intervals for \(\mu\), including paired designs.
Key idea
For a population mean \(\mu\), the confidence interval depends on whether \(\sigma\) is known:
Known \(\sigma\) (z interval): \[\bar x \pm z_{1-\alpha/2}\frac{\sigma}{\sqrt{n}}.\]
Unknown \(\sigma\) (t interval): \[\bar x \pm t_{1-\alpha/2,\;n-1}\frac{s}{\sqrt{n}}.\] Here \(df=n-1\). As \(df\) increases, the t distribution approaches the standard normal.
Paired t intervals treat each pair as one observation by using differences \(d_i\) (for example, “after − before”). Compute \(\bar d\) and \(s_d\), then use: \[\bar d \pm t_{1-\alpha/2,\;n-1}\frac{s_d}{\sqrt{n}},\] where \(n\) is the number of pairs.
Worked example (t interval)
Example: A sample has \(\bar x=15\), \(s=4\), and \(n=16\). Write the 95% t-interval for \(\mu\).
Degrees of freedom: \(df=16-1=15\). The interval is: \[15 \pm t_{0.975,\;15}\frac{4}{\sqrt{16}} = 15 \pm t_{0.975,\;15}(1).\] Numerically, \(t_{0.975,\;15}\approx 2.13\), so the CI is approximately \(15\pm 2.13\).
Try it
Try it 1: Which formula gives the test statistic \(z\) for testing a mean when \(\sigma\) is known?
Hint: Known \(\sigma\) uses \(\sigma/\sqrt{n}\) in the denominator.
Try it 2: For a paired t-test with \(n\) pairs, the degrees of freedom equal:
Hint: Paired t uses the differences \(d_i\) as one sample of size \(n\).
Summary
Known \(\sigma\): z interval and z test use \(\sigma/\sqrt{n}\).
Unknown \(\sigma\): t interval and t test use \(s/\sqrt{n}\) with \(df=n-1\).
Paired t focuses on differences \(d_i\) and uses \(df=n-1\).
Proportion & Variance CIs
Confidence intervals for a proportion \(\,p\) and a variance \(\,\sigma^2\)
Learning goal: Build confidence intervals for proportions and variances, and know which distribution provides the critical values.
Proportion confidence interval (large-sample)
For a one-sample proportion, let \(\hat p=\dfrac{x}{n}\), where \(x\) is the number of successes. When conditions for a normal approximation hold (a common rule of thumb is \(n\hat p\ge 10\) and \(n(1-\hat p)\ge 10\)), an approximate \(100(1-\alpha)\%\) CI is: \[\hat p \pm z_{1-\alpha/2}\sqrt{\frac{\hat p(1-\hat p)}{n}}.\]
Variance confidence interval (chi-square)
If the population is normally distributed, then \[\frac{(n-1)s^2}{\sigma^2}\sim \chi^2_{n-1}.\] A \(100(1-\alpha)\%\) CI for \(\sigma^2\) is: \[\left(\frac{(n-1)s^2}{\chi^2_{1-\alpha/2,\;n-1}},\;\frac{(n-1)s^2}{\chi^2_{\alpha/2,\;n-1}}\right).\]
Worked example (proportion CI setup)
Example: In a sample of \(n=120\) people, \(x=84\) prefer brand A. Find \(\hat p\) and write the 95% CI setup for \(p\).
\[\hat p=\frac{84}{120}=0.70.\] The 95% CI setup is: \[0.70 \pm 1.96\sqrt{\frac{0.70(0.30)}{120}}.\]
Try it
Try it 1: For a one-sample proportion CI with large \(n\), the approximate CI is \(\hat p \pm z_{1-\alpha/2}\sqrt{\hat p(1-\hat p)/n}\). What does \(\hat p\) represent?
Hint: \(\hat p\) is computed directly from your sample as a point estimate for \(p\).
Try it 2: A 95% confidence interval for a variance \(\sigma^2\) uses quantiles of which distribution?
Hint: \(\frac{(n-1)s^2}{\sigma^2}\) follows a \(\chi^2\) distribution when the population is normal.
Summary
Proportion CI uses \(\hat p=x/n\) and a z critical value (large-sample conditions).
Variance CI uses chi-square quantiles and assumes a normal population.
Hypothesis Testing Basics
Hypothesis testing: \(H_0\), \(H_1\), test statistic, p-value, and the CI connection
Learning goal: Run a correct hypothesis test and connect it to confidence intervals.
The standard testing workflow
1. State hypotheses: \(H_0:\theta=\theta_0\) vs \(H_1:\theta≠\theta_0\) (two-sided) or \(H_1:\theta>\theta_0\), \(H_1:\theta<\theta_0\) (one-sided).
3. Compute a test statistic: z, t, or \(\chi^2\) depending on the setting.
4. Compute a p-value and decide: reject \(H_0\) if p-value \(\le \alpha\); otherwise fail to reject.
Connection to confidence intervals
For a two-sided test at level \(\alpha\), there is a tight link: reject \(H_0:\theta=\theta_0\) if and only if \(\theta_0\) is outside the \(100(1-\alpha)\%\) confidence interval for \(\theta\).
One-sided critical values
A 95% lower confidence bound corresponds to \(\alpha=0.05\) one-sided and uses the critical value \(z_{0.95}\approx 1.645\) (or \(t_{0.95,df}\)). A common lower bound form for a mean with known \(\sigma\) is: \[L=\bar x - z_{0.95}\frac{\sigma}{\sqrt{n}}.\]
Worked example (z test setup)
Example: Test \(H_0:\mu=50\) vs \(H_1:\mu≠ 50\) with \(\bar x=52\), known \(\sigma=10\), \(n=25\).
Test statistic: \[z=\frac{\bar x-\mu_0}{\sigma/\sqrt{n}}=\frac{52-50}{10/5}=\frac{2}{2}=1.\] A two-sided p-value is \(2(1-\Phi(1))\approx 0.317\), so at \(\alpha=0.05\) we fail to reject \(H_0\).
Try it
Try it 1: If a 95% confidence interval for \(\mu\) excludes \(\mu_0\), what is the hypothesis test conclusion at \(\alpha=0.05\) (two-sided)?
Hint: Two-sided test at \(\alpha\) matches a \(100(1-\alpha)\%\) confidence interval.
Try it 2: What is the one-sided critical \(z\)-value for a 95% lower confidence bound?
Hint: For a one-sided 95% bound, use \(z_{1-\alpha}=z_{0.95}\).
Summary
Reject \(H_0\) if p-value \(\le \alpha\); otherwise fail to reject.
Two-sided test at \(\alpha\) matches a \(100(1-\alpha)\%\) CI: \(\theta_0\) outside the CI \(\Rightarrow\) reject \(H_0\).
One-sided 95% critical z value is \(z_{0.95}\approx 1.645\).
Common Tests
Which test should you use? (z, t, and chi-square)
Learning goal: Match a real problem to the correct test and know the core test statistic formulas.
Quick “which test?” guide
Mean vs known value, \(\sigma\) known:one-sample z test.
Mean vs known value, \(\sigma\) unknown:one-sample t test with \(df=n-1\).
Paired measurements:paired t test on differences \(d_i\).
Proportion vs known value:one-sample z test for a proportion (large-sample conditions).
Variance vs known value:chi-square test for one variance (normal population assumption).
Categorical counts:chi-square goodness-of-fit or chi-square test of independence.
One-sample variance test statistic
To test \(H_0:\sigma^2=\sigma_0^2\) using a normally distributed population: \[\chi^2=\frac{(n-1)s^2}{\sigma_0^2}\sim \chi^2_{n-1}\quad \text{under } H_0.\]
Worked example (test statistic only)
Example: A sample has \(n=21\) and \(s^2=16\). Under \(H_0:\sigma^2=9\), what is the chi-square test statistic?
Try it 1: Which test compares the mean of one group to a known value when \(\sigma\) is known?
Hint: Known \(\sigma\) \(\Rightarrow\) use z methods for a mean.
Try it 2: The test statistic for a one-sample variance test of \(H_0:\sigma^2=\sigma_0^2\) is:
Hint: One-variance inference uses \(\chi^2\) with \(df=n-1\) under a normal population model.
Summary
Known \(\sigma\): one-sample z test for \(\mu\).
Unknown \(\sigma\): one-sample t test for \(\mu\) (and paired t for differences).
Variance tests and variance CIs use the chi-square distribution under normality.
Categorical counts often use chi-square tests (goodness-of-fit or independence).
Power & Big Picture
Type I & Type II errors, power, and why sample size matters
Learning goal: Understand error tradeoffs and how sample size affects both confidence intervals and hypothesis tests — then finish with a final check.
Errors and power in one picture
Type I error (false positive): reject a true \(H_0\). Probability \(=\alpha\).
Type II error (false negative): fail to reject a false \(H_0\). Probability \(=\beta\).
Power: \(1-\beta\). This is the chance you correctly detect a real effect.
How sample size affects inference
Confidence intervals: larger \(n\Rightarrow\) smaller \(\mathrm{SE}\Rightarrow\) narrower CI (more precision).
Hypothesis tests: larger \(n\Rightarrow\) smaller \(\mathrm{SE}\Rightarrow\) larger test statistic magnitude (for a fixed effect) and therefore higher power.
Extra note: chi-square tests and survival curves
In categorical data, you’ll often see chi-square goodness-of-fit and chi-square independence tests. In survival analysis, a common test to compare survival curves between two groups is the log-rank test, which is typically reported using a chi-square reference distribution.
Try it
Try it 1: Increasing the sample size in a hypothesis test primarily increases which of the following?
Hint: Larger \(n\) reduces standard error, making it easier to detect real differences.
Try it 2: Which test assesses goodness-of-fit to a categorical distribution?
Hint: Goodness-of-fit compares observed counts to expected counts from a specified categorical distribution.
Final recap
CI blueprint: estimate \(\pm\) (critical value)\(\times\)(SE), with \(\text{ME}=(\text{critical})\times \mathrm{SE}\).
Mean CIs: z interval uses \(\sigma\); t interval uses \(s\) with \(df=n-1\).
Proportion CI: \(\hat p \pm z_{1-\alpha/2}\sqrt{\hat p(1-\hat p)/n}\) under large-sample conditions.
Variance CI: chi-square quantiles, \(\left(\frac{(n-1)s^2}{\chi^2_{1-\alpha/2}},\frac{(n-1)s^2}{\chi^2_{\alpha/2}}\right)\) under normality.
Testing: set \(H_0\) and \(H_1\), choose \(\alpha\), compute test statistic and p-value, then decide.
Power: increasing \(n\) tends to increase power by reducing standard error.
Next step: Close this lesson and try your quiz again. If you miss a question, reopen the book and review the page that matches the confidence interval or hypothesis testing skill you need.
Practice set
Confidence Intervals & Hypothesis Testing practice questions with instant score
Answer all 10 questions below, then get your final score and a mistake review at the end so you know exactly what to improve.
0/10answered
Question 1Not answered
For a sample of size \(n=100\) with sample proportion \(\hat p=0.5\), what is the approximate margin of error for a 95% confidence interval?