You are on page 1of 22

MODULE 5:

HYPOTHESIS TESTING 1
Dr.Avinash Kumar Mittal
TOPICS TO BE COVERED
• Testing of Hypothesis: Introduction
• Types of Errors
• Critical Region
• Procedure of testing hypothesis
• Large sample tests
• Z-test for single proportion
• Difference of proportion
• Mean
• Difference of Means
Testing of Hypothesis
Assumptions:
•All samples are independent
•It follows Normal Distribution
Distribution:
T- distribution
F-Distribution
𝜒 2 - Distribution
Definitions
Population: A population consist of the totality of all the observations
Sample: A sample is the subset of the population
Hypothesis: A statistical hypothesis is an assertion concerning of one or more population
Test of Hypothesis: Procedure that enable us to decide whether to accept or reject the
hypothesis
Test Statistics: Any function of random variables concerning random samples is called a test
statistics.
Let 𝑋1 , 𝑋2 , … , 𝑋𝑛 represents the random sample of size 𝑛 then the sample mean is defined by
𝑛
𝑋
the statistics 𝑋 = 𝑖=1 𝑖
𝑛
𝑛 2
𝑖=1(𝑋𝑖 ;𝑋)
Sample variance is defined by the statistics 𝑆2 =
𝑛;1
Null and Alternate Hypothesis:
The hypothesis which we need to test is denoted as 𝐻0 is called as Null Hypothesis
The rejection of 𝐻0 leads to the acceptance of an alternate hypothesis denoted by 𝐻1
Critical Value:
The value of the test statistics which separates the critical region and acceptance region is called
critical value
Critical Region:
A region corresponding to a test statistics in a sample space which amounts to the rejection of
null hypothesis is called the critical region
Acceptance Region:
The region of the sample space which amount to the acceptance of null hypothesis is called
acceptance region.
Type I Error:
Rejection of Null Hypothesis when it is true.
Type II Error:
Acceptance of Null Hypothesis when it is false
Level of Significance:
The probability of Type I Error is called Level of Significance denoted by ′𝛼′
Similarly, the probability of type II Error is ′𝛽′
𝑃 𝑇𝑦𝑝𝑒 𝐼 𝐸𝑟𝑟𝑜𝑟 = 𝛼, 𝑃 𝑇𝑦𝑝𝑒 𝐼𝐼 𝐸𝑟𝑟𝑜𝑟 = 𝛽
One & Two Tailed Test
𝐻0 : 𝜃 = 𝜃0 ;
One Sided
𝐻1 : 𝜃 < 𝜃0
𝐻1 : 𝜃 > 𝜃0
Two Sided
𝐻1 : 𝜃 ≠ 𝜃0
One Tail Test
The test of any statistical hypothesis where the alternative is one sided such as
𝐻0 : 𝜃 = 𝜃0 ; 𝐻1 : 𝜃 < 𝜃0 or
𝐻0 : 𝜃 = 𝜃0 ; 𝐻1 : 𝜃 > 𝜃0

𝑍=𝛼

𝑍 = −𝛼
Two tail test
The test of any statistical hypothesis where the alternative is one sided such as
𝐻0 : 𝜃 = 𝜃0 ; 𝐻1 : 𝜃 ≠ 𝜃0

𝑍 = −𝛼/2 𝑍 = 𝛼/2
Large Sample and Single Mean
Large Sample: 𝑛 > 30,
Test of Significance for Single Mean
Let 𝑋 - Sample Mean
𝜇- Population Mean
𝜎 2 -Population Variance
𝑛-sample size
Step 1:
𝐻0 : 𝜇 = 𝜇0
𝐻1 : 𝜇 ≠ 𝜇0 ; 𝜇 > 𝜇0 ; 𝜇 < 𝜇0
Step 2: Identity the critical region & Acceptance Region
𝑋;𝜇 𝑋;𝜇
Step 3: Test Statistics , 𝑍 = , if 𝜎 is known, 𝑍 = , if 𝜎 is unknown,
𝜎/ 𝑛 𝑠/ 𝑛
Step 4: Compare the test statistics and critical value to conclude
Level of Significance
Level of Significance, 𝛼 1% 5%
0.01 0.05
One tail test -2.33 or 2.33 -1.645 or 1.645
Two tail test -2.58 & 2.58 -1.96 & 1.96
Problems
1. A manufacturer of sports equipment has developed a fishing net & claims that it has a mean
breaking strength of 8 kg with the S.D of 0.5 kg. Test the hypothesis that 𝜇 ≠ 8 if a random
sample of 50 nets are tested & found to have a mean breaking strength of 7.8 kgs. Use 1% level
of significance.
Solution:
𝑛 = 50, 𝜇 = 8𝑘𝑔, 𝜎 = 0.5𝑘𝑔, 𝑥 = 7.8𝑘𝑔, 𝛼 = 0.01
Step 1: 𝐻0 : 𝜇 = 8, 𝐻1 : 𝜇 ≠ 8
Step 2: 𝛼 = 0.01 & it is two tailed test, Critical Values 𝑍 < −2.58 & 𝑍 > 2.58
𝑋;𝜇 7.8;8
Step 3: 𝑍𝐶𝑜𝑚𝑝𝑢𝑡𝑒 = = 0.5 = −2.828
𝜎/ 𝑛
50

