Unit-4 - Hypothesis Testing

Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

UNIT-4

HYPOTHESIS-TESTING
(Prof: ASFAR SIDDIQUI)
Introduction
Hypothesis testing in statistics is a way for you to test the results of a survey or experiment
to see if you have meaningful results.

1: HYPOTHESIS TESTING FOR MEAN


i) For Large Sample
Let µ = Mean of sample, 𝑛 = be the size of sample and σ = be the SD.the HT for mean is
given by

1) NH− 𝐻0: µ = µ0

2) AH − 𝐻1: i) μ≠µ0 ii) µ < µ0 iii)

3) LOS: Given

4) Acceptance region:

i) − 𝑍α/2 < 𝑍 < 𝑍α/2 [If AH μ≠µ0]

ii) 𝑍 < 𝑍−α [If AH µ < µ0]

iii) 𝑍 > 𝑍α [If AH µ > µ0]

5) Calculation:
𝑥−µ
𝑍= σ
𝑛

6) Decision: Accept or reject NH

Ex: The length of the life of certain computer is approximately normally distributed with
Mean 800hours and std 40 h. if a random sample of 30 computer has an average life of 788 h
Test the null hypo that µ = 800ℎ 𝑎𝑔𝑎𝑖𝑛𝑠𝑡 alternate that μ≠800ℎ at α = 5%
Sol: Let µ =800 𝑥 = 788 σ = 40 Given LOS 5%
1) Null Hypothesis 𝐻0: µ = 800h

2) Alternate Hypothesis 𝐻1: μ≠800

3) level of significance LOS 5%

4) Critical Region: − 1. 96 < 𝑍𝑐 < 1. 96

5) Calculation statistic
𝑀𝑒𝑎𝑛 𝑜𝑓 𝑠𝑎𝑚𝑝𝑙𝑒 = 𝑥 = 788 𝑎𝑛𝑑 𝑛 = 𝑠𝑎𝑚𝑝𝑙𝑒 𝑠𝑖𝑧𝑒 = 30

𝑆. 𝐷 = σ = 40

𝑥−µ 788−800
𝑍= = =− 1. 643
σ/ 𝑛 40/ 30

6) Decision: Accept the null hypothesis 𝐻0

Since − 1. 96 < 𝑍𝑠𝑡𝑎𝑡 < 1. 96

− 1. 96 <− 1. 643 < 1. 96

Ex: Mice with an average lifespan of 32 months will live up to 40months when

fed by a certain nutrious food. If 64 mice fed on this diet have an average

lifespan of 38 months and std of 5.8months. is there is any reason to believe that

average lifespan is less than 40 months(𝐿𝑂𝑆 α = 5%)

Sol: Let µ = 40, 𝑥 = 38, σ = 5.8 and α = 5%)𝑛 = 64

1) Null Hypothesis 𝐻0: µ = 40

2) Alternate Hypothesis 𝐻1: µ < 40

3) Level of significance LOS i) 5% ii) 1 %

4) Critical Region :

Since AH is <type the left tail test and critical region is

i) (− 1. 645 < 𝑍0.05)

ii) (− 2. 33 < 𝑍0.01)

5) Calculation statistic

Let µ = 40, 𝑥 = 38, σ = 5.8 𝑛 = 64

𝑥−µ 38−40
𝑍= σ = 5.8
𝑛 64

𝑍 =− 2. 7586

6) Decision : Accept the Alternate hypothesis 𝐻1

Since calculated value fall/lies in critical region(rejection region) in both case


Ex: A machine runs on an average of 125hours/year. A random sample of 49 machines has an
annual average use of 126.9 hours with standard deviation 8.4 hours. Does this suggest
believing that machines are used on the average more than 125hours annually at 0.05Level of
significance? (0.01)

Sol: Let µ = 125, 𝑥 = 126. 5 σ =8.4 𝑛 = 49 and α = 𝑖) 0. 05 𝑖𝑖) α = 0. 01

1) Null Hypothesis 𝐻0: µ = 40

2) Alternate Hypothesis 𝐻1: µ < 40

3) Level of significance LOS i) 5 % ii) 1 %

4) Critical Region :

Since AH is <type the left tail test and critical region is

i) (− 1. 645 < 𝑍0.05)

ii) (− 2. 33 < 𝑍0.01)

5) Calculation statistic

Let µ = 40, 𝑥 = 38, σ = 5.8 𝑛 = 64

𝑥−µ 38−40
𝑍= σ = 5.8
𝑛 64

𝑍 =− 2. 7586

6) Decision : Accept the Alternate hypothesis 𝐻1

Since calculated value fall/lies in critical region(rejection region) in both case

Ex: A company claims that the mean of thermal efficiency of disesel engines produced by
them is 32.3%. to test this claim, a random sample of 40 engines were examined which
showed the mean thermal efficiency of 31.4% and s.d of 1.6%. can this claim be accepted or
not at 0.01 LOS and 0.05 LOS

Solution:

Let µ = 32. 3 , 𝑥 = 31. 4 σ = 1. 6 𝑛 = 40 and α = 𝑖) 0. 05 𝑖𝑖) α = 0. 01

1) Null Hypothesis 𝐻0: µ = 32. 3

2) Alternate Hypothesis 𝐻1: µ ≠ 40


3) Level of significance LOS i) 0.05 ii) 0.01

4) Critical Region :

Since AH is ≠ type the Two tail test and critical region is

i) − 1. 96 < 𝑍𝑠 < 1. 96

ii) − 2. 58 < 𝑍𝑠 < 2. 58

Since AH is ≠ type the Two tail test and critical region is

i) (− 1. 645 < 𝑍0.05)

ii) (− 2. 33 < 𝑍0.01)

