Sei sulla pagina 1di 58

UNIT - IV

TESTING OF
HYPOTHESIS

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
SYLLABUS

Sampling distributions – Type I and Type II


errors – Tests based on Normal, t, z and F
distributions for testing of mean, variance
and proportions – Tests for Independence of
attributes and Goodness of fit.

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
What is a Hypothesis?

A hypothesis is an assumption about the


population parameter.
• A parameter is a Population mean or proportion
• The parameter must be identified before analysis.

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Hypothesis Testing
• Goal: Make statement(s) regarding unknown
population parameter values based on sample data
• Elements of a hypothesis test:
• Null hypothesis - Statement regarding the value(s) of
unknown parameter(s). Typically will imply no association
between explanatory and response variables in our
applications (will always contain an equality)
• Alternative hypothesis - Statement contradictory to the null
hypothesis (will always contain an inequality)
• Test statistic - Quantity based on sample data and null
hypothesis used to test between null and alternative
hypotheses
• Rejection region - Values of the test statistic for which we
reject the null in favor of the alternative hypothesis 4

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Type I and Type II Errors
True State of Nature
The null The null
hypothesis is hypothesis is
true false

Type I error
We decide to Correct
(rejecting a true
reject the decision
null hypothesis)
Decision

null hypothesis

Type II error
We fail to Correct (rejecting a false
reject the decision null hypothesis)
null hypothesis

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Controlling Type I and Type II
Errors
  , ß, and n are related

when two of the three are chosen, the third


is determined

 and n are usually chosen

try to use the largest  you can tolerate

if Type I error is serious, select a smaller 


value and a larger n value
6

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Definition
Test Statistic:
It is a sample statistic or value based on sample data.

Example: x – µx
z=
s/ n

Critical Region :
It is the set of all values of the test statistic that would
cause a rejection of the null hypothesis.
7

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Critical Region
• Set of all values of the test statistic that would cause a
rejection of the
null hypothesis

Critical
Region

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Critical Region
• Set of all values of the test statistic that would cause a
rejection of the
• null hypothesis

Critical
Region

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Critical Region
• Set of all values of the test statistic that would cause a
rejection of the
null hypothesis

Critical
Regions

10

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Critical Value
Value (s) that separates the critical region
from the values that would not lead to a
rejection of H 0

Reject H0 Fail to reject H0

Critical Value
11
( z score )
IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY
AND STATISTICS /UNIT–IV/PPT/VER1.1
Conclusions
in Hypothesis Testing
always test the null hypothesis

1. Fail to reject the H 0

2. Reject the H 0

need to formulate correct wording of final conclusion

12

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Summary of One- and Two-Tail Tests

One-Tail Test Two-Tail Test One-Tail Test


(left tail) (right tail)

H0 : µ ≥ µ 0 H0 : µ = µ 0 H0 : µ ≤ µ 0
H1 : µ < µ 0 H1 : µ ≠ µ0 H1 : µ > µ 0

11.1
3
IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY
AND STATISTICS /UNIT–IV/PPT/VER1.1
The Seven Steps…
1) Describe in words the population characteristic
about which hypotheses are to be tested

2) State the null hypothesis, Ho

3) State the alternative hypothesis, H1 or Ha

4) Display the test statistic to be used

14

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
The Seven Steps…
5) Identify the rejection region
• Is it an upper, lower, or two-tailed test?

• Determine the critical value associated with , the level of


significance of the test

6) Compute all the quantities in the test statistic,


and compute the test statistic itself

15

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
The Seven Steps…
7) State the conclusion. That is, decide whether to
reject the null hypothesis, Ho, or fail to reject the
null hypothesis. The conclusion depends on the
level of significance of the test. Also, remember
to state your result in the context of the specific
problem.

