Hypothesis Testing
Testing a statistical hypothesis. If the conjecture is false then the complementary hypothesis must be true
Critical Region and
- critical region
is implemented on the observed values of a statistic, and the decision rule depends on the distribution of that statistic and - Error types
To test a simple null hypothesis
For a more general framework
If a test satisfies
General procedure
- Formulate
and and specify the size of test - Find an appropriate test statistic - generally a Pivot Statistic with a distribution not dependent on the parameters under the
- Determine the critical region based on the size of test
- Compute the value of the observed test statistic based on the sample data
- Reject
if the observed value falls in the critical region, otherwise do not reject
More specifically:
Test of Means
Test of difference between means
Test of Variances
Test of Proportions
Test of k proportions
Goodness of fit test
intro stats
- translating a question into a hypothesis about the value of a parameter(s)
- we then carry out a statistical test of that hypothesis
- Hypothesis Types
- logic of hypothesis testing
- consists of
- Formulating a null hypothesis (
) and an alternative hypothesis ( ). These hypotheses are based on the research question of interest, and not on the observed sample data. - Choosing and calculating an appropriate test statistic.
- based on sample data
- will yield a p-value
- Stating an assessment of the strength of the evidence against the null hypothesis.
- Properly interpreting the results in the context of the problem at hand.
- Formulating a null hypothesis (
- example
- tom says he can get heads more often
(Tom's probability of getting heads is 0.5) - if null hypothesis is true then we have a binomial distribution with parameters
- what's
(evidence against the null hypothesis) (p-value) - there's strong evidence that Tom's probability of tossing heads is greater than 0.5
- if null hypothesis is true then we have a binomial distribution with parameters
- tom says he can get heads more often
- consists of
- hypothesis tests for a population mean
- assuming we have a simple random sample from a normally distributed population
- constructing appropriate hypotheses
- is there strong evidence that
differs from a hypothesized value? 's: - one-sided alternatives
- if we only care about one side
- two sided alternative
- proves more
- one-sided alternatives
- is there strong evidence that
- Test Statistics
- recap
has the standard normal distribution has the t distribution with degrees of freedom
- depends if we know
or not (like in CI) - if the null hypothesis is true
- Z test statistic has the standard normal distribution
- t test statistic has a t distribution with n-1 degrees of freedom
- the observed value of the test(t) statistic tells us how many standard errors of the value of
is from the hypothesized value of - SE = standard error (estimates standard deviation)
- recap
- rejection region approach
- one method of determining whether the evidence against the null hypothesis is statistically significant
- steps
- decide on an appropriate value of
, the significance level of the test - often chosen to be a small value (like 0.05)
- probability of rejecting the null hypothesis, given it's true
- find the appropriate rejection region
- calculate the value of the appropriate test statistic
- reject the null hypothesis if the test statistic falls in the rejection region
- / say that the evidence against
(and in favour of ) is statistically significant at the level of significance - we're not actually making a decision between the hypothesis, we're just assessing the evidence
- rejecting a hypothesis is very strong
- we're not actually making a decision between the hypothesis, we're just assessing the evidence
- / say that the evidence against
- decide on an appropriate value of
- examples
- we wish to test the null hypothesis
against - suppose
and we're doing a z test - same logic as confidence interval
- reject
or - or say that we have statistically significant evidence against
at
- or say that we have statistically significant evidence against
- suppose
- reject
if - suppose it's a t with 10 degrees of freedom
- then we reject if
- then we reject if
- reject
- reject
if - imagine 3 z statistic values
- 1.64
- do not reject
at
- do not reject
- 1.65
- reject
at
- reject
- 37.6
- eject
at
- eject
- 1.64
- reject
- we wish to test the null hypothesis
- P-values