DATA1001 Chap.7 Hypothesis Testing
Hypothesis Testing
Hypothesis testing compares observed data with a null model through five linked moves: hypotheses, assumptions, test statistic, p-value and conclusion. The null hypothesis states a parameter value or lack of relationship. The alternative records the direction or difference the question asks about.
The test statistic expresses the observed minus null expected gap in standard-error units or uses an equivalent discrepancy such as chi squared. The p-value is calculated assuming the null model and measures how often a statistic at least as extreme as the observed one would arise. It is not the probability that the null is true and does not measure practical importance.
Canvas Topic 9 introduces the framework and p-value pitfalls. Topic 10 applies one-sample, paired and two-sample t tests to means. Topic 11 tests relationships with chi-squared procedures and regression slope output. For a mean test, identify the sampling structure before selecting the procedure. Paired data analyse within-pair differences, while independent groups require a two-sample comparison.
For a two-way table, the null is independence and each expected count equals row total times column total divided by grand total. Adequate expected counts support the chi-squared approximation. For a regression slope, residual conditions matter and an observational association remains noncausal. A confidence interval complements a test by showing direction, size and values compatible with the data.
Type I error rejects a true null, while Type II error fails to reject a false null. Power rises with larger effects, larger samples, lower variability and a less stringent decision threshold. A complete conclusion names the population parameter or relationship, states the evidence level and respects design limits.
What this chapter covers
- 01
Topic 9: Hypothesis Testing
- 02
Topic 10: Tests for Mean
- 03
Topic 11: Tests for Relationship
- 04
Use the five step testing frame
- 05
Read t test and linear model output
- 06
Calculate chi squared expected counts and interpret evidence
Worked example · free
Read a two sample t test
- 1The estimated mean difference is 4 units, with A higher.
- 1The p value is below 0.05, giving evidence against equal population means.
- 1The interval excludes zero and gives plausible positive differences from 0.4 to 7.6 units.
- 1Practical importance and causation require context and design information beyond the p value.
Key terms
- Null hypothesis
- A specified population model used as the reference for a statistical test.
- Alternative hypothesis
- The population difference or relationship considered when the null model is inadequate.
- Test statistic
- A numerical measure of discrepancy between observed data and the null expectation.
- P value
- Under the null model, the probability of a statistic at least as extreme as the observed one.
- Type I error
- Rejecting a null hypothesis that is actually true.
- Power
- The probability that a test rejects the null when a specified alternative is true.
Hypothesis Testing FAQ
What does a p value mean?
Assume the null hypothesis is true, then ask how often a test statistic at least as extreme as the observed one would occur. It is not the probability that the null is true, the probability that results occurred by chance, or a measure of effect size.
Should I reject or retain the null?
Compare the p value with the chosen significance level. Below the level, reject the null in favour of the stated alternative. Otherwise do not reject. Avoid saying the null is proven, because a nonsignificant result can reflect limited power or imprecise data.
Which t test should I use?
Use a one-sample test for one mean against a target, a paired test for within-pair differences, and a two-sample test for independent groups. The story's sampling structure matters more than the number of columns shown in a dataset.
How do expected counts work?
For a two-way table under independence, multiply the cell's row total by its column total and divide by the grand total. Expected counts come from the null model. Compare observed with expected collectively through the chi-squared statistic and check approximation conditions.
Does statistical significance imply practical importance?
Statistical significance describes evidence against a null model at a chosen threshold. Practical importance concerns the effect's size and consequences. A very large sample can make a tiny effect significant, so report estimates and confidence intervals alongside the decision.
Exam move
Write the five test steps for every problem, even when R has already calculated the statistic. State hypotheses about a population parameter, list assumptions tied to the design, identify the printed estimate and test statistic, interpret the p-value under the null and finish in context.
Build a method map from data structure: one proportion, one mean, paired differences, two independent means, a categorical table or a linear slope. For R output, read estimate and direction before p-value, then use the interval to discuss size. For chi-squared work, calculate at least one expected count by hand and inspect conditional proportions to describe the association's direction.
Practise correcting statements that treat p-values as probabilities of hypotheses or treat failure to reject as proof of no effect. Add one design sentence to every conclusion so an observational result is not turned into causation. Complete the chapter exam lens last and explain every distractor, not just the correct letter.