5) Calculation statistic

Let µ = 32. 3, 𝑥 = 31. 4, σ = 1.6 𝑛 = 40

𝑥−µ 31.4−32.3
𝑍= σ = 1.6
𝑛 40

𝑍 =− 3. 5575

6) Decision : Reject the Null hypothesis equal mean

Since calculated value fall/lies in critical region (rejection region) in both case

Ex: A pharmaceutical firm maintains that the mean time for a drug to show its effect is 24
minutes. In a sample of 400 trials, the meanyime is found to be 26 minuteswith a standard
deviation of 4 minutes. Test the hypothesis that the mean time is 24 minutes against the
alternative that it is not equal to 24 minutes,using 0.05 level of significance

Sol:

Let µ = 24, 𝑥 = 26 σ = 4 𝑛 = 400 and α = 𝑖) 0. 05 𝑖𝑖) α = 0. 01

1) Null Hypothesis 𝐻0: µ = 24

2) Alternate Hypothesis 𝐻1: µ ≠ 24

3) Level of significance LOS i) 0.05 ii) 0.01

4) Critical Region :

Since AH is ≠ type We use the Two tail test and critical region is
i) − 1. 96 < 𝑍𝑠 < 1. 9

ii) − 2. 58 < 𝑍𝑠 < 2. 5

5) Calculation statistic

𝑥−µ 26−24
𝑍= σ = 4
𝑛 400

𝑍 = 10

6) Decision : Reject the Null hypothesis

Since calculated value fall/lies in Rejection in both case

TEST FOR ONE MEAN (SMALL SAMPLE: t-DISTRIBUTION)

Ex: An Ambulance service company claims that on an average it takes 20 min between a call
for an ambulance and between a call and the patient’s arrival at the hospital. If in 6 calls the
time taken (between a call and arrival at hospital) are 27, 18, 26, 15, 20, and 32. Can the
company’s claim, be accepted?

Sol: Let µ = 20, 𝑛 = 6 𝑑𝑜𝑓 = 5


27+18+26+15+20+32
𝑥= 6
= 23 and σ =6.38748

1) Null Hypothesis 𝐻0: µ = 20

2) Alternate Hypothesis 𝐻1: µ > 20

3) Level of significance LOS = 10%

4) Critical Region :

𝑖) 𝑡(𝑐𝑎𝑙) < 𝑡(𝑡𝑎𝑏) Acce

𝑖𝑖)𝑡(𝑐𝑎𝑙) > 𝑡(𝑡𝑎𝑏) Rejec

5) Calculation statistic

𝑥−µ 23−20
𝑡(𝑐𝑎𝑙) = = = 1. 15
σ/ 𝑛 6.3875/ 6

𝑡(𝑡𝑎𝑏) = 1.476

6) Decision : Accept the Null hypothesis 𝐻0


Since 𝑡(𝑐𝑎𝑙) < 𝑡(𝑡𝑎𝑏)

 Ex. Producer of 'gutkha', claims that the nicotine content in his 'gutkha' on the average is
1.83 mg. Can this claim be accepted if a random sample of 8 ‘gutkhas’ of this type has the
nicotine contents of 2.0, 1.7, 2.1, 1.9, 2.2, 2.1, 2.0, 1.6 mg? LOS 5%

Sol: Let µ = 1. 83, 𝑛 = 8 𝑑𝑜𝑓 = 7


2.0+1.7,+2.1+ 1.9+2.2+ 2.1,+2.0,+1.6
𝑥= 8
= 1. 95 and σ =0.207

1) Null Hypothesis 𝐻0: µ = 1. 83

2) Alternate Hypothesis 𝐻1: µ ≠ 20

3) Level of significance LOS = 5%

4) Critical Region :

𝑖) 𝑡(𝑐𝑎𝑙) < 𝑡(𝑡𝑎𝑏) Accept

𝑖𝑖)𝑡(𝑐𝑎𝑙) > 𝑡(𝑡𝑎𝑏) Reject

5) Calculation statistic

𝑥−µ 1.95−1.83
𝑡(𝑐𝑎𝑙) = σ = 0.207 = 1. 6395
𝑛 8

𝑡(𝑡𝑎𝑏) = 𝑡(𝑡𝑎𝑏) = 1. 895

6) Decision : Accept the Null hypothesis 𝐻0

𝑡(𝑐𝑎𝑙) < 𝑡(𝑡𝑎𝑏) Accept

EXERCISE
1. Mean lifetime (mlt) of computers manufactured by a company is 1120 hours with standard
deviation of 125 hours. (a) Test the hypothesis that mean lifetime of computers has not
changed if a sample of 8 computers has a mlt of 1070 hours (b) Is there decrease in mlt? Use
(i) 0.05 (ii) 0.01 L.O.S.
 2. Producer of 'gutkha', claims that the nicotine content in his 'gutkha' on the average is 1.83
mg. Can this claim be accepted if a random sample of 8 'gutkhas' of this type have the
nicotine contents of 2.0, 1.7, 2.1, 1.9, 2.2, 2.1, 2.0, 1.6 mg?
. 3. In 1950 in India the mean life expectancy was50 years. If the life expectancies from a
random sample of 11 persons are 58.2,56.6,54.2, 50.4, 44.2, 61.9, 57.5, 53.4, 49.7, 55.4, 57.0,
does it confirm the expected view.
 4. An auditor claims that he takes on an average10.5 days to file income tax returns (I.T.
returns). Can this claim be accepted if a random sample shows that he took 13, 19, 15, 10, 12
, 11, 14, 18 days to file I.T. returns? Use (a) 0.01 (b) 0.05 L.O.S
5. If 5 pieces of certain ribbon selected at random have mean breaking strength of 169.5
pounds with s.d. of 5.7, do they confirm to the specification mean breaking strength of 180
pounds.Use (a) 0.05 (b) 0.01 L.O.S. 
6. In a random sample of 10 bolts produced by a machine the mean length of bolt is 0.53 mm
and standard deviation 0.03 mm. Can we claim from this that the machine is in proper
working order if in the past it produced bolts of length 0.50 mm? Use (a) 0.05 (b) 0.01
L.O.S. 
TEST FOR SUM/DIFF OF MEAN