16

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Level of Significance
• The level of significance  is the probability of rejecting
the null hypothesis when it is true.
• A common level of significance is .05 (that means if we
reject the null hypothesis, we will be at least 95% sure
that the null hypothesis is false).
• We will reject the null hypothesis if P-value ≤ 
• If P-value > , we do not reject the null hypothesis.
(Courts do not prove people innocent, they fail to convict
them--so failing to reject the null hypothesis doesn’t
mean it is true)

17

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
TABULATED VALUE OF Z

LEVEL OF TWO TAILED ONE TAILED


SIGNIFICANCE TEST TEST

5% 1.96 1.645

1% 2.58 2.33

18

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Types of Hypothesis Tests
• Large Sample Tests, Population Mean (known
population standard deviation)

• Large Sample Tests, Population Proportion


(unknown population standard deviation)

• Large Sample Tests, Population Standard


deviation (known & unknown)

• Small Sample Tests, Mean of a Normal


Population 19

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Large Samples
If the size of the sample n> 30, then the sample is
called Large sample.

Four Important tests


 Test of significance for single proportion
 Test of significance for difference of proportions.
 Test of significance for single mean.
 Test of significance for difference of means.

20

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Test of Significance for Single
Proportion

To test the significant difference between the sample


proportion p and the population proportion P, the statistic is
given by
p  P
z 
PQ
n

where n- sample size


21

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Example
In a sample of 400 parts manufactured by a factory, the number of defective
parts was found to be 30. The company, however, claimed that only 5% of
their product is defective. Is the claim tenable?

Soln:

Given n = 400
No. of defectives in the sample = 30
p = Proportion of defectives in the sample = 30/400 = 0.075
P = the population Proportion = 5/100 = 0.05
Q = 1-P = 1- 0.05 = 0.5
Null Hypothesis H0 : the company’s claim p= 0.05 is acceptable.
Alternative Hypothesis H1: P> 0.05 [right-tailed]
Test statistic : p P
z 
PQ 22
n
IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY
AND STATISTICS /UNIT–IV/PPT/VER1.1
0.075  0.05
z
0.05 * 0.95
400
 2.29
Calculated value of z = 2.29

Tabulated value of z at 5% level of significance for right tailed test is


1.645.

Conclusion:
Since calculated z > tabulated z.

H0 is rejected.

i.e., The company’s claim that only 5% of their product is 23


defective is not acceptable.
IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY
AND STATISTICS /UNIT–IV/PPT/VER1.1
Test of Significance for Difference
of Proportions
To test the significant difference between the sample proportions p1 and p2,
the statistic is given by

p1  p2
z
 1 1 
pq   
 n1 n1 
n 1 p1  n 2 p2
where p  and q  1  p
n1  n1

24

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Example
In a random sample of 1000 people from city A, 400 are found to be
consumers of wheat. In a sample of 800 from city B, 400 are found to be
consumers of wheat. Does this data give a significant difference between
the two cities as far as the proportion of wheat consumers is concerned?

Soln:

Given: n1 = 1000 n2 = 800


p1 = Sample proportion of wheat consumers in city A = 400/1000 = 0.4
p2 = Sample proportion of wheat consumers in city B = 400/800 = 0.5
Null hypothesis H0: P1 = P2
i.e There is no significant difference in the proportion of wheat consumers
in the two cities.

25

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Alternative hypothesis H1: P1 ≠ P2 (two tailed test)
i.e There is a significant difference in the proportion of wheat consumers in
the two cities.

Test statistic:
p1  p2
z
 1 1 
pq   
 1
n n2 

n p  n 2 p2
where p  1 1
n1  n2
1000 * 0.4  800 * 0.5
p  0.444
1800
q  1  p  1  0.44  0.556
26

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
0.4  0.5
z  4.243
 1 1 
0.444 * 0.556   
 1000 800 
| z | 4.243

Tabulated value of z at 5% level of significance for right tailed


test is 1.645.

