You are on page 1of 5

EXPERIMENT 15 7th April, 2021

AIM: To apply suitable non- parametric tests for the given data.
EXPERIMENT:

1) It is desired to test the hypothesis that median (μ) of a continuous distribution is 15 against the
alternative hypothesis that it is strictly greater than 15. The 20 observations are obtained as follows:

17 18 16 16 17 19 14 13 19 21
22 11 9 12 14 17 23 18 17 16
Use a suitable non-parametric test and conclude the results. Also test for the two tailed hypotheses.
2) The data given below is for a large industrial plant on emission of sulphur dioxide, SO 2 (in tonnes):

17 15 20 29 19 18 22 25 27 9
24 20 17 6 24 14 5 23 24 26
19 23 28 19 16 22 24 17 20 30
19 10 23 18 31 13 20 17 24 14
Use a suitable non-parametric test to determine whether μ = 23.5, where μ is the average daily emission of
SO2.
3) The data below show measurement of the corrosion effects in various soils for steel pipe before and
after coating:

Before Coating, xi After Coating, yi


72 69
63 69
53 58
47 52
38 33
56 57
55 54
75 66
68 72
57 71
61 69
52 53
67 60
Use the sign test to test the hypothesis at 5% level of significance that:
i) Coating does not have significant effect on corrosion.
ii) Test the suitable two-tailed hypothesis.

THEORY:
One Sample Sign Test:
Let X1, X2… Xn be a random sample from a population with unknown median μe.

 So, we set the null hypothesis


Ho: μe = μeo, where μeo is a given value. Against a one-sided or two-sided alternative hypothesis as
mentioned in the following table.
 Obtain the differences, Xi - μeo for all i=1,2…n
 Compute
r= number of positive signs
s= number of negative signs
and verify r + s ≤ n, as some differences will amount to 0.
 Distribution of r given (r + s) is Binomial (r + s, p). Where p = P( X> μeo).

Level of Decision
Alternate Hypothesis p value Comparison
Significance
H1: p>1/2 P(r≥r1) α P(r≥r1) ≤ α REJECT Ho
P(r≥r1) > α ACCEPT Ho

H1: p<1/2 P(r≤r1) α P(r≥ r1)≤ α REJECT Ho


P(r≥r1) > α ACCEPT Ho

H1: p≠1/2 α

step 1 Compute
P(r≥r1) α/2 P(r≥r1) ≤ α/2 REJECT Ho
P (r ≥r1)> α/2 DO STEP 2

step 2 P(r<r1) α/2 P (r ≤r1) ≤ α/2 REJECT Ho


P (r ≤r1)> α/2 ACCEPT Ho

Paired Sample Sign Test:


An alternative to paired t-test. Consider that we have paired sample observations (X1, Y1), (X2,
Y2)…(Xn,Yn).
Now, we define Di = Xi-Yi for all i

Apply one sample sign test as before with p = P(D> μeo)


Large Sample Sign Test:
If N > 35, the normal approximation to the binomial distribution can be used. This distribution of x (=r) has
N
 Mean, μx = 2
N
 Variance, σ2x = 4
x−μx
 So, Z = ~ N(0,1)
σx
2x−N
 i. e, Z = ~ N(0,1)
√N
 This approximation becomes better with correction for continuity which is
2(x ± 0.5) − N
i. e, Z = ~ N(0,1)
√N
 (x+0.5) is used when x< N/2
 (x-0.5) is used when x > N/2
 If |Z| < Zα, accept Ho otherwise reject Ho.
CALCULATIONS:
1.
For right-tailed hypothesis,
1
Ho : The population median is 15 i.e. P(X > 15)= p =
2
1
H1 : The population median is strictly greater than 15 i.e. p >
2

Since, the median is 15 assigning signs to the observations


17 18 16 16 17 19 14 13 19 21
22 11 9 12 14 17 23 18 17 16
and hence,
r = no. of +ve sign = 14
s = no. of -ve sign = 6
N = r + s = 20
Under Ho, r ~ Bin (20,1/2)
p-value of single sample sign test:
20

20
1 20
p value = P(r ≥ 14) = ∑ C r ( ) = 0.057659149
2
r=14

For two-tailed hypothesis,


1
Ho : The population median is 15 i.e. p=
2
1
H1 : The population median is strictly greater than 15 i.e. p ≠
2

