# Answer in Statistics and Probability for efo Ck #250887

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 “Q3” be the third quartile. We perform the sign test as follows.

Hypothesis tested is,

“H_0:Q3=20”

“Against”

“H_1:Q3not=20”

X 21 17 20 19 16 15 17 18 25 24 19 16 22 19 23

X_{i}-20 +1 -3 0 -1 -4 -5 -3 -2 +5 +4 -1 -4 +2 -1 +3

Sign + – – – – – – + + – – + – +

Let “n+” be the total number of plus signs and “n-“ be the total number of minus signs.

From this summary, there are 5 plus signs and 9 minus signs. Therefore, “n+=5” and “n-=9” and “n” is the total number of observations excluding those whose differences“(X_i-20)” are 0. Thus “n=n++n-=5+9=14” .

Let us determine the test statistic “m” given as, “m=minimum(n+,n-)=minimum(5,9)=5”

To run the sign test, we use the binomial distribution tables where our probability “p=0.75” 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 “n=14” as stated above and the number of successes is “m=5”.

Using the critical region method, let us define the following.

Rejection region is “(mleqslant5)” and acceptance region is “(mgt5)”.

Therefore, we find “p(mleqslant5)” with “n=14” and number of successes is 5. We use the following commands in “R”.

“pbinom(5,14.0.75)” which gives “0.0022” to 4 decimal places. This probability is the “p-value” which is compared with “alpha=0.1” and the null hypothesis rejected if “p-valueltalpha” .

Since “p-value=0.0022lt alpha=0.1,” 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.

“H_0:m=19”

“Against”

“H_1:mlt19”

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,

|X_{i}-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 W_{1} be the sum of ranks assigned to positive differences“(X_i-19)” and W_{2} be the sum of ranks assigned to negative differences“(X_i-19)” then,

W_{1}=1.5+4+7+9.5+11+12=45

W_{2}=1.5+4+4+7+7+9.5=33

After dropping values whose differences are 0, our new “n=12”

Test statistic is “W=minimum(33,45)=33” and the test statistic “W” is normally distributed with mean “mu_W=n(n+1)/4=12*13/4=39” and standard deviation “sigma_W=sqrt{(n(n+1)(2n+1)/24)}=sqrt{(12*13*25)/24}=162.5”

The standardized test statistic is given as,

“z=(W-mu_W)/sigma_W=(33-39)/162.5=-0.0369(4space decimalspace places)” and its “|z|=|-0.0369|=0.0369” is compared with the table value “Z_alpha” at “alpha=0.1”.

“Z_alpha=2.33” and the null hypothesis is rejected if “|z|gt Zalpha” .

Since “|z|=0.0368lt Zalpha=2.33”, 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.