NITK Unit 4 Lecture 24 Test of Hypothesis Small Samples

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

AM761-STATISTICAL METHODS FOR CIVIL

ENGINEERING APPLICATIONS

LECTURE-30: TEST OF HYPOTHESIS


(SMALL SAMPLES)

Dr. DEBABRATA KARMAKAR


ASSISTANT PROFESSOR
DEPARTMENT OF WATER RESOURCES AND OCEAN ENGINEERING

Department of Water Resources and Ocean Engineering, NITK Surathkal 1


TEST OF HYPOTHESIS (SMALL SAMPLES)

Student’s t-Distribution

Let Xi, i = 1,2,…,n be a random sample of size n from a normal population with mean μ and
variance σ2. Then student’s t is defined by

X 
t
s
n

n
1 n
where X   X i and
1
  i 
2
s 2
 X  X
n i 1  n  1 i 1

Department of Water Resources and Ocean Engineering, NITK Surathkal 2


TEST OF HYPOTHESIS (SMALL SAMPLES) CONTD….

Example: The heights of 10 adult persons selected at random from a given locality had a
mean of 158 cm and variance 39.0625 cm. Test at 5% level of significance, the hypothesis
that the adult persons of the given locality are on the average less than 162.5 cm tall.

Solution:
(i) Null Hypothesis: The average height of adult persons is 162.5 cm, i.e H0(μ = 162.5 cm).

(ii) Alternative Hypothesis: H1(μ < 162.5 cm), left-tailed test.

(iii) Level of Significance: α = 5% level. The critical value of t for (n-1) = (10-1) = 9
degrees of freedom and 5% level of significance is tα = 1.83.
x 
(iv) Test Statistic: Under the null hypothesis, H0(μ = 162.5 cm), t  =  2.2768
S/ n

Department of Water Resources and Ocean Engineering, NITK Surathkal 3


TEST OF HYPOTHESIS (SMALL SAMPLES) CONTD….

Example: Certain pesticide is packed into bags by a machine. A random sample of 10 bags
is drawn and their contents are found to weigh in kgs as follows:

50 49 44 52 45 48 46 45 49 45

Test if the average packing can be taken as 50 kg.


Solution:

x
 x i
 47.3
n

1 n1
S    xi  x   7.122, S  2.668
2 2

n i 1

(i) Null Hypothesis: The average packing of bags is 50 kg, i.e H0(μ = 50 kg).

Department of Water Resources and Ocean Engineering, NITK Surathkal 4


TEST OF HYPOTHESIS (SMALL SAMPLES) CONTD….

(ii) Alternative Hypothesis: H1(μ ≠ 50 kg), two-tailed test.

(iii) Level of Significance: α = 5% level. The critical value of t for (n-1) = (10-1) = 9
degrees of freedom and 5% level of significance is

t0.1  1.833 ( t0.05  for single-tail, t0.1  for two-tail )

(iv) Test Statistic: Under the null hypothesis, H0(μ = 50 kg), t  x   =  3.2002
S/ n

Department of Water Resources and Ocean Engineering, NITK Surathkal 5


TEST OF HYPOTHESIS (SMALL SAMPLES) CONTD….

F-Distribution

Let xi, i = 1,2,….n1 and yj, j = 1,2,….n2 be two samples which are independent then the
random variable F = sx2/ sy2 follows F-distribution (γ1,γ2) = (n1 – 1, n2 – 1) degrees of
freedom, where
n1
1
 n1  1 
S    
2 2
x xi x
i 1

n2
1
 n2  1 
 j 
2
S 
2
y y  y
j 1

The critical values of F-distribution are calculated as follows. Fα is the value of F-static
above which there is an area α.

Department of Water Resources and Ocean Engineering, NITK Surathkal 6


TEST OF HYPOTHESIS (SMALL SAMPLES) CONTD….

