Chapter 13 Nonparametric Statistics Sign Test for Paired















- Slides: 15
Chapter 13 Nonparametric Statistics ©
Sign Test for Paired Samples Suppose that paired or matched random samples are taken from a population, and the differences equal to 0 are discarded, leaving n observations. Calculate the difference for each pair of observations and record the sign of the difference. The sign test is used to test: Where is the proportion of nonzero observations in the population that are positive. The test-statistic S for the sign test is simply, And S has a binomial distribution with = 0. 5 and n = the number of nonzero differences.
Determining p-value for a Sign Test The p-value for a Sign Test is found using the binomial distribution with n = number of nonzero differences, S = number of positive differences, and = 0. 5 a) For an upper-tail test, H 1: > 0. 5, p-value = P(x S) b) For a lower-tail test, H 1: < 0. 5, p-value = P(x S) c) For a two-tail test, H 1: 0. 5, 2(p-value)
Product Preference Example for Sign Test (Example 13. 1) Taster A B C D E F G H Rating Difference Original Product New Product (Original New) 6 4 5 8 3 6 7 5 8 9 4 7 9 9 7 9 -2 -5 1 1 -6 -3 0 -4 Sign of Difference + + 0 -
The Sign Test: Normal Approximation (Large Samples) If the number n of nonzero sample observations is large, then the sign test is based on the normal approximation to the binomial with mean and standard deviation The test statistic is Where S* is the test-statistic corrected for continuity defined as: a) For a two-tail test, b) S* = S + 0. 5, if S < or S* = S - 0. 5, if S > b) For upper-tail test, S* = S – 0. 5 c) For lower-tail test, S* = S + 0. 5
The Wilcoxon Signed Rank Test for Paired Samples The Wilcoxon Signed Rank Test can be employed when a random sample of matched pairs of observations is available. Assume that the population distribution of the differences in these paired samples is symmetric, and we want to test the null hypothesis that this distribution is centered at 0. Discarding pairs for which the difference is 0, we rank the remaining n absolute differences in ascending order with ties assigned the average of the ranks they occupy. The sums of the ranks corresponding to positive and negative differences are calculated, and the smaller of these sums is the Wilcoxon Signed Rank Statistic T, that is T = min(T+, T- ) Where T+ = the sum of the positive ranks T- = the sum of the negative ranks n = the number of nonzero differences The null hypothesis is rejected if T is less than or equal to the value in the Appendix table.
The Wilcoxon Signed Rank Test: Normal Approximation (Large Samples) Under the null hypothesis that the population differences are centered on 0, the Wilcoxon Signed Rank Test has mean and variance given by and Then, for large n, the distribution of the random variable, Z, is approximately standard normal where If the number n of nonzero differences is large and T is the observed value of the Wilcoxon statistic, then the following test have significance level ,
The Wilcoxon Signed Rank Test: Normal Approximation (Large Samples) (continued) i. If the alternative hypothesis is one-sided, reject the null hypothesis if ii. If the alternative hypothesis is two-sided, reject the null hypothesis if
Mann-Whitney U Statistic Assume that apart from any possible differences in central location, that two population distributions are identical. Suppose that n 1 observations are available from the first population and n 2 observations from the second. The two samples are pooled and the observations are ranked in ascending order, with ties assigned the average of the next available ranks. Let R 1 denote the sum of the ranks of the observations from the first population. The Mann-Whitney U statistic is then defined as
Mann-Whitney U Test: Normal Approximation Assuming that the null hypothesis that the central locations of the two population distributions are the same, the Mann-Whitney U, U has mean and variance Then for large sample sizes (both at least 10), the distribution of the random variable is approximated by the normal distribution.
Decision Rules for the Mann. Whitney Test It is assumed that the two population distributions are identical, apart from any possible differences in central location. In testing the null hypothesis that the two populations have the same central location, the decision rule for a given significance level is 1. For a one-sided upper-tailed alternative hypothesis, the decision rule is: 2. For a one-sided lower-tailed hypothesis, the decision rule is: 3. For a two-sided alternative hypothesis, the decision rule is:
Wilcoxon Rank Sum Statistic T Suppose that n 1 observations are available from the first population and n 2 observations from the second. The two samples are pooled and the observations are ranked in ascending order, with ties assigned the average of the next available ranks. Let T denote the sum of the ranks of the observations from the first population (T in the Wilcoxon Rank Sum Test is the same as R 1 in the Mann-Whitney U Test). Assuming that the null hypothesis is to be true, The Wilcoxon Rank Sum Statistic T has and Then, for large n, (n 1 10 and n 2 10) the distribution of the random variable, is approximated by the normal distribution.
Spearman’s Rank Correlation Suppose that a random sample (x 1 , y 1), . . . , (xn, yn) of n pairs of observations is taken. If the xi and yi are each ranked in ascending order and the sample correlation of these ranks is calculated, the resulting coefficient is called Spearman’s Rank Correlation Coefficient. If there are no tied ranks, an equivalent formula for computing this coefficient is Where the di are the differences of the ranked pairs.
Spearman’s Rank Correlation (continued) The following tests of the null hypothesis H 0 of no association in the population have significance level i. To test against the alternative of positive association, the decision rule is ii. To test against the alternative of negative association, the decision rule is iii. To test against the two-sided alternative of some association, the decision rule is
Key Words 4 Mann-Whitney U Test 4 Normal Approximation 4 Statistic 4 Sign Test 4 Normal Approximation 4 Paired Samples 4 P-value 4 Population Median 4 Spearmann’s Rank Correlation 4 Coefficient 4 Test 4 Wilcoxon Rank Sum Test 4 Statistic 4 Wilcoxon Signed Rank Test 4 Normal Approximation 4 Statistic