r = no. of +ve signs = 14


s = no. of -ve signs = 6
N = r+s = 20
p-value for test = P(r≥14)
20

20
1 20
p value = P(r≥14) = ∑ Cr ( ) = 0.057659149
2
r=14
P(r≥14) > α/2(=0.025)
Now, we calculate P(r≤14)
20 1 14
P(r≤14) = 1 - P(r≥14) + P(r=14) = 1-0.057659149 + C14 (2) = 1-0.057659149 +0.036964
= 0.979305

2. For left tailed hypothesis,


Ho : Mean of daily emission of SO2 is 23.5 i.e. μe = 23.5
H1 : Mean of daily emission of SO2 is less than 23.5 i.e. μe < 23.5

r = no. of +ve signs =12


s = no. of –ve signs = 28
N = r + s = 40 (Case of Large Sample)

Normal approximation to binomial distribution is used.


N N
The distribution has mean μx = 2 = 20 and variance σ2x = 4 = 10
x − μx
Z= ~ N(0,1)
σx
Applying correction
Since, r < N/2, therefore, (x+0.5) is the correction

(x + 0.5) − μx 12.5 − 20
Z= = = −2.37171
σx √10
|Z| = 2.3717
Tabulated Z = 1.634 ( since single tail, computed Z at 10% LOS)

3. Setting the hypothesis,


1
Ho : There is no significant effect of coating on corrosion of steel pipes. i.e. p = P(D>0) =
2
1
H1 : Coating has reduced the corrosion of steel. i.e. p = P(D>0) <
2
Before Coating, xi After Coating, yi di= xi-yi
72 69 3
63 69 -6
53 58 -5
47 52 -5
38 33 5
56 57 -1
55 54 1
75 66 9
68 72 -4
57 71 -14
61 69 -8
52 53 -1
67 60 7

r = no. of +ve signs = 5


s = no. of negative signs = 8
N = r + s = 13
Under Ho, r ~ Bin (13,1/2)
5
13 1 13
Calculated p-value = P (r ≤ 5) = ∑ Cr (2) = 0.290527
r=0
-----------------------------------------------------------------------------------------------------------------------------
1
Ho : There is no significant effect of coating on corrosion of steel pipes. i.e. p = P(D>0) =
2
1
H1 : Coating has a significant effect on the corrosion of steel. i.e. p = P(D>0)≠
2

p-value for test = P (r ≤ 5)


5

13
1 13
P(r ≤ 5) = ∑ Cr ( ) = 0.290527
2
r=0
Since, P (r ≤ 5) > α/2

Now, we calculate P (r ≥ 5)
13 1 13
P value = P (r ≥ 5) = 1 – P (r ≤ 5) + P(r = 5) = 1-0.290527+ C5 (2) = 0.866577
P value > α/2(=0.025)
RESULT:
1.
 Right-tailed:
Since, p-value (=0.058) >0.05, we may accept Ho at 5% level of significance and conclude that
median of continuous distribution is 15 i.e., P(Xi>15) = p =0.5

 Two-tailed:
Since, p-value (=0.979) > 0.05, we may accept Ho at 5% level of significance and conclude that
median of continuous distribution is 15 i.e., P(Xi>15) = p =0.5.

2. Large Sample Sign Test


N =40 (>35)
N N
mean μx = 2 = 20 and variance σ2x = 4 = 10

Since, calculated value of |Z| (=2.37171) > tabulated Z (= 1.645) therefore we reject Ho at 5% level
of significance.
Hence, mean of daily emission of SO2 is less than 23.5.

3. Left Tailed Test to determine the efficacy of coating on steel pipes:


Since, P (r ≤ 5) = 0.290527 < 0.05
i.e., p value > α, therefore, we accept Ho at 5% level of significance and conclude that
There is no significant effect of coating on corrosion of steel pipes

Two- tailed Test to determine the efficacy of coating on steel pipes


 Performing left tailed test as above at α/2 level of significance
Since, P (r ≤ 5) = 0.290527 > 0.025
i.e., p value > α/2, therefore, we can now proceed to the next step:
 Performing left tailed test as above at α/2 level of significance
Since, P (r ≥ 5) = 0.866577 >0.025
We may accept Ho at 5% level of significance and conclude that:
There is no significant effect of coating on corrosion of steel pipes.

You might also like