Terms
Null hypothesis
- Assumed to be true
- Tested to be rejected or not to be rejected
Alternative hypothesis
- The underlying question
- Complement of
Test statistics
- Quantity derived from samples
- e.g. for , for
Errors
- Type I Error
- Type II Error
- Power
Only either one of or of can be minimized
| Not reject | Reject | |
|---|---|---|
| true | ✔️ | Type I error |
| true | Type II error | ✔️ |

Testing
Direct/Indirect comparison
There are two ways to evaluate a test, either by statistics value, e.g. , or by probability value, i.e.
Testing with Known
| Test | Hypothesis | Reject at a significance level if | Rejection Region |
|---|---|---|---|
| Two-sided Test | |||
| One-sided Less Test (Left) | |||
| One-sided Greater Test (Right) |
One-sided Greater Test Example
Testing with Unknown
| Test | Hypothesis | Reject at a significance level if |
|---|---|---|
| Two-sided Test | ||
| One-sided Less Test (Left) | ||
| One-sided Greater Test (Right) |
p-value Example
- p-value is the probability of obtaining a test result that is equal or more extreme (in the direction of rejecting ) than the actually observed result, under
- Reject at a significance level if
- is the t-value, note that is the observed value
One sided
Two sided
Power of t-test
Leave 1 variable NULL to find the unknown, delta is
power.t.test(n = NULL, delta = NULL, sd = 1, sig.level = 0.05,
power = NULL,
type = c("two.sample", "one.sample", "paired"),
alternative = c("two.sided", "one.sided"))
Larger > smaller power
Larger > larger power
Larger > larger power
Testing with Unknown
| Test | Hypothesis | Reject at a significance level if | p-value, |
|---|---|---|---|
| Two-sided Test | |||
| One-sided Less Test (Left) | |||
| One-sided Greater Test (Right) | |||
|  |