sadc course in statistics basic principles of hypothesis tests (session 08)
TRANSCRIPT
SADC Course in Statistics
Basic principles of hypothesis tests
(Session 08)
2To put your footer here go to View > Header and Footer
Learning Objectives
By the end of this session, you will be able to• explain what is meant by a null hypothesis
and an alternative hypotheses• write down a null hypothesis that would
enable a claim about some event to be tested statistically
• write down the alternative hypothesis corresponding to the null hypothesis
• describe clearly the two types of errors that arise when testing the null against the alternative hypothesis
3To put your footer here go to View > Header and Footer
From Objectives to HypothesesConsider the following claims made by (say)a local NGO…
• The under-five mortality rate in year 2000 in sub-Saharan Africa is significantly lower than its value in 1990 of 185 per 1000 live births
• Mean years of education, of the heads of households in Tanzania, differ according to the gender of the household head
• There is a relationship between level of access to clean water and the number of episodes of diarrhoea in the household
4To put your footer here go to View > Header and Footer
Testing a given claimQuestion: Is there an evidence-based approach to
test these claims?
Question: If so, how can the claim be tested?
Answer: Set up a hypothesis in a very precise way and use data to reject, or fail to reject the hypothesis.
This hypothesis is called the null hypothesis
It is usually denoted by H0.
We now recast the claims on slide 3 in the formof a series of null hypotheses.
5To put your footer here go to View > Header and Footer
Formulating the null hypothesis
H0: The average under-five mortality rate in
year 2000 in sub-Saharan Africa is 185 deaths per 1000 live births
H0: Mean years of education, of the heads of
households in Tanzania, are equal in male headed and female headed HHs
H0: There is NO relationship between level of
access to clean water and the number of episodes of diarrhoea in the household
Note that the null is very exactly stated!
6To put your footer here go to View > Header and Footer
What if H0 is untrue?
Need also to set up alternative hypothesis H1 which must be preferred if H0 is rejected
H1: The average under-five mortality rate in year 2000 in sub-Saharan Africa is not equal to 185 deaths per 1000 live births
H1: Mean years of education, of the heads of households in Tanzania, are unequal across the gender of the household head
H1: There is a relationship between level of access to clean water and the number of episodes of diarrhoea in the household
7To put your footer here go to View > Header and Footer
Mathematical formulation
Let be the mean under-five mortality rate in year 2000
Let the mean number of years of education of male and female heads of HHs in Tanzania, be 1 and 2 respectively
Then the first two hypotheses above may be written as
H0: =185 versus H1: 185, and
H0: 1 = 2 versus H1 : 1 2
8To put your footer here go to View > Header and Footer
Data needed for tests about means
• Since the null and alternative hypotheses concern the unknown population means, the test is based on the sample means.
• For our 1st example, find that in year 2000, the mean under-5 mortality from results of 30 countries gives
mean = 138.1, std. error=14.03
Do you think this provides evidence against the null hypothesis? Discuss this in small groups, using intuitive arguments.
9To put your footer here go to View > Header and Footer
The second exampleFor our 2nd example, find:
mean = 6.62 years for males
mean = 6.46 years for females
Thus difference in mean = 0.16
The 95% confidence interval for this difference is: (-0.174, 0.495)
Do you think this provides evidence against the null hypothesis? Again, discuss this in small groups, using intuitive arguments.
10To put your footer here go to View > Header and Footer
Discussion of findings…
What are your conclusions from the discussions above?
Did you pay attention to the change that had occurred and considered whether (from an intuitive point of view) this change constituted a large change?
Did the value of the standard error help?
Did knowledge of the confidence limits help?
11To put your footer here go to View > Header and Footer
What sample statistics to use?
In both examples above, we used the sample mean because the claim concerned one or more means
Suppose we were in the year 2015, and want to test the claim by donors that “the proportion of people living below the poverty line is less than half?”
What is the sample statistic you would use in this case?
Can you write down the null and alternative hypotheses here?
12To put your footer here go to View > Header and Footer
Two types of errors
In testing the null hypothesis against thealternative hypothesis, two errors can arise…
1. Rejecting the null hypothesis when it is actually true
2. Failing to reject the null hypothesis when the alternative is true
Probabilities associated with the occurrence ofthese errors are denoted by and respectively.
13To put your footer here go to View > Header and Footer
More formally…
= Prob(Rejecting H0| H0 true)
= Prob(Failing to reject H0| H1 true)
is called the Type I error, while is called the Type II error.
Of course we want to minimise these errors.
This is not usually possible simultaneously.
So in practice, is pre-set, usually to a value < 0.05, with the hope that would be relatively small.
14To put your footer here go to View > Header and Footer
Power of test
Note that 1 - is called the power of the test, i.e.
Power = Prob (Rejecting H0 | H1 true)
= 1 – Prob(Type II error)
It is often used in sample size calculations where testing is involved.
15To put your footer here go to View > Header and Footer
Some practical work follows…