Ex: In a random sample of 100 tubelights produced by company A,the mean lifetime of
tubelight is 1190 hours with standard deviation of 90 hrs. Also in a random sample of 75
tubelights from company B the mean lifetime is 1230 hours with standard deviation of 120
hrs. Is there a difference between the mean lifetime of two brands of tubelights at a
significant level of a) 0.05 b) 0.01?

Solution:

1) Null Hypothesis 𝐻0: µ1 − µ2 = δ = 0 = no difference

2) Alternate Hypothesis 𝐻1: µ1 − µ2 ≠ δ

3) Level of significance LOS i) 5 % ii) 1 %

4) Critical Region : Acceptance Region

i) -1.96< 𝑍 < 1. 96

ii) − 2. 58 < 𝑍 < 2. 58

5) Calculation statistic

𝑥−µ
𝑍=
σ/ 𝑛

𝑍=
(𝑥 −𝑥 )−(µ −µ )
𝐵 𝐴 𝐵 𝐴
2 2
σ𝐵 σ𝐵
𝑛𝐵
+ 𝑛𝐵

(1230−1190)−0
𝑍= 2 2
120 90
75
+ 100
𝑍 = 2. 421

6) Decision :

i) Reject the Null hypothesis for α = 5%

ii) Accept the Null hypothesis 𝐻0 α = 1%

Ex: To test the effects a new pesticide on rice production a farm land was divided into 60
units of equal areas all portions having identical qualities as to soil, exposure to sunlight
etc,The new pesticide is applied to 30 units while old pesticide to remaining 30.Is there a
reason to belive that the new pesticide is better than old one if mean no of kgs of rice
harvested / unit using new pesticide is 496.31 with sd of 17.18 kgs while for old one is
485.41 kgs is mean and sd is 14.73 test at a=0.05

Solution:

1) Null Hypothesis 𝐻0: µ𝑁 − µ𝑂 = δ = 0 no difference

2) Alternate Hypothesis 𝐻1: µ𝑁 − µ𝑂 = δ > 0

3) Level of significance: i) 0.05 ii) 0.01

4) Critical Region : Acceptance Region

i) 𝑍 < 1. 64

ii) 𝑍 < 2. 33

5) Calculation statistic

𝑍=
(𝑥 −𝑥 )−(µ −µ )
𝑁 𝑂 𝑁 𝑂
2 2
σ𝑁 σ𝑂
𝑛𝑁
+ 𝑛𝑂

(496.31−485.41)−0
𝑍= 2 2
(17.18) (14.73)
30
+ 30

𝑍 = 2. 6381

6) Decision :

i) Reject the Null hypothesis for α = 0. 05

ii) Accept the Null hypothesis 𝐻0 α = 0. 01

Ex:1 A random samples of 40 'Geyers' produce by the company A have a mean lifetime (mlt)
of 647 hours of continuous use with a s.d of 27 hours while a sample 40 produced by another
company B have mlt 638 hours with s.d 31 hours .Does this substainted the claim of company
A that their 'geyers' are superior to those produced by company B at (a) 0.05 (b) 0.01?

Ex:2 Test at 0.05 L.O.S. a manufacturer's claim that


the mean tensile strength (mts) of a thread A exceeds the mts of thread B by at least 12 kgs. if
50 pieces of each type of thread are tested under similar conditions yielding the following
data
sample Sample size mts s.d
Type A 50 86.7 6.28
Type B 50 77.8 5.61

Ex:3  If random sample data show that 42 men earn on the average Xi = 744.85 with s.d. si =
397.7 while 32 women earn on the average x2 = 516.78 with s.d. s2 = 162.523, test at 0.05
level of significance whether the average income for men and women is same or not.
Ex: A company claims that alloying reduces resistance of electric wire by more than 0.050
ohm. To test this claim samples of standard wire and alloyed wire are tested yielding the
following results:

sample Sample size Mean resis s.d


standard 32 86.7 0.004
alloyed 32 77.8 0.005
Can the claim be substantiated at 0.05 L.O.S
Example: To test the claim that men are taller than
women, a survey was conducted resulting in the following data:

Gender Sample size Mean height s.d


Men 1600 172 6.3
Women 6400 170 6.4
Is the claim tenable at 0.01 L.O.S.

Ex: Test the claim that teen-age boys are heavier than teen-age girls given the following
information L.O.S 0.05,0.01
Gender Sample size Mean weight s.d
Boys 50 68.2 2.5
Girls 50 67.7 2.8

TEST FOR PROPORTION (SMALL SAMPLES)

Let 𝑝0 percentage and 𝑛 < 30 the HT for small is given by

1) NH 𝐻0: 𝑝 = 𝑝0 (percentage)
2) AH 𝐻1: 𝑝 ≠ 𝑝0 [𝑜𝑟 𝑝 < 𝑝0 𝑜𝑟 𝑝 > 𝑝0 ]

3) LOS: α [ Given]

4) Critical region:

i) NH reject if 𝑝≤α

ii) NH Accept if 𝑝 > α

5) Calculation: Let x be the number of successes in a sample of size n.

Compute p value

a) AH 𝑝 ≠ 𝑝0

