In order to know the age at which student smokers started smoking, 15 randomly selected students
smokers about the age they started smoking. The results is shown below.
21 17 20 19 16 15 17 18 25 24 19 16 22 19 23
(a) Using the sign test and the critical region method, test at 10% significance level the
hypothesis that the third quartile is 20 years.
(b) Use to the Wilcoxon Signed Rank test to test at 10% level of significance whether the median
age is less than 19 years.
a.
Let be the third quartile. We perform the sign test as follows.
Hypothesis tested is,
X 21 17 20 19 16 15 17 18 25 24 19 16 22 19 23
Xi-20 +1 -3 0 -1 -4 -5 -3 -2 +5 +4 -1 -4 +2 -1 +3
Sign + - - - - - - + + - - + - +
Let be the total number of plus signs and be the total number of minus signs.
From this summary, there are 5 plus signs and 9 minus signs. Therefore, and and is the total number of observations excluding those whose differences are 0. Thus .
Let us determine the test statistic given as,
To run the sign test, we use the binomial distribution tables where our probability since if the null hypothesis were true then we expect 75% of the values to be below the third quartile and 25% of the values to be above the third quartile. Therefore, the test is a simple binomial experiment with 0.75 chance of the sign being positive and 0.25 of it being negative.
The number of trials are as stated above and the number of successes is .
Using the critical region method, let us define the following.
Rejection region is and acceptance region is .
Therefore, we find with and number of successes is 5. We use the following commands in .
which gives to 4 decimal places. This probability is the which is compared with and the null hypothesis rejected if .
Since we reject the null hypothesis and conclude that there is sufficient evidence to show that the third quartile is not equal to 20.
b.
In order to perform the Wilcoxon signed rank test, let us first summarize our data as follows.
X 21 17 20 19 16 15 17 18 25 24 19 16 22 19 23
Xi-19 +2 -2 +1 0 -3 -4 -2 -1 +6 +5 0 -3 +3 0 +4
|Xi-19| 2 2 1 3 4 2 1 6 5 3 3 4
This test requires us to sort the absolute values from small to largest and then rank them with the smallest value assigned rank 1. Differences equal to zero are dropped and incase of tied ranks average rank is assigned.
Now,
|Xi-19| 1 1 2 2 2 3 3 3 4 4 5 6
sign - + - - + - - + - + + +
rank 1.5 1.5 4 4 4 7 7 7 9.5 9.5 11 12
Let W1 be the sum of ranks assigned to positive differences and W2 be the sum of ranks assigned to negative differences then,
W1=1.5+4+7+9.5+11+12=45
W2=1.5+4+4+7+7+9.5=33
After dropping values whose differences are 0, our new
Test statistic is and the test statistic is normally distributed with mean and standard deviation
The standardized test statistic is given as,
and its is compared with the table value at .
and the null hypothesis is rejected if .
Since , we fail to reject the null hypothesis and conclude that sufficient evidence do not exist to show that the median value less than 19 at 10% level of significance.
Comments