1Which method do I use?¶
By Week 13 you know two families of inference — one proportion and one mean — and two things you can do with each — build a confidence interval, or run a hypothesis test. That is four total procedures. The hard part is rarely the arithmetic; it’s picking the right one of the four from a paragraph of English. This guide walks you there in a few short questions, and points you to the matching formula, calculator menu, and R function every time.
1.11. The decision tree¶
Is the variable categorical (yes/no, success/failure) or numerical (a measured amount)?
│
├── CATEGORICAL → you are estimating or testing a PROPORTION (p)
│ │
│ ├── Does the question ask "what's a plausible range for p?"
│ │ → CONFIDENCE INTERVAL for one proportion
│ │ TI: 1-PropZInt | R: prop.test(x, n)$conf.int
│ │
│ └── Does the question give a specific claimed value p0 to check?
│ ("is it 90%?" "test the claim that...")
│ → HYPOTHESIS TEST for one proportion
│ TI: 1-PropZTest | R: prop.test(x, n, p = p0, alternative = ...)
│
└── NUMERICAL → you are estimating or testing a MEAN (μ)
│
├── Does the question ask "what's a plausible range for μ?"
│ → CONFIDENCE INTERVAL for one mean
│ TI: TInterval | R: t.test(~y, data=, mu=) or tsum.test(...)$conf.int
│
└── Does the question give a specific claimed value μ0 to check?
("is the true mean 25?" "test the claim that...")
→ HYPOTHESIS TEST for one mean
TI: T-Test | R: t.test(~y, data=, mu = μ0) or tsum.test(..., mu = μ0)Reading a problem for its variable type (categorical → proportion; numerical → mean) and its verb (estimate/plausible range → interval; test/claim/is it true that → hypothesis test) is the whole procedure. Everything below fills in the details of each branch.
1.22. The master decision table¶
| Response type | Goal | Procedure | TI-83/84 | R (mosaic/BSDA) | Chapter |
|---|---|---|---|---|---|
| Categorical (one proportion) | Estimate | One-proportion z-interval | 1-PropZInt | prop.test(x, n)$conf.int | Ch 6 |
| Categorical (one proportion) | Test a claim | One-proportion z-test | 1-PropZTest | prop.test(x, n, p = p0, alternative =) | Ch 6 |
| Numerical (one mean, unknown) | Estimate | One-mean t-interval | TInterval | t.test(~y, data=) or tsum.test(...)$conf.int | Ch 7 |
| Numerical (one mean, unknown) | Test a claim | One-mean t-test | T-Test | t.test(~y, data=, mu = μ0) or tsum.test(..., mu = μ0) | Ch 7 |
| Numerical (one mean, known, rare) | Estimate / test | One-mean z-interval / z-test | ZInterval / Z-Test | zsum.test(...) | Ch 5 preview |
Data on hand as a full list, or only summary statistics (, , )? Either
way the choice of procedure above doesn’t change — only which R function you call
does. From summary statistics, use the BSDA sum tests (tsum.test(),
zsum.test()); with raw data loaded in R, use t.test(). See the R Quick
Reference.
1.33. Confidence interval or hypothesis test — which does the question want?¶
| Clue words in the problem | You want |
|---|---|
| “estimate,” “plausible range,” “how big is,” “construct a ___% interval for” | confidence interval |
| “test the claim,” “is it true that,” “has changed,” “is different from,” a stated or significance level | hypothesis test |
Every procedure above reports both when you run it in R — prop.test(),
t.test(), and the BSDA *sum.test() functions each print a test decision and
a confidence interval in the same call, so you don’t lose anything by running one
when the question technically asked for the other. On the calculator, though, you
must choose the matching menu item (Int vs. Test) yourself.
1.44. Before you trust any result — check the conditions¶
Every procedure in this course assumes something about how the data were collected. Skipping the check doesn’t break the arithmetic, but it does break the guarantee behind “95% confident” or the p-value.
| Procedure | Conditions to check |
|---|---|
| One-proportion interval / test | Independence (random sample, or random assignment; each observation doesn’t affect another) and success–failure: interval needs and ; test needs and |
| One-mean interval / test (t) | Independence (random sample) and the population is approximately Normal, or the sample size is large enough ( is the common rule of thumb) that the Central Limit Theorem covers you regardless of the population’s shape |
If a condition fails — say, , or a small, clearly skewed sample — the Normal/t-based procedure above may give a misleading interval or p-value. Say so in your conclusion rather than reporting a number you don’t trust; your instructor would rather see “the success–failure condition fails here, so this z-interval should be interpreted with caution” than a silently invalid answer.