( )
𝑝 = 2𝑝 𝑋 ≤ 𝑥 𝑤ℎ𝑒𝑛 𝑝 = 𝑝0 𝑖𝑓 𝑥 < 𝑛𝑝0

( )
𝑝 = 2𝑝 𝑋 ≥ 𝑥 𝑤ℎ𝑒𝑛 𝑝 = 𝑝0 𝑖𝑓 𝑥 > 𝑛𝑝0

b) AH 𝑝 < 𝑝0

(
𝑝 = 𝑝 𝑋 ≤ 𝑥 𝑤ℎ𝑒𝑛 𝑝 = 𝑝0 )
c) AH 𝑝 > 𝑝0

(
𝑝 = 2𝑝 𝑋 ≥ 𝑥 𝑤ℎ𝑒𝑛 𝑝 = 𝑝0 )
6) Decision :

Reject NH if 𝑝≤α

Accept NH if 𝑝 > α

Ex: If 6 out of 20 cigarette smokers randomly chosen preferred 'charminar' cigarettes test the
claim at 0.05 L. O. S. that 20% of the smokers prefers 'charminar'.

Solution:

1) NH 𝐻0: 𝑝 = 0. 2 (percentage)

2) AH 𝐻1: 𝑝 ≠ 𝑝0

3) LOS: α = 0. 05

4) Test statistics: Let X-be DRV with 𝑝 = 0. 2 𝑛 = 20

5) Calculation : Let 𝑋 = 6, 𝑛𝑝0 = 4 𝑎𝑛𝑑 𝑋 > 𝑛𝑝0


(
𝑝 = 2𝑝 𝑋 ≥ 𝑥 𝑤ℎ𝑒𝑛 𝑝 = 𝑝0 𝑖𝑓 𝑥 > 𝑛𝑝0 )
𝑝 = 2𝑝(𝑋 ≥ 6 𝑤ℎ𝑒𝑛 𝑝 = 0. 2)𝑖𝑓 𝑥 > 𝑛𝑝0

( )
5
𝑝 = 2 1 − ∑ 𝐵(𝑋, 20, 0. 2)
0

𝑝 = 2(1 − 0. 8042)

𝑝 = 0. 3916

6) Decision : Accept NH since 𝑝≥α

Ex: Past experience shows that 40% of Indian youth favoured cricket. If in a random sample
of 15 Indian youth,8 favored cricket, is there reason to believe that the proportion of Indian
youth favoring cricket today has increased . Use 0.05 L.O.S

Solution:

1) NH 𝐻0: 𝑝 = 0. 4 (percentage)

2) AH 𝐻1: 𝑝 > 0. 4

3) LOS: 0. 05

4) Critical region: NH reject if 𝑝≤α

5) Calculation: Let X-be DRV with 𝑝 = 0. 4 𝑛 = 15, 𝑥 = 8

Compute p value for AH 𝑝 > 𝑝0

𝑝 = 𝑝(𝑋 ≥ 8 𝑤ℎ𝑒𝑛 𝑝 = 0. 4)

( )
7
𝑝 = 1 − ∑ 𝐵(𝑋, 15, 0. 4) = 0. 2131
0

6) Decision : Accept NH sine 𝑝≥α (0. 2131 ≥ 0. 05)

1. To test the claim of a flat builder that mosquito nets were installed in 70% of the flats, a
random survay was conducted and found that 8 15 flats had mosquito nets. Is the claim valid
0.10 L.O.S. 
2. Test the N.H.: that a coin is fair at 0.03 L.O.S.against an A.H. that heads occur less than
50% of the time if 5 heads occur when it is tossed 20 times
 3. If 9 out 20 pizza' eaters like the native variety over the Italian, can the claim
that 40% of "pizza' eaters like native variety is tenable?
TEST FOR PROPORTION (LARGE SAMPLES)

Let sample size 𝑛 > 30 and p be the probability. then hypothesis for proportion for large
sample is given by

1) NH 𝐻0: 𝑝 = 𝑝0 (percentage)

2) AH 𝐻1: 𝑝 ≠ 𝑝0 [𝑜𝑟 𝑝 < 𝑝0 𝑜𝑟 𝑝 > 𝑝0 ]

3) LOS: α

4) Acceptance Region:

i) − 𝑍α/2 < 𝑍 < 𝑍α/2 (TTT) (AH 𝑝 ≠ 𝑝0)

ii) 𝑍 < 𝑍−α (𝑝 < 𝑝0 )

iii) 𝑍 > 𝑍α (𝑝 > 𝑝0 )

5) Calculation : Let µ = 𝑛𝑝 and σ = 𝑛𝑝𝑞


𝑥−𝑛𝑝
𝑍=
𝑛𝑝𝑞

6) Decision : Accept NH if

i) − 𝑍α/2 < 𝑍 < 𝑍α/2 (TTT)

ii) 𝑍 < 𝑍α (RTT)

iii) 𝑍 > − 𝑍α(LTT)

Example 1: If in a random sample of 600 cars making a right turn at a certain trafic junction
157 drove into the wrong lane, test whether actually 30% of all drivers make this mistake or
not at this given junction. Use (a) 0.05 (b) 0.01 L.O.S.
Solution: Let X be discrete random variable denoting the number of cars driving into the
wrong lane at a junction

1) NH 𝐻0: 𝑝 = 0. 3 (percentage)

2) AH 𝐻1: 𝑝 ≠ 0. 3

3) LOS: α = (𝑎) 0. 05 (𝑏) 0. 01

4) Acceptance Region:

− 1. 96 < 𝑍 < 1. 96
− 2. 58 < 𝑍 < 2. 58

5) Calculation :

Let µ = 𝑛𝑝 = (600)(0. 3) = 180, 𝑥 = 157

