17 - Statistical Tests Flashcards
Hypothesis Test
- allows us to make a decision between 2 options
- provides a measure of the weight of evidence against the null hypothesis ⇒ p-value
- p-value adds more force to your conclusions
- quantifies the 2 types of errors, Type 1 and Type 2, alpha and beta
null and alternative hypotheses
null (H0) = status quo
alternative (H1) = converse of the null
Type 1 Error
alpha
Reject H0 incorrectly
false positive
innocent, but declare guilty
null true, but go with alternative
Type 2 Error
beta, ß
Retain H0 even when Ha is true
false negative
guilty, but say innocent
alternative true, but go with null
test statistic
sample statistic that estimates the population parameter specified by the null and alternative hypotheses.
The test statistic determines…
whether we reject H0
“What is the chance of getting a test statistic this far from H0 if H0 is true?”
Normal model for the sampling distribution of p^
p^ ~ N[p, p(1-p)/n]
Significance Level
a; the chance of making a Type I error
Ex. if cut-off value for the test is 2, a=.05
if cut-off value for test is 1.645, a=.10
t-test statistic
test statistic for testing a single mean against a hypothesized value
t-stat = (Xbar-µ0)/(s/sqr(n))
n = sample size, s = sample SD
Xbar = sample mean
µ0 = hypothesized value under the Null
**calculating how far away what we see (Xbar) is away from what we expect (µ0), but on a standardized scale (the Empirical Rule scale)
Assumptions for t-test statistic
- SRS
- sample size small compared to pop size (less than 10%)
- sample size large enough for CLT to have kicked in
p-value
measures credibility of Null
small p-values give evidence against the Null
- small p says it would be hard to replicate under Null → evidence against Null
- since you should be able to replicate observed results if Null is true
also: the p-value is the smallest alpha-level at which H0 can be rejected
P-value mantra
If the p-value is less than 0.05, then reject H0 at the a=0.05 level of significance
Testing Process
- Compare the test-statistic to the cut-off value or compare the p-value to a
- If the test statistic exceeds the cut-off value or the p-value is less than a then reject H0.
**cut-off value comes from looking up the appropriate quantile in the t-tables, but value is rounded to 2 for simplicity when the test is two-sided and a = 0.05
Power of a test
1-ß (doing the right thing when the alternative is true)
Z-test for population proportion
Z = (p^-p0)/sqr[p0(1-p0)/n]