Conclusion:
Since calculated z > tabulated z
H0 is rejected.
H1 is accepted under 5% level of significance.
There is a significant difference in the proportion of wheat
consumers in the two cities. 27

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Test of Significance for Single
Mean
To test the significant difference between the sample mean and the population
mean μ, the statistic is given by
x 
z
s
n

where n- sample size and σ – S.D. of the population.


If the population S.D. is not known, then the statistic is

x 
z
s
n 28

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Example
• A certain breed of rats shows a mean weight gain of 65 gm,
during the first 3 months of life. 16 of these rats were fed a
new diet from birth until age of 3 months. The mean was 60.75
gm. If the population variance is 10 gm , is there a reason to
believe at the 5% level of significance that the new diet causes
a change in the average amount of weight gained.

29

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Soln:
Given n=16
Sample mean = 60.75
Population Mean = 65
S.D. = 10

Null hypothesis H0 :µ=65


Alternative Hypothesis H1 :µ ≠ 65
Tabulated value of z at 5% level of significance of two
tailed test is 1.96

30

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Test Statistic:
x μ
z σ/ n
 60.75 65
10 / 16
 5.38
| z | 5.38
Conclusion:
Since the calculated values of z > tabulated value of z
H0 is rejected, and H1 is accepted.

Reject

.025 .025

31
-1.96
0 1.96 Z
IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY
AND STATISTICS /UNIT–IV/PPT/VER1.1
Test of Significance for Difference
of Mean
To test the significant difference between x1 and x2 , the test of statistic
is given by

x1  x2
z
s 12 s 22

n1 n2

32

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Example

33

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Test statistic :
x1  x2
z
s 12 s 22

n1 n2
170  172
  12.658
40.96 39.69

6400 1600
| z | 12.658

Tabulated value of z at 5% level of significance of two tailed test is 2.33

Conclusion:
Since the calculated values of z > tabulated value of z
H0 is rejected, and H1 is accepted.
i,e., Americans are taller than the Englishmen. 34

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Test of Significance For Difference
of Two S.D.
When the population S.D. are known
s1  s2
z
s 12 s 22

2n1 2n2
When the population S.D. are not known
s1  s2
z
s12 s22

2n1 2n2

35

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Example
The S.D. of the height of students of a college I 4 cm. Two samples are
taken. The S.D. of 100 B. com students is 3.5 cm and 50 B.A. students is
4.5 cm. Test the significance of the difference of S.D. of the samples.

Soln:

Given n1=100, n2 = 500


s1 =3.5 , s2 = 4.5
σ=4
Null Hypothesis H0: σ1 = σ2
Alternative Hypothesis H1: σ1 ≠ σ2

36

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Test statistic :
s1  s2
z
s 12 s 22

2n1 2n2
3.5  4.5
  2.04
2 2
4 4

2 *100 2 *50
| z | 2.04
Tabulated value of z at 5% level of significance of two tailed test is 1.96

Conclusion:
Since the calculated values of z > tabulated value of z
H0 is rejected, and H1 is accepted.
There is a significant difference between the two S.D.
37

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Small Sample

38

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Student’s ‘t’ Test For Single Mean
The table value of t for (n-1) degrees of freedom at level of significance ,
Test of statistic is given by,

x 
t
s
(OR) n
x 
t 
S .D
n 1
39

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Example

40

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
x 
t
S .D
n 1
990  1000
  2.5
20
25
| t | 2.5

41

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Student’s ‘t’ Test for Difference
Mean
To test the significance difference between two means x1 and x2 of
samples of size n1 and n2 , the statistic is given by
x1  x2
t 
1 1
s 
n1 n2

Where s2 
 1 1
( x  x ) 2
  1 1
( x  x ) 2

n1  n2  2
1
s2  [ n1s12  n2 s22 ]
n1  n2  2
s1 , s2 - sample S.D.
Degrees of freedom d.f. = n1 + n2 - 2 42

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Example
The average number of articles produced by two machines per day are 200
and 230 with S.D.’s 20 and 25 respectively on the basis of records of 25 days
production. Can you regard both the machines equally efficient at 1% level of
significance.

