Non - Parametric Test
Wilcoxon's signed rank test:
In the previous blog we see the sign test. in sign test we converting the observation into (+) plus and (-) minus sign there is no considering the magnitude of observation. if the data are measured in interval or ratio scale, it is the draw back of sign test it can be overcome. if the information about the variable are given in ordinal scale then we use sign test but if the data are given in interval or ratio scale then not recommended the sign test. therefore overcome this drawback of sign test we use wilcoxons sign ranked test.in that test use sign as well as magnitude of difference. therefore the wilcoxons test use more information than sign test, hence it is more powerful than sign test. And wilcoxons test is alternative to t-test.
Assumptions: The wilcoxons sign rank test required following assumptions.
1. The sample selected form population with unknown median.
2. The variable for under study is continuous.
3.The scale of measurement is at least interval scale.
Procedure: The procedure of Wilcoxons signed rank test.
Let X1 ,X2, X3, ..........Xn. be a random sample of size n arranged in order of occurrence. form the population with unknown median. now we wish to test the hypothesis that the specified value m0 (i.e. the hypothetical median is m ) of population median.
Hypothesis: The null and alternative hypothesis is as
H0 :μ=μ0 VS
H1 :μ≠ μ0
the test consist following steps as
Step I: We subtracting m0 from each observation (i.e. obtaining the difference between the m0 and each observation and it is denoted as di with their signs plus and minus. i.e. di = Xi -m0 .
but one of the observation is equal to m0 then we discarding the observation form data. then the sample size id reduced it is denoted as n.
Step II :- in next step we take the absolute value of difference di as |di |
Step III:- in this step we ranking the di with their magnitude from smallest to largest value, the smallest observation have rank 1 and second smallest observation have rank 2 and so on. if the tied occur we take the average of rank and assigned same rank to tied observations.
Step IV :- in this step we assigned the original sign of difference to the rank.
Step V:- we calculating the sum of positive rank and denotes as T+ and sum of negative rank is denotes as T-
Step VI: for taking the decision about hypothesis the test statistics is smaller value of T+ and T- and the test statistics is compared with critical value for the given level of significance. here critical value id obtained using the table, of wilcoxons critical value table.
the decision criteria is based on the number of observation because it dependant on sample size.
1. if the observation less than or equal to 25 then we use small sample test.
for small sample test we use
the test statistics is
T= Min(T+ , T- )
if the calculated T is less than or equal to the critical value Tα/2 at α% of level of significance. i.e. T ≤ Tα/2
then we reject the null hypothesis at α% of level of significance. other wise we accept null hypothesis.
2. if the observation Greater than 25 then we use large sample test.
for large sample test the test statistics has approximately normal distribution with mean
E(T)
= {n(n+1)}/4
And
variance is Var (T) = {n(n+1)(2n+1)}/24
Therefore
the test statistics of Z-test is
Z=
{T-E(T)}/S.D(T) and Z Has normal distribution
Where
E(T) = {n(n+1)}/4, Var (T) =
{n(n+1)(2n+1)}/24
We
calculating the Z and compared with Critical value at α % of level of significance. And taking
decision about hypothesis.
here calculated Z value is lies in Non- rejection area we Accept the hypothesis.
carefully check this values.
e.g. the calculated value of Z = -0.31 and critical value is +-1.96
then the calculated value -0.31 is greater than the critical value -1.96 and less than +1.96 that means it lies is Non-rejection area hence we Accept the Null Hypothesis.
Example on wilcoxon's sign test for one sample test.
Ex. 1. A random sample of 15 children of one month or older shows the following pulse rates (beats per minutes) 119, 120, 125, 122, 118, 117, 126, 114, 115, 126, 121, 120, 124, 127, 126. assuming that the distribution of pulse rate is symmetric about median its median and continuous, is there evidence to suggest that the median of pulse rate is 120 beats per minute at 5% level of significance.
Answer:- Here the only value are given the distribution of pulse rate not given so we does not use (assumption of normality not fulfill) parametric test. and the assumption of Wilcoxon test are fulfill then we use wilcoxon's sign rank test for the testing.
we want to test the median of pulse rate is 120 or not for that we defining the null and alternative hypothesis as
H0 :μ0=120 (i.e. the median of pulse rate is 120)
VS
H1 :μ0≠120 (i.e. the median of pulse rate is not equal to 120)
the test statistics for the test is T= Min(T+ , T- )
where T+ = sum of positive rank and T- = sum of negative rank.
now calculating T+ & T- using table
Sr. No. | Pulse rate X | Di=(Xi-m) | | Di| | Rank | Signed Rank |
1 | 119 | -1 | 1 | 1.5 | -1.5 |
2 | 120 | - | - | - | - |
3 | 125 | 5 | 5 | 7.5 | 7.5 |
4 | 122 | 2 | 2 | 3.5 | 3.5 |
5 | 118 | -2 | 2 | 3.5 | -3.5 |
6 | 117 | -3 | 3 | 5 | -5 |
7 | 126 | 6 | 6 | 10.5 | 10.5 |
8 | 114 | -6 | 6 | 10.5 | -10.5 |
9 | 115 | -5 | 5 | 7.5 | -7.5 |
10 | 126 | 6 | 6 | 10.5 | 10.5 |
11 | 121 | 1 | 1 | 1.5 | 1.5 |
12 | 120 | - | - | - | - |
13 | 124 | 4 | 4 | 6 | 6 |
14 | 127 | 7 | 7 | 13 | 13 |
15 | 126 | 6 | 6 | 10.5 | 10.5 |
from the above table we calculate T+ & T-
T+ =7.5+3.5+ 10.5+1.5+6+13+10.5 = 63
T- = 1.5+3.5+5+10.5+7.5 = 28
here n = total number of plus and minus sings = 13
here the n is less than 20 then we use small sample test. (i.e. n < 20)
we have the test statistics T= Min( T+ , T-)
T = Min ( 63, 28) = 28
it is calculated value of T statistics now the critical value corresponding to n=13 and at 5% level of significance. form the table it will be 18
now comparing this values the calculated value is greater than the critical value(i.e. 28 > 18) then we Accept the null hypothesis. hence we conclude that the median of pulse rate is equal to 120.
Ex. 2. The following data show the weights of 34 students in collage.
49, 50, 51, 48, 47, 48, 46, 47, 45, 25, 65, 59, 58, 47, 49, 46, 41, 40, 58, 49, 57, 45, 85, 48, 48, 47, 69, 58, 64, 57, 59, 52, 51, 42.
to test the median weight of students is 50 kg at 5% level of significance.
Answer : Here the only value are given the distribution of Weight not given so we does not use ( assumption of normality not fulfill) parametric test. and the assumption of Wilcoxon test are fulfill then we use wilcoxon's sign rank test for the testing.
H0 : μ0=50 (i.e. the median of Weight is 50)
H1: μ0≠50(i.e. the median of Weight is not equal to 50)
the test statistics for the test is T= Min(T+ , T- )
where T+ = sum of positive rank and T- = sum of negative rank.
now calculating T+ & T- using table
Sr. No. | Weight X | Di=(Xi-m) | | Di| | Rank | Signed Rank |
1 | 49 | -1 | 1 | 3 | -3 |
2 | 50 | - | - | - | - |
3 | 51 | 1 | 1 | 3 | 3 |
4 | 48 | -2 | 2 | 8 | -8 |
5 | 47 | -3 | 3 | 12.5 | -12.5 |
6 | 48 | -2 | 2 | 8 | -8 |
7 | 46 | -4 | 4 | 15.5 | -15.5 |
8 | 47 | -3 | 3 | 12.5 | -12.5 |
9 | 45 | -5 | 5 | 17.5 | -17.5 |
10 | 25 | -25 | 25 | 32 | -32 |
11 | 65 | 15 | 15 | 30 | 30 |
12 | 59 | 9 | 9 | 26 | 26 |
13 | 58 | 8 | 8 | 16.5 | 16.5 |
14 | 47 | -3 | 3 | 12.5 | -12.5 |
15 | 49 | -1 | 1 | 3 | -3 |
16 | 46 | -4 | 4 | 15.5 | -15.5 |
17 | 41 | -9 | 9 | 26 | -26 |
18 | 40 | -10 | 10 | 28 | -28 |
19 | 58 | 8 | 8 | 16.5 | 16.5 |
20 | 49 | -1 | 1 | 3 | -3 |
21 | 57 | 7 | 7 | 19.5 | 19.5 |
22 | 45 | -5 | 5 | 17.5 | -17.5 |
23 | 85 | 35 | 35 | 33 | 33 |
24 | 48 | -2 | 2 | 8 | -8 |
25 | 48 | -2 | 2 | 8 | -8 |
26 | 47 | -3 | 3 | 12.5 | -12.5 |
27 | 69 | 19 | 19 | 31 | 31 |
28 | 58 | 8 | 8 | 16.5 | 16.5 |
29 | 64 | 14 | 14 | 29 | 29 |
30 | 57 | 7 | 7 | 19.5 | 19.5 |
31 | 59 | 9 | 9 | 26 | 26 |
32 | 52 | 2 | 2 | 8 | 8 |
33 | 51 | 1 | 1 | 3 | 3 |
34 | 42 | -8 | 8 | 16.5 | -16.5 |
from the above table we calculate T+ & T-
T+ =277.5
T- = 259.5
T= Min(277.5 , 259.5 ) = 259.5
here n = total number of plus and minus sings = 33
here the n is Greater than 20 then we use large sample test. (i.e. n > 20)
for large sample test the test statistics has approximately normal distribution with mean
E(T) = {n(n+1)}/4 = 33(34) / 4 = 280.5
And variance is Var (T) = {n(n+1)(2n+1)}/24 = (33*34*69)/ 24 = 3225.75
Therefore the test statistics of Z-test is
Z= {T-E(T)}/S.D(T) = {259.5-280.5}/Ö(3225.75) = -0.3697
Where S. D. =Ö(Var(T))
We calculating the Z and compared with Critical value at 5 % of level of significance.
the calculated value of Z = -0.3697 and critical value is +-1.96
then the calculated value -0.3697 is greater than the critical value -1.96 and less than +1.96 That means it lies is Non-rejection area hence we Accept the Null Hypothesis.
Comments
Post a Comment