σ = 𝑛𝑝𝑞 = (600)(0. 3)(0. 7) = 11. 225


𝑥−𝑛𝑝 157−180
𝑍= = =− 2. 0489
𝑛𝑝𝑞 11.225

6) Decision :

Reject NH

Example 2: Test the claim of a manufacturer that 95% of his 'stabilizers' confirm to ISI
specifications if out of a random sample of 200 stabilizers produced by this manufacturer 18
were faulty. Use (a) 0.01 (b) 0.05 L.O.S.
Solution: Let p = probability that the stabilizers are of ISI standard i.e., good

1) NH 𝐻0: 𝑝 = 0. 95 (percentage)

2) AH 𝐻1: 𝑝 < 0. 95

3) LOS: α = (𝑎) 0. 05 (𝑏) 0. 01

4) Acceptance Region:

− 1. 645 > 𝑍

− 2. 33 > 𝑍

5) Calculation :

Let µ = 𝑛𝑝 = (200)(0. 95) = 190, 𝑥 = 157

σ = 𝑛𝑝𝑞 = (200)(0. 95)(0. 05) = 3. 082


𝑥−𝑛𝑝 182−190
𝑍= = =− 2. 5957
𝑛𝑝𝑞 3.082

6) Decision : Reject NH

EXERCISE
1. If in a random sample of 200 persons suffering with 'headache' 160 persons got cured by a
drug, can we accept the claim of the manufacturer that his drug cures 90% of the sufferers?
Use 0.01 L.O.S.
2. A student answers by guess 32 questions correctly in an examination with 50 true or false
questions. Are the results significant at (a) 0.05 L.O.S. (b) 0.01 L.O.S.
3. If a random sample of 120 tractors produced by a company 47 is defective, is the claim, by
the company that at most 30% of the tractors are defective, tenable. Use 0.05 L.O.S.
4. In a sample of 90 university professors 28 own a computer. Can we conclude at 0.05
L.O.S. that at most of the professors own a computer? 
5. It is observed that 174 out of a random sample of 200 truck drivers on highway during
night are drunk. Is it valid to state that at least 90%of the truck drivers are drunk. Use 0.05
L.O.S.
6. A hospital claims that at least 40% of the patients admitted are for 'emergency' ward. Is
there reason to believe this claim if the records
shows that only 49 of 150 patients are for'emergency' ward. Use 0.01 L.O.S.
TEST FOR PROPORTION (Differences)

Consider two different samples with size 𝑛1and 𝑛2 with proportions 𝑝1 and 𝑝2 respectively.
Then hypothesis testing for proportions is given by

Solution:

1) Null Hypothesis 𝐻0: 𝑝1 − 𝑝2 = δ = 0 no difference

2) AH 𝐻1: 𝑝1 − 𝑝2 ≠ δ [𝑜𝑟 𝑝1 − 𝑝2 > δ 𝑜𝑟 𝑝1 − 𝑝2 < δ]

3) Level of significance LOS α

4) Critical Region : Acceptance Region

i− 𝑍α/2 < 𝑍 < 𝑍α/2 ii) 𝑍 < 𝑍−α iii) 𝑍 > 𝑍α

5) Calculation statistic
𝑝−µ
𝑍= σ

(𝑝1−𝑝2)−δ
𝑍=
𝑝1𝑞1 𝑝2𝑞2
𝑛1
+ 𝑛2

6) Decision : Accept NH or Reject NH

Example 1: Out of two vending machines at a 'super bazar', the first machine fails to work 13
times in 250 trials and second machine fails to work 7 times in 250 trials. Test at 0.05 L.O.S.
whether the difference between the corresponding sample proportions is significant.
Solution:

1) NH 𝐻0: 𝑝1 − 𝑝2 = δ = 0 no difference
2) AH 𝐻1: 𝑝1 − 𝑝2 ≠ δ

3) Level of significance LOS α = 0. 05

4) Acceptance Region: − 1. 96 < 𝑍 < 1. 96

5) Calculation statistic
𝑝−µ
𝑍= σ

𝑍=
(𝑝1−𝑝2)−δ
=
(𝑝1−𝑝2)−δ
=
( 237
250
243
− 250 ) =− 1. 3698
𝑝1𝑞1
𝑛1
+
𝑝2𝑞2
𝑛2
𝑝𝑞(
1
𝑛1
+
1
𝑛2
) ( )
24
25
(
1
25
)(
1
𝑛1
+𝑛 )
1
2

𝑍 =− 1. 3698

6) Decision : Accept NH
Example 2: If 57 out of 150 patients suffering with certain disease are cured by allopathy and
33 out of 100 patients with same disease are cured by homeopathy, is there reason to believe
that allopathy is better than homeopathy at 0.05 L.O.S.
Solution:

1) NH 𝐻0: 𝑝1 − 𝑝2 = δ = 0 no difference

2) AH 𝐻1: 𝑝1 − 𝑝2 > δ

3) Level of significance LOS α = 0. 05

4) Acceptance Region: 𝑍 < 1. 645

5) Calculation :

(𝑝1−𝑝2)−δ
𝑍= (𝑝 = 𝑝1 + 𝑝2)
(𝑝𝑞) ( 1
𝑛1
+𝑛
1
2
)
𝑍=
( 57
150
33
− 100 −0 ) = 0. 81
( 9
25
16
× 25 )( 1
150
1
+ 100 )
6) Decision : Accept NH or Reject NH

Example 3: A question in a true false quiz is considered to be smart if it discriminates