Soln:
Given n1 =25, n2 = 25
x1 = 200, x = 250
2
s1 = 20, s2 = 25
1
s2  [ n1s12  n2 s22 ]
n1  n2  2
1
[25(20) 2  25(25) 2 ]
48
 533.85
43
 s  23.10
IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY
AND STATISTICS /UNIT–IV/PPT/VER1.1
x1  x2
t 
1 1
s 
n1 n2
200  250
  7.65
1 1
23.10 
25 25
| t | 7.65

44

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
F-Test
To test if the two samples have come from the same population, then the
statistic is given by

S12
F  2
S2

Where S1 
2  ( x  x )2

, S 22 
 ( y  y )2

n1  1 n2  1
and S1  S 2
2 2

The degrees of freedom are 1 = n1 -1 2 = n2 -1

Note:
Greater var iance
1. F 
Smaller var iance
2. nS 2  ( n  1 )S 2
45

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Example
A sample of size 13 gave an estimated population variance of 3.0, while
another sample of size 15 gave an estimate of 2.5 could both samples be
from populations with the same variance.

Soln:
Given n1 = 13, n2 = 15
s12 =3.0, s22 = 2.5
Null Hypothesis H0 : The two samples have come from
populations with the same variance.
Here s12 > s22
The test statistic is
S12 3.0
F 2 
S2 2.5
46

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
 F = 1.2
Tabulated value of F for (12,14) d.f is 2.53

Conclusion:
Since Calculated value of F < tabulated value of F

H0 is accepted.

i.e., Both the samples have come from the populations


with the same variance.

47

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Testing for Goodness of Fit

• The test is based on the chi-square distribution.


• Assume there is a sample of size n from a population whose probability
distribution is unknown.
• Let Oi be the observed frequency in the ith class interval.
• Let Ei be the expected frequency in the ith class interval.
The test statistic is

48

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Testing for Goodness of Fit

49

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Testing for Goodness of Fit

50

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Testing for Goodness of Fit

51

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Testing for Goodness of Fit

52

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Testing for Goodness of Fit

53

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Testing for Goodness of Fit

54

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Test for Independence of Attributes

Definition:
An attribute means a quality or characteristic.
Eg: Drinking, smoking, blindness, honesty, etc.

(O  E ) 2
ψ 
2

E
Degrees of Freedom =(r-1)(s-1)
r – no. of rows
s – no. of columns.
55

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
Example
Two groups of 100 people each were taken for testing the use of a vaccine
15 persons contracted the disease out of the inoculated persons, while 25
contracted the disease in the other group. Test the efficiency of the vaccine
using ψ2 – value.

Soln:
Null Hypothesis H0: The vaccine is not effective.
The observed frequencies are

Affected Not affected Total


Inoculated 15 85 100
Not 25 75 100
Inoculated
40 160 200 56

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
The Expected frequencies are

Affected Not affected Total


Inoculated (40*100)/200 (160*100)/200 100
=20 =80
Not =20 80 100
Inoculated
40 160 200
Calculation of ψ2

O E (O-E)2 (O-E)2 /E
15 20 25 1.25
25 20 25 1.25
85 80 25 0.3125
75 80 25 0.3125
3.125
57

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1
(O  E ) 2
ψ 
2
 3.125
E

Tabulated ψ2 for 1 d.f. at 5% level of significance is 3.184.

Conclusion:
Since Calculated ψ2 < tabulated ψ2

H0 is accepted.

i.e., The vaccine is not effective at 5% level of significance.

58

IFETCE/H&S- II/MATHS/MATHIVADHANA/IYEAR/ M.E.(CSE)/I-SEM/MA7155/APPLIED PROBABILITY


AND STATISTICS /UNIT–IV/PPT/VER1.1

Potrebbero piacerti anche