Chapter 3 Hypothesis Testing
Chapter 3 Hypothesis Testing
CHAPTER 3
3. Hypothesis testing
3.1 Basic concepts
Hypothesis testing is one way of making statistical inference. Hypothesis testing helps us
to determine whether a hypothesis is strongly supported by information from sample data
or not.
Definition:
Test statistic: is a statistics whose value serves to determine whether to reject or accept
the hypothesis to be tested. It is a random variable.
Statistic test: is a test or procedure used to evaluate a statistical hypothesis and its value
depends on sample data.
Null hypothesis:
- It is the hypothesis to be tested.
- It is the hypothesis of equality or the hypothesis of no difference.
- Usually denoted by H0.
Alternative hypothesis:
- It is the hypothesis available when the null hypothesis has to be rejected.
- It is the hypothesis of difference.
- We use non-equality such us: , and signs in alternative hypothesis.
- Usually denoted by H1 or Ha
Example: A language instructor believes that the average age of students in this class is
20 years. In this case, the null and alternative hypothesizes are give as follow:
H 0 : The average age of students in this class is 20 years.
H 1 : Not H 0 . Symbolically
Page 1 of 7
Chapter 3 hypothesis testing
H 0 : = 20
H 1 : 20 which is calledTwo sided hypothesis
H 1 : 20, 20 which are called one sided hypothesis
Based on information contained in sample data we can either reject or not null
hypothesis. A choice of rejecting or not of H 0 is based on hypothesis testing.
values which lead us to reject H 0 is called rejection region or critical region. A boarder
line between rejection region and acceptance region is called critical value. The area of
rejection region denoted by is called level of significance. In any decision making there
are four types of decision.
Reality
H 0 is true H 0 is false
➢ P(type II error ) =
Page 2 of 7
Chapter 3 hypothesis testing
ii. H 0 : = 0 versus H1 : 0
iii. H 0 : = 0 versus H1 : 0
Here the test statistic is x . If the sample is from normal population with known 2 or if
sample size is large, then the sampling distribution of x is normal.
2
Under H 0 , x ~ N ( o , ) . Consider H 0 : = 0 versus H1 : 0 . In this case, we
n
reject H 0 if Z Z 2 or Z − Z 2 Z Z 2
Similarly we have:
ii. For H 0 : = 0 versus H1 : 0
x − 0
if Z cal = Z
n
x − 0
if Z cal = −Z
n
Summary of decision making if the population is normal with known variance or if
sample size (n) is large:
No Alternative Hypothesis Rejected H 0 if Do not rejected H 0 if
2 H1 : 0 Z cal Z Z cal Z
3 H1 : 0 Z cal −Z Z cal −Z
Note: If 2 is unknown, but n is large, use s 2 in place of 2 use the above procedure.
The general steps in hypothesis testing are:
Step1. Formulate the appropriate null hypothesis and alternative
Step2.Determine the level of significance
Page 3 of 7
Chapter 3 hypothesis testing
Step1. H 0 : = 28 versus H 1 : 28
Step2. = 0.05
x − 0 29.8 − 28
Step3. Z cal = = = 2.28
n 5 40
Step7. There is evidence showing that there is significant difference between the national
average score for that of the selected region
Exercise: Do the above problem for 1% level of significance.
Example: A normal population has all unknown mean and variance 13. Ten observations
are chosen at random from this population has mean 12.4. Test whether the population
mean is exceeds 10 at 5% level of significance.
Solution: Given that population is normal, 0 = 10, 2 = 13, n = 10, x = 12.4, = 0.05
Step1. H 0 : = 10 versus H 1 : 10
Step2. = 0.05
Page 4 of 7
Chapter 3 hypothesis testing
x − 0 12.4 − 10
Step3. Z cal = = = 2.1
n 13 10
Step7. There is sufficient evidence showing that the population mean exceeds 10.
Hypothesis testing about mean when 2 unknown and n-small
If a sample of small size (n) taken from normally distributed population with unknown
x − 0
variance 2 , we estimate 2 by s 2 , and t cal = ~ t (n −1) . In this case the critical value
s n
Summary of decision making if the population is normal with unknown variance and
sample size (n) is small:
No Alternative Hypothesis Rejected if H 0 Do not rejected H 0 if
2 H1 : 0 t cal t (n − 1) t cal t (n − 1)
Example: A sample of 15 observations taken from normal population which has sample
mean of 38.8 and standard deviation of 2.56. Test whether population mean is 40 or not
at 5% level of significance.
Solution: Given 0 = 40, s = 2.56, n = 15, x = 38.8, = 0.05 and population is
normal.
Step1. H 0 : = 40 versus H 1 : 40
Step2. = 0.05
x − 0 38.8 − 40
Step3. t cal = = = −1.82
s n 2.56 15
Page 5 of 7
Chapter 3 hypothesis testing
i. H 0 : P = P0 versus H1 : P P0
ii. H 0 : P = P0 versus H1 : P P0
iii. H 0 : P = P0 versus H1 : P P0
Decision rule
No Alternative Hypothesis Rejected if H 0 Do not rejected H 0 if
1 H 1 : P P0 Z cal Z 2 Z cal Z 2
2 H 1 : P P0 Z cal Z Z cal Z
3 H 1 : P P0 Z cal −Z Z cal −Z
Pˆ − P0
Z cal = ~ N (0, 1)
P0 (1 − P0 )
n
Example: Among from students in RVU Bishoftu campus, a random sample 250
students was taken and out of these students 38 are found to be left handed. Can it be
concluded that the proportion of left handed students in RVU Bishoftu campus is 0.12?
Use = 0.02
Page 6 of 7
Chapter 3 hypothesis testing
normal.
Step1. H 0 : P = 0.12 versus H 1 : P 0.12
Step2. = 0.02
Pˆ − P0 0.152 − 0.12
Step3. Z cal = = = 1.56
P0 (1 − P0 ) 0.12(1 − 0.12)
n 250
Step4. The critical value is Z 2 = Z 0.02 2 = Z 0.01 = 2.325
Step7. There is evidence supporting that the proportion of left handed students in RVU
Bishoftu campus is not significantly different from 0.12.
Page 7 of 7