Step 4: 𝑍𝑐𝑜𝑚𝑝𝑢𝑡𝑒 = −2.828 < −2.58


Reject 𝐻0
2. A tracking firm is suspicious of the claim that the average lifetime of certain tyres is at most
28,000 miles to check the claim puts 40 of these tyres on its trucks & get a mean lifetime of
27,463 miles with SD 1,348 miles. What can it conclude if the probability of the Type I Error is at
most 1%.
Solution:
𝑛 = 40, 𝛼 = 0.01, 𝑥 = 27,463 miles, 𝑠 = 1348 miles, 𝜇 = 28,000 miles
Step 1: 𝐻0 : 𝜇 = 28000, 𝐻1 : 𝜇 > 28000
Step 2: 𝛼 = 0.01 & it is one tailed test, Critical Value 𝑍 > 2.33
𝑋;𝜇
Step 3: Z = = −2.519 < 2.33
𝑠/ 𝑛

Therefore, Reject 𝐻1 & Accept 𝐻0


Hypothesis Concerning Two mean
Large Sample: 𝑛 ≥ 30
𝑋1 ;𝑋2 ;𝛿
𝑍=
𝜎2 2
1 :𝜎2
𝑛1 𝑛2

Where 𝛿 = 𝜇1 − 𝜇2
If 𝛿 = 0, we claim there is no significance difference between two population
Problem
1) To test the claim that the resistance of electrical wire is at most 0.05 ohms by alloying. 32
values are obtained for standard wire yielded 𝑥1 = 0.136 & 𝑠1 = 0.004 and another 32 values
of alloyed wire yielded 𝑥2 = 0.083 ohm & 𝑠2 = 0.005 ohm at 5% level of significance does it
supports the claim.
Solution
𝑛1 = 32, 𝑛2 = 32, 𝑥1 = 0.136, 𝑠1 = 0.004, 𝑥2 = 0.083, 𝑠2 = 0.005
Step 1: 𝐻0 : 𝜇1 − 𝜇2 < 0.05; 𝐻1 : 𝜇1 − 𝜇2 > 0.05
Step 2: 𝛼 = 5%, 𝑍𝛼 = 1.645. Therefore Reject 𝐻0 if 𝑍 > 1.645
𝑋1 ;𝑋2 ;𝛿
Step 3: 𝑍 = = 2.65
𝜎2 2
1 :𝜎2
𝑛1 𝑛2

Reject 𝐻0
Level of Significance
Level of Significance, 𝛼 1% 5%
0.01 0.05
One tail test -2.33 or 2.33 -1.645 or 1.645
Two tail test -2.58 & 2.58 -1.96 & 1.96
Tests of significance for single
proportion
If 𝑋 is the number of successes in n independent trials with constant probability 𝑃 of success for each
trial, then 𝐸 𝑋 = 𝑛𝑃, 𝑉 𝑥 = 𝑛𝑃𝑄 where 𝑄 = 1 − 𝑃
Hence for large 𝑛, 𝑋~𝑁(𝑛𝑃, 𝑛𝑃𝑄)
𝑋;𝑛𝑃
Test Statistics, 𝑍 =
𝑛𝑃𝑄