Example: The following data presents the yields in quintals of common 10 subdivisions of
equal area of two agricultural plots:

Plot 1 6.2 5.7 6.5 6.0 6.3 5.8 5.7 6.0 6.0 5.8
Plot 2 5.6 5.9 5.6 5.7 5.8 5.7 6.0 5.5 5.7 5.5

Test whether two samples taken from the two random populations have the same variance.

Solution:
(i) Null Hypothesis: samples taken have the same variance H 0 (12   22 ).

(ii) Alternative Hypothesis: H1 (12   22 ).

(iii) Level of Significance: α = 5% level. The critical value of F for (γ1,γ2) = (n1 -1, n2 -1) =
(9,9) degrees of freedom F = 3.18.

Department of Water Resources and Ocean Engineering, NITK Surathkal 7


TEST OF HYPOTHESIS (SMALL SAMPLES) CONTD….

Plot-1 xi Plot-2 yj
6.2 5.6 0.04 0.01
5.7 5.9 0.09 0.04
6.5 5.6 0.25 0.01
6.0 5.7 0 0
6.3 5.8 0.09 0.01
5.8 5.7 0.04 0
5.7 6.0 0.09 0.09
6.0 5.5 0 0.04
6.0 5.7 0 0
5.8 5.5 0.04 0.04
60 57 0.64 0.24

Department of Water Resources and Ocean Engineering, NITK Surathkal 8


TEST OF HYPOTHESIS (SMALL SAMPLES) CONTD….

1
  i 
0.64 1
   0.24
2
S 
2
x  x
2
  0.071 S 2
 y  y   0.026

2 j
(n  1)
1
9 ( n 1) 9

x
x i
6 y
y i
 5.7
n n
S12
(iv) Test Statistic: Under H0, F  2 =2.7307
S2

(v) Conclusion: Since the calculated value of F is less than 3.18. So we accept null
hypothesis. Hence the two samples have been taken from two normal populations with
same variance.

Department of Water Resources and Ocean Engineering, NITK Surathkal 9


TEST OF HYPOTHESIS (SMALL SAMPLES) CONTD….

Example: Consider the following measurements of the heat producing capacity of the coal
produced by two mines (in millions of calories per ton):

Mine 1 8260 8130 8350 8070 8340


Mine 2 7950 7890 7900 8140 7920 7840

Can it be concluded that the two population variances are equal?.

Solution:
(i) Null Hypothesis: The two population variances are equal H 0 (12   22 ).

(ii) Alternative Hypothesis: H1 (12   22 ).

(iii) Level of Significance: α = 5% level. The critical value of F for (γ1,γ2) = (n1 -1, n2 -1) =
(4,5) degrees of freedom =5.19.

Department of Water Resources and Ocean Engineering, NITK Surathkal 10


TEST OF HYPOTHESIS (SMALL SAMPLES) CONTD….

Mine-1 xi Mine-2 yj
8260 7950 900 100
8130 7890 10000 2500
8350 7900 14400 1600
8070 8140 25600 40000
8340 7920 12100 400
7840
41150 47640 63000 44600

1
 i
 
1
  
2
S 
2
x  x
2
 15750 S y2  y  y  8920
(n2  1)
j
(n1  1)
x

x
x i
 8230 y
y i
 7940
n1 n2
Department of Water Resources and Ocean Engineering, NITK Surathkal 11
TEST OF HYPOTHESIS (SMALL SAMPLES) CONTD….

S x2
(iv) Test Statistic: Under H0, F  2 =1.76
Sy

(v) Conclusion: Since the calculated value of F = 1.76 is less than the tabulated value of F
= 5.19. So we accept null hypothesis. Hence the two population variances of the two
mines are equal.

Department of Water Resources and Ocean Engineering, NITK Surathkal 12


TEST OF HYPOTHESIS (SMALL SAMPLES) CONTD….

Chi-Square Test (Goodness of Fit)