between intelligent person (IP) and average person (AP). Suppose 205 of 250 IP's and 137 of
250 AP's answer a quiz question correctly. Test at 0.01 L.O.S. whether for the given question,
the proportion of correct answers can be expected to be at least 15% higher among IP's than
among the AP's. 
EXERCISE
Test of hypothesis: Two proportions 
1. A study of TV viewers was conducted to find
the opinion about the mega serial "Ramayana'. If 56% of a sample of 300 viewers from south
and 48% of 200 viewers from north preferred the serial, test the claim at 0.05 L.O.S. that (a)
there is a difference of opinion between south and north (b) 'Ramayana' is preferred in the
south.
2. In a survey of A.C. machines produced by
company A it was found that 19 machines were defective in a random sample of 200 while
for company B 5 were defective out of 100. At 0.05 L.O.S. is there reason to believe that (a)
there is significant difference in performance of A.C. machines between the two companies A
and B (b) products of B are superior to products of A. 
3. In a random sample of 200 parents from urban
areas 120, while 240 of 500 parents from areas preferred 'private professional colleges, can
we conclude that parents from urban a prefer 'private colleges at 0.025 L.O.S.
4. If 48 out of 400 persons in rural area possessed 'cell' phones while 120 out 500 in urban
area can it be accepted that the proportion of 'cell' phones in the rural and urban area is same
or not. Use 5% L.O.S.
5. In a study of the effect of drugs on 'cancer’, two groups of 80 such patients were
considered. One group was treated with allopathic drug while the other group with
homeopathic drug. It was observed that 23 in the first group and 41 in the second group were
cured. At 0.05 L.O.S. test whether the true percentage of patients cured is at least 8% less for
those who were treated by homeopathic drug? or proportion of patients cured by homeopathy
is at least 8% less than those treated by allopathy drug.
TEST FOR PROPORTION (multiple proportions)

Consider k binomial population with parameters 𝑝1, 𝑝2,𝑝3....𝑝𝑘

Then hypothesis testing for multiple proportions is given by

1) NH − 𝐻0: 𝑝1 = 𝑝2 = 𝑝3 =...= 𝑝𝑘 i,e no difference

2) AH − 𝐻1: 𝑝1, 𝑝2, 𝑝3, ..., 𝑝𝑘 At least not all equal (difference)

3) LOS: α
2 2
4) Critical Region : Reject NH if χ > χ α 𝑤𝑖𝑡ℎ 𝑘 − 1 𝑑𝑜𝑓

5) Calculation statistic
Given Sample-1 Sample-1 …… Sample-1 total
Success(p) 𝑥1 𝑥2 …… 𝑥𝑘 x
Failure(q) 𝑛1 − 𝑥 𝑛2 − 𝑥 …… 𝑛𝑘 − 𝑥 𝑛−𝑥
1 2 𝑘
Total(n) 𝑛1 𝑛1 …… 𝑛𝑘 𝑛

Given Sample-1 Sample-1 …… Sample-1 total


Success(p) 𝑒11 = 𝑛1𝑥/𝑛 𝑒12 = 𝑛2𝑥/𝑛 …… 𝑒1𝑘 = 𝑛𝑘𝑥/𝑛 x
Failure(q) 𝑒21 = 𝑛1(𝑛 − 𝑥)/𝑛 𝑒22 = 𝑛2(𝑛 − 𝑥)/𝑛 …… 𝑒23 = 𝑛3(𝑛 − 𝑥)/𝑛 𝑛 − 𝑥
Total(n) 𝑛1 𝑛1 …… 𝑛𝑘 𝑛
Here x and n denote the total number of successes and total number of Fails for all samples
combined. The expected cell frequencies
𝑒𝑖𝑗 are calculated by

𝑛𝑗𝑥
𝑒1𝑗 = 𝑛
,
𝑛𝑗(𝑛−𝑥)
𝑒2𝑗 = 𝑛
=

And test statistic concerning difference among proportions is given by


2 𝑘 (𝑜𝑖𝑗−𝑒𝑖𝑗)
2
2
χ = ∑ ∑[ 𝑒𝑖𝑗
]
𝑖=1 𝑗=1

6) Decision :
2 2
Reject NH if χ > χ α 𝑤𝑖𝑡ℎ 𝑘 − 1 𝑑𝑜𝑓

WORKED OUT EXAMPLES


Example: Test whether there is significant difference at 0.05 level in the quality of teaching
among four engineering colleges A, B, C, D of a technological university if the number of
failures are 26, 23, 15, 32 respectively. Assume that each college has strength of 200 students.
Solution:

1) NH − 𝐻0: 𝑝1 = 𝑝2 = 𝑝3 = 𝑝4 i,e no difference.

2) AH − 𝐻1: 𝑝1, 𝑝2, 𝑝3, 𝑝4 At least not all equal (difference)

3) LOS: α = 0. 05
2 2
4) Acceptance Region: Reject NH if χ > χ α 𝑤𝑖𝑡ℎ 𝑘 − 1 𝑑𝑜𝑓

5) Calculation statistic
Given(𝑂𝑖𝑗) A B C D Total
success 𝑜11 = 174 177 185 168 𝑥 = 704
failure 26 23 15 32 𝑛 − 𝑥 = 96
total 200 200 200 200 𝑛 = 800

Given(𝑒𝑖𝑗) A B C D Total
Success 𝑒11 = 176 𝑒12 = 176 𝑒13 = 176 𝑒14 = 176 704
failure 𝑒21 = 024 𝑒22 = 024 𝑒23 = 024 𝑒24 = 024 96
total 200 200 200 200 800

2 4 (𝑜𝑖𝑗−𝑒𝑖𝑗)
2
2
χ = ∑ ∑[ 𝑒𝑖𝑗
]
𝑖=1 𝑗=1