Remark: In a sample of size 𝑛, let 𝑋 be the number of persons possessing the given attribute. Then
𝑋
observed proportion of success= 𝑛 = 𝑝
𝑋 1 1
𝐸 𝑝 =𝐸 𝑛
= 𝑛 𝐸 𝑋 = 𝑛 . 𝑛𝑃 = 𝑃
𝑋
Since 𝑋 and consequently 𝑛 is asymptotically normal for large 𝑛, the normal test for the proportion of
𝑝;𝑃
success become: 𝑧 =
𝑃𝑄
𝑛
1. In a sample of 1000 people in Maharashtra, 540 are rice eaters and the rest are wheat eaters.
Can we assume that both rice and wheat are equally popular in this state at 1% level of
significance?
Solution:
Given 𝑛 = 1000, 𝑋 = Number of rice eaters = 540
Step 1: 𝐻0 :Both rice and wheat are equally popular in this state, P = 0.5
𝐻1 : 𝑃 ≠ 0.5
Step 2: Two tailed test, Critical region 𝑍 < −2.58 & 𝑍 > 2.58
𝑋;𝑛𝑃 540;1000 0.5 40
Step 3: Test Statistics, 𝑍 = = = = 2.530
𝑛𝑃𝑄 1000(0.5)(0.5) 250

Step 4: Accept 𝐻0 . There fore Rice and wheat are equally popular in Maharashtra State.
2. One twenty people were attacked by a disease and only 47 survived. Will you reject the
hypothesis that the survival rate, if attacked by this disease, is at most 30%, at 5% level of
significance.
Solution:
𝑛 = 120, 𝑋 = 47, 𝛼 = 0.05
Step 1: 𝐻0 : 𝑃 < 0.30, 𝐻1 : 𝑃 > 0.30
Step 2: Critical Region: 𝑍 > 1.645
𝑋;𝑛𝑃 47;120 0.30
Step 3: Test Statistics, 𝑍 = = = 2.193
𝑛𝑃𝑄 120(0.30)(0.70)

Step 4:Reject 𝐻0
Test of significance of the difference
between two sample proportions
𝑋1 𝑋2
;
𝑛1 𝑛2 (X1 :X2 )
Test Statistics, 𝑍 = where 𝑝 =
1 1 𝑛1 :𝑛2
𝑝 1;𝑝 𝑛 :𝑛
1 2

Or
𝑋1 𝑋2
𝑝1 = ,𝑝 =
𝑛1 1 𝑛2
𝑝1 ;𝑝2
𝑧= 1 1
𝑃𝑄(𝑛 :𝑛 )
1 2
𝑛1 𝑝1 :𝑛2 𝑝2
P is unknown: 𝑝 = is used in the place of 𝑃
𝑛1 :𝑛2
1. Random samples of 400 men and 600 women were asked whether they would like to flyover near their
residence. 200 men and 325 women were asked in favour of the proposal. Test they hypothesis that
proportions of men and women in favour of the proposal, are same against that they are not, at 5% level.
Solution:
Given:𝑛1 = 400, 𝑛2 = 600, 𝑋1 = 200, 𝑋2 = 325
Step 1:
Null Hypothesis: 𝑃1 = 𝑃2 = 𝑃 there is no significant difference between the opinions of men and women as far as
proposal of flyover is concerned
Alternative Hypothesis: 𝑃1 ≠ 𝑃2
Step 2: Critical region: 𝑍 < −1.96 & Z > 1.96
𝑋1 𝑋2
; (X1 :X2 )
𝑛1 𝑛2
Step3: Test Statistics, Z = where 𝑝 =
1 1 𝑛1 :𝑛2
𝑝 1;𝑝 𝑛 :𝑛
1 2
200 325
200:35 ; 0.04167
400 600
𝑝= = 0.235 , 𝑍 = =− = −1.5208
400:600 1 1 0.0274
0.235 1;0.235 :
400 600

Step 4: Accept 𝐻0
2. Before an increase in excise duty on tea, 800 persons out of a sample of 1000 persons were
found to be tea drinkers. After an increase in duty, 800 people were tea drinkers in a sample of
1200 people. Using standard error of proportion at 1% level of significance, state whether there
is a significant decrease in the consumption of tea after the increase in excise duty?
Solution:
𝑛1 = 1000, 𝑛2 = 1200, 𝑋1 = 800, 𝑋2 = 800
Step 1: Hypothesis: 𝐻0 : 𝑃1 = 𝑃2 ; 𝐻1 : 𝑃1 > 𝑃2
Step 2: Critical Region 𝑍 > 2.33
𝑋1 𝑋2
;
𝑛1 𝑛2 (X1 :X2 )
Step 3: Test Statistics, 𝑍 = where 𝑝 =
1 1 𝑛1 :𝑛2
𝑝 1;𝑝 𝑛 :𝑛
1 2

0.133
𝑝 = 0.7273, 𝑍 = =7
0.019

Step 4: Reject 𝐻0

You might also like