Statistics 9: Hypothesis Tests for Proportions
theory behind hypothesis testing
-find out how many standard deviations away from the proposed value our sample proportion is (a z-score) -ask how likely it is to observe the data we did if H0 were true
what does the test statistic tell us?
-how much evidence we have (is it enough?) -what does our data tell us?
alternative hypothesis
-hypothesis stating what the researcher is seeking evidence of/"interested in showing" -contains the values of the paramter that we consider plausible if we reject the null hypothesis
what does the conclusion state?
-if we reject or fail to reject the null hypothesis -an interpretation of the conclusion in context of the problem
what question does hypothesis testing answer?
-is the proportion less than/greater than/not equal to some value? -if the given value is true, how likely is it that an observed value of x on a sample size of y would occur?
rules for conclusion: if p-value < α:
-since p-value < α, we reject H0 and conclude Ha -we have enough evidence at the α-level to conclude Ha
rules for conclusion: if p-value < α:
-since p-value > α, we fail to reject H0 and cannot conclude Ha -we do not have enough evidence at the α-level to conclude Ha
null hypothesis
-the starting hypothesis, a statement or idea that can be falsified, or proved wrong -hypothesis we assume is true unless evidence provides otherwise (the status quo)
conducting 2-sided hypothesis tests with confidence intervals
1. if P0 is in the confidence interval, then fail to reject H0 2. if P0 is not in the confidence interval, reject H0
assumptions for hypothesis testing
1. random sample? 2. n < 10%? 3. NP0 and N(1-P0) > 10?
steps of hypothesis testing
1. set up hypotheses 2. check assumptions/conditions 3. calculate the test statistic 4. find the p-value 5. make a conclusion/interpretation
null hypothesis annotation
H0: paramter = hypothesized value H0: P = P0
alternative hypothesis annotation
Ha: P < P0 Ha: P > P0 Ha: P =/= P0
what is the power of a test?
a test's ability to detect a false null hypothesis (when H0 is fale and we reject it, we have done the right thing)
how do you approximate a hypothesis test by examining a confidence interval?
ask whether the null hypothesis value is consistent with the confidence interval for the parameter (with 2-sided tests)
Idea of Hypothesis Testing
compare our data to what we would expect given that H0 is true
when stating the hypothesis, what else should always be included?
definition of proportion in terms of the problem
type 2 error
failing to reject a false null hypothesis
interpretation of a p-value:
given that H0 (the null) is true, we would observe (z-stat) at least as small/large/extreme as we did ___% of the time
p-value if data are consistent with the model from the null hypothesis
high p-value fail to reject the null hypothesis
what does the test statistic number show?
how many standard deviations from the hypothesized value P0
what does p-value quantify?
how surprised we are to see our results IF H0 were true
When do we reject the null hypothesis?
if the obtained probability is equal to or less than the critical probability level (if the p-value is small enough)
how can you get more power?
increase sample size, n
metaphor for hypothesis testing
jury trial - gather evidence to accept or reject the initial hypothesis (begin by assuming that a null hypothesis is true, consider whether the data provides evidence against the null hypothesis, conclude based on amount of evidence)
p-value if data are NOT consistent with the model from the null hypothesis
low p-value reject the null hypothesis
type 1 error
mistakenly rejecting null hypothesis when it is true
what happens if we reduce type 1 error (α)?
must automatically increase type 2 error
does a big p-value prove that th enull hypothesis is true?
no, but it does not offer enough evidence that it is not true
how can we qualify our level of doubt?
p-value
if the alternative hypothesis is Ha: P =/= P0:
p-value = 2Pr(z < -|z-stat|) =2(value of negative z-stat from z-table)
if the alternative hypothesis is Ha: P < P0:
p-value = Pr(z < z-stat) = value when you look up z-stat in z-table
if the alternative hypothesis is Ha: P > P0:
p-value = Pr(z > z-stat) = 1-(value of z-stat from z-table)
p-value
probability that the observed test statistic value (or a further extreme) would occur if the null hypothesis were correct
what does the p-value tell us?
quantifies the evidence we have
what distribution results when the conditions are met and the null hypothesis is true?
standard normal distribution
what do we mean when we say that a test is "statistically significant"?
the test statistic led to a p-value lower than our α-level
what is the relationship between confidence intervals and hypothesis tests?
they are built from the same sampling distribution and answer different question
three interests of the true proportion and hypothesized value in H0
true proportion being: -less than/lower tail/lower-sided -greater than/upper tail/upper-sided -different than/not equal to/2-tailed/2-sided hypothesized H0 value
what happens if we increase sample size, n, and leave α the same?
type 2 error decreases
why don't we ever declare the null hypothesis to be true?
we never know, instead we can fail to reject it
what does a large p-value mean?
what we observed is not surprising (the results are in line with the null hypothesis so we have no reason to reject it)
what does a small p-value mean?
what we observed is surprising (the results are not in line with our null hypothesis so we reject it)
does a small p-value prove that the null hypothesis is true?
yes, a small p-value proves that the null hypothesis is not true based on the given α-level
test statistic
z = (P0 - (1-P0))/((P0 x (1-P0))/N)^(1/2))
what is the probability of a type 1 error?
α
what is the default α if no value is given?
α = 0.05
what measure determines if p-values is "low enough"?
α level