2 (𝑜11−𝑒11)2 (𝑜12−𝑒12)2 (𝑜13−𝑒13)2 (𝑜14−𝑒14)2 (𝑜21−𝑒21)2 (𝑜22−𝑒22)2 (𝑜23−𝑒23)2 (𝑜23−𝑒23)2


χ = [ 𝑒11
+ 𝑒12
+ 𝑒13
+ 𝑒14
+ 𝑒21
+ 𝑒22
+ 𝑒23
+ 𝑒23
]

2 2 2 2
2 (174−176) (177−176) (185−176) (168−176)
χ = [ 176
+ 176
+ 176
+ 176

2 2 2 2
(26−24) (23−24) (15−24) (32−24)
+ 24
+ 24
+ 24
+ 24
]

2
χ = 7. 10

And
2
χ 0.05
= 7. 815 with 𝑑𝑜𝑓 = 𝑘 − 1 = 4 − 1 = 3

6) Decision :
2 2
Accept NH since χ < χ α 𝑤𝑖𝑡ℎ 𝑘 − 1 𝑑𝑜𝑓

EXERCISE
1. A study was conducted to estimate the proportion of wives who regularly watch TV serials' yielding the
following data:

PG Graduate Illiterate total


wives wives
wives
Watch 52 31 37 120
Do not watch 148 119 113 380
total 200 150 150 500
Solution:

1) NH − 𝐻0: 𝑝1 = 𝑝2 = 𝑝3 i,e no difference.


2) AH − 𝐻1: 𝑝1, 𝑝2, 𝑝3 At least not all equal (difference)
3) LOS: α = 0. 05
4) Critical Region:
2 2
i) Reject NH if χ > χ α 𝑤𝑖𝑡ℎ 𝑘 − 1 𝑑𝑜𝑓
2 2
ii) Accept NH if χ < χ α 𝑤𝑖𝑡ℎ 𝑘 − 1 𝑑𝑜𝑓

5) Calculation statistic
Given(𝑂𝑖𝑗) A B C Total
watch 52 31 37 120
Not watch 148 119 113 380
total 200 150 150 500

Given(𝑒𝑖𝑗) A B C Total
Success 𝑒11 = 48 𝑒12 = 36 𝑒13 = 36 120
failure 𝑒21 = 152 𝑒22 = 114 𝑒23 = 114 380
total 200 150 150 500

2 4 (𝑜𝑖𝑗−𝑒𝑖𝑗)
2
2
χ = ∑ ∑[ 𝑒𝑖𝑗
]
𝑖=1 𝑗=1
2 (𝑜11−𝑒11)2 (𝑜12−𝑒12)2 (𝑜13−𝑒13)2 (𝑜14−𝑒14)2 (𝑜21−𝑒21)2 (𝑜22−𝑒22)2 (𝑜23−𝑒23)2
χ = [ 𝑒11
+ 𝑒12
+ 𝑒13
+ 𝑒14
+ 𝑒21
+ 𝑒22
+ 𝑒23
]

2 2 2 2 2 2
2 (52−48) (31−36) (37−36) (148−152) (119−114) (113−114)
χ = [ 48
+ 36
+ 36
+ 152
+ 114
+ 114
]

2
χ = 1. 3889
And
2
χ 0.05
= 5. 991 with 𝑑𝑜𝑓 = 𝑘 − 1 = 3 − 1 = 2
6) Decision :
2 2
Accept NH since χ < χ α 𝑤𝑖𝑡ℎ 𝑘 − 1 𝑑𝑜𝑓
Is there reason to believe at 0.05 L.O.S. that there is no difference among the true proportions of wives with
different educational background who watch TV 'serials'. 
Example: Three cough syrups A, B, C were used on patients with cough with the following results:

A B C total
cured 41 27 22 90
Do not cured 79 53 78 210
total 120 80 100 300
Can we conclude whether there is significant (at 0.05 level) difference among the proportion of patients cured by
the three brands A, B, C?
A survey was conducted to determine whether
three categories of employees prefer pension scheme or not resulting the table given below

A B C total
For pension 67 84 109 260
Do not pension 33 66 41 140
total 100 150 150 400
At 0.01 L.O.S. test whether the proportions of employees favoring pension scheme are same
4. If a can containing 500 dry fruits is selected at random from each of three different companies • A, B, C of mixed
dry fruits and there are 345,313 and 359 cashew nuts respectively in each of the cans, can we conclude at 0.01
L.O.S. that the mixed dry fruits of three companies contain equal proportions of cashew nuts.

TEST FOR INDEPENDENCE (CATEGORIAL DATA)


1) NH − 𝐻0: 𝑖𝑛𝑑𝑝𝑒𝑛𝑑𝑒𝑛𝑡

2) AH − 𝐻1: 𝑛𝑜𝑡 𝑖𝑛𝑑𝑝𝑒𝑛𝑑𝑒𝑛𝑡

3) LOS: α
2 2
4) Critical Region : Reject NH if χ > χ α 𝑤𝑖𝑡ℎ (𝑟 − 1)(𝑐 − 1) = 𝑑𝑜𝑓

5) Calculation statistic

Given Sample-1 Sample-1 …… Sample-1 total


Success(p) 𝑥1 𝑥2 …… 𝑥𝑘 x
Failure(q) 𝑛1 − 𝑥 𝑛2 − 𝑥 …… 𝑛𝑘 − 𝑥 𝑛−𝑥
1 2 𝑘
Total(n) 𝑛1 𝑛1 …… 𝑛𝑘 𝑛

Given Sample-1 Sample-1 …… Sample-1 total


