🃏Engineering Probability
Key Concepts in Hypothesis Testing
Study smarter with Fiveable
Get study guides, practice questions, and cheatsheets for all your subjects. Join 500,000+ students with a 96% pass rate.
Why This Matters
Hypothesis testing is the backbone of statistical inference in engineering—it's how you move from "I collected some data" to "I can make a defensible decision." Whether you're determining if a manufacturing process meets specifications, comparing two designs, or validating a model, you're running hypothesis tests. The core tension you're being tested on is the tradeoff between Type I errors, Type II errors, power, and sample size—these aren't isolated concepts but interconnected pieces of the same puzzle.
Don't just memorize definitions here. Every exam question about hypothesis testing is really asking: Do you understand the logic of statistical evidence? That means knowing when to use which test, how changing ripples through your entire analysis, and why a p-value of 0.049 doesn't mean you've "proven" anything. Master the conceptual framework, and the formulas become tools rather than obstacles.
The Logical Framework: Hypotheses and Decisions
Before running any test, you need to set up the decision structure correctly. Hypothesis testing is fundamentally about quantifying evidence against a default assumption.
Null and Alternative Hypotheses
- The null hypothesis ()—represents no effect, no difference, or the status quo; this is what you assume true until evidence suggests otherwise
- The alternative hypothesis ( or ) states what you're trying to demonstrate—the presence of an effect, difference, or relationship
- The burden of proof falls on rejecting ; you never "accept" the null, only fail to reject it when evidence is insufficient
One-Tailed and Two-Tailed Tests
- One-tailed tests concentrate all of in one direction—use when you only care if a parameter is greater than or less than a value, not both
- Two-tailed tests split between both tails—appropriate when any difference from matters, regardless of direction
- Choosing incorrectly affects your critical values and p-value interpretation; FRQs often test whether you can justify your choice
Compare: One-tailed vs. two-tailed tests—both use the same test statistic, but one-tailed tests have more power to detect effects in the specified direction at the cost of ignoring effects in the opposite direction. If an FRQ gives you a directional research question ("Is the new process faster?"), that's your cue for one-tailed.
Error Types and Tradeoffs
The heart of hypothesis testing is managing uncertainty. Every decision carries risk, and your job is to control which risks you're willing to accept.
Type I and Type II Errors
- Type I error ()—rejecting when it's actually true; a "false positive" that leads you to claim an effect that doesn't exist
- Type II error ()—failing to reject when it's actually false; a "false negative" that causes you to miss a real effect
- The fundamental tradeoff means reducing increases for a fixed sample size—you can't minimize both without collecting more data
Significance Level ()
- The significance level is your pre-set threshold for rejecting , typically or in engineering applications
- It equals the probability of committing a Type I error—if is true, you'll incorrectly reject it of the time
- Choosing depends on consequences; use smaller values when false positives are costly (e.g., approving a faulty safety system)
Power of a Test
- Power equals —the probability of correctly rejecting when the alternative is true; higher power means better detection
- Three levers increase power: larger sample size , larger true effect size, and higher significance level
- Target power of 0.80 or higher is standard; underpowered studies waste resources by being unlikely to detect real effects
Compare: Type I vs. Type II errors—both are mistakes, but Type I means acting on a false signal while Type II means missing a true signal. In quality control, Type I might mean halting production unnecessarily; Type II might mean shipping defective products. Know which matters more for your context.
Measuring Evidence: Test Statistics and P-Values
Once your framework is set, you need to quantify how surprising your data is. The test statistic transforms raw data into a standardized measure of evidence.
Test Statistic
- A test statistic is a standardized value (like , , , or ) that measures how far your sample result falls from what predicts
- The formula depends on your test but always compares observed data to expected values under the null, scaled by variability
- Larger absolute values indicate stronger evidence against ; the distribution of the statistic determines what "large" means
Critical Region
- The critical region (or rejection region) contains test statistic values that lead to rejecting —determined by and the test's distribution
- For a two-tailed test at , the critical region is the most extreme 2.5% in each tail
- Decision rule: if your calculated test statistic falls in the critical region, reject ; otherwise, fail to reject
P-Value
- The p-value is the probability of observing a test statistic as extreme as (or more extreme than) yours, assuming is true
- Compare to : if , reject ; if , fail to reject—this is equivalent to the critical region approach
- Critical misconception: the p-value is not the probability that is true; it's a measure of data compatibility with
Compare: Critical region approach vs. p-value approach—both give identical decisions, but p-values provide more granular information about evidence strength. Exams may ask you to use either method; know that is equivalent to the test statistic falling in the critical region.
Choosing the Right Test: Parameters and Distributions
Different parameters require different test statistics. The choice depends on what you're testing, what you know, and what assumptions hold.
Z-Test
- Use when population variance is known or when (Central Limit Theorem justifies normal approximation)
- Test statistic: follows the standard normal distribution under
- Most common application is testing a population mean against a hypothesized value with large samples
T-Test
- Use when population variance is unknown and you're estimating it with sample variance , especially for small samples ()
- Test statistic: follows a t-distribution with degrees of freedom
- Variants include one-sample (one mean vs. value), independent two-sample (comparing two means), and paired (matched observations)
Chi-Square Test
- Use for categorical data (goodness-of-fit, independence) or for testing population variance
- Test statistic: for categorical tests; for variance tests
- Assumes normality for variance testing; for categorical tests, expected frequencies should generally be
F-Test
- Use to compare two population variances or in ANOVA to compare means across multiple groups
- Test statistic: follows an F-distribution with degrees of freedom
- Always place the larger variance in the numerator for a right-tailed test; highly sensitive to non-normality
Compare: Z-test vs. T-test—both test means, but Z requires known while T estimates it from data. As , the t-distribution approaches the standard normal, so they converge for large samples. When in doubt with unknown variance, use T.
Testing Specific Parameters
Each type of parameter has its own testing procedure. Match the parameter to the appropriate test and verify assumptions.
Hypothesis Testing for Population Mean
- Setup: vs. (or one-tailed alternatives or )
- Use Z-test if known or large; use T-test if unknown and small
- Assumption: data are normally distributed, or is large enough for CLT to apply (typically )
Hypothesis Testing for Population Proportion
- Setup: vs. appropriate alternative; used for binary outcomes (success/failure)
- Test statistic: where is the sample proportion
- Validity requires and for the normal approximation to the binomial
Hypothesis Testing for Population Variance
- Setup: vs. alternatives about variance being different, larger, or smaller
- Test statistic: follows a chi-square distribution with degrees of freedom
- Strongly assumes normality—this test is not robust to departures, unlike mean tests with large samples
Compare: Testing means vs. testing variances—mean tests (Z, T) are robust to mild non-normality for large , but variance tests () are highly sensitive to the normality assumption. Always check distributional assumptions more carefully for variance tests.
Confidence Intervals and Sample Size
Confidence intervals and hypothesis tests are two sides of the same coin. A 95% CI contains all parameter values you wouldn't reject at .
Confidence Intervals
- A confidence interval provides a range of plausible values for the parameter based on sample data
- Interpretation: if you repeated the sampling process many times, of constructed intervals would contain the true parameter
- Connection to testing: if falls outside a 95% CI for , you'd reject at
Sample Size Determination
- Formula for means: where is the desired margin of error
- For specified power: sample size depends on , desired power , and the effect size you want to detect
- Larger always helps—reduces standard error, narrows confidence intervals, and increases power
Compare: Confidence intervals vs. hypothesis tests—CIs give a range of plausible values while tests give a binary decision. CIs are often more informative because they show effect magnitude, not just statistical significance. Many journals now require both.
Advanced Testing Methods
Some situations require more sophisticated approaches. These methods handle complex models, multiple comparisons, and distribution-free inference.
Likelihood Ratio Test
- Compares nested models by computing , the ratio of maximized likelihoods under and
- Test statistic: asymptotically follows with degrees of freedom equal to the difference in parameters
- Powerful and general—works for complex models where simpler tests don't apply
Multiple Hypothesis Testing
- Problem: testing hypotheses at each gives family-wise error rate , which grows quickly
- Bonferroni correction uses for each test—simple but conservative, especially for large
- Alternative methods include Holm's procedure (less conservative) and false discovery rate control (for genomics, imaging)
Non-Parametric Tests
- Use when normality assumptions fail and transformations don't help, or when data are ordinal rather than interval
- Examples: Mann-Whitney U (compares two groups), Kruskal-Wallis (compares multiple groups), Wilcoxon signed-rank (paired data)
- Trade-off: fewer assumptions but generally less power than parametric tests when parametric assumptions hold
Compare: Parametric vs. non-parametric tests—parametric tests (Z, T, F) assume specific distributions and are more powerful when assumptions hold. Non-parametric tests are safer when assumptions are violated but sacrifice power. Check assumptions first; don't default to non-parametric out of laziness.
Quick Reference Table
| Concept | Best Examples |
|---|---|
| Error tradeoffs | Type I/II errors, significance level, power |
| Evidence quantification | Test statistic, p-value, critical region |
| Testing means | Z-test, T-test, hypothesis testing for population mean |
| Testing other parameters | Chi-square (variance), Z-test for proportions, F-test (comparing variances) |
| Test selection criteria | One-tailed vs. two-tailed, sample size, known vs. unknown variance |
| Interval estimation | Confidence intervals, sample size determination |
| Advanced methods | Likelihood ratio test, multiple testing corrections, non-parametric tests |
Self-Check Questions
-
You're testing whether a new algorithm is faster than the current one. Should you use a one-tailed or two-tailed test, and why does this choice affect your power?
-
A colleague reports and concludes there's a 3% chance the null hypothesis is true. What's wrong with this interpretation, and what does the p-value actually measure?
-
Compare the Z-test and T-test: under what conditions do they give nearly identical results, and when does the choice between them matter most?
-
If you decrease from 0.05 to 0.01 while keeping sample size fixed, what happens to (a) Type I error probability, (b) Type II error probability, and (c) power? Explain the tradeoff.
-
You need to compare failure rates across five different manufacturing processes. Why would using five separate pairwise tests at be problematic, and what correction would you apply?