Let O1, O2,…, On be the observed frequencies and let E1, E2,…, En represent heir
corresponding expected frequencies, then the chi-square statistic is given by

 Oi  Ei 
2
n
2  
n 1 Ei

which follows χ2 distribution with γ = (n-1) degree of freedom.

Department of Water Resources and Ocean Engineering, NITK Surathkal 13


TEST OF HYPOTHESIS (SMALL SAMPLES) CONTD….

Example: The following table gives the number of aircraft accidents that occur during
various days of the week. Find whether the accidents are uniformly distributed over the
week.

Days of week Sun Mon Tue Wed Thu Fri Sat


No of accidents 14 16 8 12 11 9 14

Solution:
(i) Null Hypothesis: The accidents are uniformly distributed over the week.

(ii) Alternative Hypothesis: The accidents are not uniformly distributed over the week.

(iii) Level of Significance: α = 5% level. The critical value of χ2 for (n-1) = (7-1) = 6
degrees of freedom is χ2 0.05 = 12.592.

1
Average no. of accidents = 14  16  8  12  11  9  14   12
7
Department of Water Resources and Ocean Engineering, NITK Surathkal 14
TEST OF HYPOTHESIS (SMALL SAMPLES) CONTD….

Observed Expected (Oi - ei)2 (Oi - ei)2/ei


frequencies Oi frequencies ei
14 12 4 0.333
16 12 16 1.333
8 12 16 1.333
12 12 0 0
11 12 1 0.0833
9 12 9 0.75
14 12 4 0.333
Total 4.1653
 Oi  ei 
2

(iv) Test Statistic: Under the null hypothesis, H0  2   =4.1653


ei

(v) Conclusion: Since the calculated value of χ2 = 4.1653 is less than the tabulated value
of χ2 0.05 = 12.592 . So we accept null hypothesis. Hence the accidents are uniformly
distributed over the week.
Department of Water Resources and Ocean Engineering, NITK Surathkal 15
TEST OF HYPOTHESIS (SMALL SAMPLES) CONTD….

Example: 200 digits are chosen at random from a set of tables. The frequencies of the digits
are as follows.

Digit 0 1 2 3 4 5 6 7 8 9
Frequency 18 19 23 21 16 25 22 20 21 15

Use χ2 test to assess the correctness of the hypothesis that the digits were distributed in
equal numbers in the tables from which they were chosen.

Solution:
(i) Null Hypothesis: The digits were distributed in equal numbers. Then the expected
frequencies will be 200/10 = 20 as the frequency of 0,1,2,…,9 digits

(ii) Alternative Hypothesis: The digits were not distributed in equal numbers.

(iii) Level of Significance: α = 5% level. The critical value of χ2 for (n-1) = (10-1) = 9
degrees of freedom is χ2 0.05 = 16.22.

Department of Water Resources and Ocean Engineering, NITK Surathkal 16


TEST OF HYPOTHESIS (SMALL SAMPLES) CONTD….

Digit Observed frequencies Oi Expected frequencies ei (Oi - ei)2 (Oi - ei)2/ei


0 18 20 4 0.20
1 19 20 1 0.05
2 23 20 9 0.45
3 21 20 1 0.05
4 16 20 16 0.80
5 25 20 25 1.25
6 22 20 4 0.20
7 20 20 0 0.00
8 21 20 1 0.05
9 15 20 25 1.25
Total 200 43

 Oi  ei 
2

(iv) Test Statistic: Under the null hypothesis, H0 the test statistic is  2   =4.3
ei
(v) Conclusion: Since the calculated value of χ2 = 4.3 is less than the tabulated value of χ2
0.05 = 16.22 . So we accept null hypothesis. Hence we conclude that the digits were
distributed in equal numbers.
Department of Water Resources and Ocean Engineering, NITK Surathkal 17
Thank you
Department of Water Resources and Ocean Engineering, NITK Surathkal 18

You might also like