Success(p) 𝑒11 = 𝑛1𝑥/𝑛 𝑒12 = 𝑛2𝑥/𝑛 …… 𝑒1𝑘 = 𝑛𝑘𝑥/𝑛 x
Failure(q) 𝑒21 = 𝑛1(𝑛 − 𝑥)/𝑛 𝑒22 = 𝑛2(𝑛 − 𝑥)/𝑛 …… 𝑒23 = 𝑛3(𝑛 − 𝑥)/𝑛 𝑛 − 𝑥
Total(n) 𝑛1 𝑛1 …… 𝑛𝑘 𝑛
Here x and n denote the total number of successes and total number of trails for all samples
combined. The expected cell frequencies
𝑒𝑖𝑗 are calculated by

𝑛𝑗𝑥
𝑒1𝑗 = 𝑛
,
𝑛𝑗(𝑛−𝑥)
𝑒2𝑗 = 𝑛

And test statistic concerning difference among proportions is given by


2 𝑘 (𝑜𝑖𝑗−𝑒𝑖𝑗)
2
2
χ = ∑ ∑[ 𝑒𝑖𝑗
]
𝑖=1 𝑗=1

2 (𝑜11−𝑒11)2 (𝑜12−𝑒12)2 (𝑜13−𝑒13)2 (𝑜14−𝑒14)2 (𝑜21−𝑒21)2 (𝑜22−𝑒22)2 (𝑜23−𝑒23)2 (𝑜23−𝑒23)2


χ = [ 𝑒11
+ 𝑒12
+ 𝑒13
+ 𝑒14
+ 𝑒21
+ 𝑒22
+ 𝑒23
+ 𝑒23
]

6) Decision :
2 2
Reject NH if χ > χ α 𝑤𝑖𝑡ℎ (𝑟 − 1)(𝑐 − 1)𝑑𝑜𝑓

Example: Test the hypothesis at 0.05 LOS that the presence of Hypertension (HT) is
Independent of smoking habits from the following experimental data on 180 persons.
Given NS MS HS TOTAL
HT 21 36 30 87
NHT 48 26 19 93
Total 69 62 49 180
Solution:

1) NH − 𝐻0: 𝑖𝑛𝑑𝑝𝑒𝑛𝑑𝑒𝑛𝑡

2) AH − 𝐻1: 𝑛𝑜𝑡 𝑖𝑛𝑑𝑝𝑒𝑛𝑑𝑒𝑛𝑡

3) LOS: α = 0. 05
2 2
4) Critical Region : Reject NH if χ > χ α 𝑤𝑖𝑡ℎ (𝑟 − 1)(𝑐 − 1) = 𝑑𝑜𝑓

5) Calculation statistic

Given(𝑂𝑖𝑗) NS MS HS Total
HT 21 36 30 87
NHT 48 26 19 93
total 69 62 49 180

Given(𝑒𝑖𝑗) NS MS HS Total
HT 33.35 29.97 23.69 087
NHT 35.65 32.03 25.32 093
total 69.00 62.00 49.00 180

2 3 (𝑜𝑖𝑗−𝑒𝑖𝑗)
2
2
χ = ∑ ∑[ 𝑒𝑖𝑗
]
𝑖=1 𝑗=1

2 (𝑜11−𝑒11)2 (𝑜12−𝑒12)2 (𝑜13−𝑒13)2 (𝑜14−𝑒14)2 (𝑜21−𝑒21)2 (𝑜22−𝑒22)2


χ = [ 𝑒11
+ 𝑒12
+ 𝑒13
+ 𝑒14
+ 𝑒21
+ 𝑒22
]

2
χ = 14. 46

And
2
χ 0.05
= 5. 991 with 𝑑𝑜𝑓 = (𝑟 − 1)(𝑐 − 1) = (2 − 1)(3 − 1) = 2

6) Decision :
2 2
Reject NH since χ < χ α
𝑑𝑜𝑓 = (𝑟 − 1)(𝑐 − 1) = (2 − 1)(3 − 1)

Ex A study was conducted to determine whether


physical handicapness (P.H.) affects the performance of worker's in an industry with the following results:

PERFORMANCE
EFFECT
GOOD OK NOT OK TOTAL
BLIND 21 64 17 102
DEAF 16 49 14 79
NO Handicap 29 93 28 150
TOTAL 66 206 59 331

Test the claim that handicaps have no effect on performance at 0.05 L.O.S.

TEST FOR HOMOGENEITY


Example: A study was conducted with parents 200 from north, 150 from south, 100 from east and 100 from west
regions of India to determine the current attitudes about prayers in public schools. Test at 0.01LOS for
homogeneity of attitudes of parents among the four regions concerning prayers in the public schools.
ATTITUDE OF REGION
PARENTS NORTH SOUTH EAST WEST TOTAL
FAVOUR 65 66 40 34 205
OPPOSE 42 30 33 42 147
NO OPINION 93 54 27 24 198
TOTAL 200 150 100 100 550

Example: To determine the effectiveness of drugs against "aids”, three types of medicines, allopathic, homeopathic
and ayurvedic were tested on 50 persons with the following results,

DRUG
EFFECT
AP HP AV TT
NO RELIF 11 13 9 33
SOME RELIF 32 28 27 87
TOTAL RELIF 7 9 14 30
TOTAL 50 50 50 150

TEST FOR GOODNESS OF FIT


1) NH − 𝐻0: Good fit exists
2) AH − 𝐻1:no good fit
3) LOS: α
2 2
4) Critical Region : Reject NH if χ > χ α 𝑑𝑜𝑓
2
5) Calculation: Calculate χ
2 2
6) Decision: Accept NH if χ < χ α
. Example: Test for goodness of fit of a poission distribution at 0.05 LOS to the following
frequency distribution
No.of pat 0 1 2 3 4 5 6 7 8
arriving
frequency 52 151 130 102 45 12 5 1 2

You might also like