Presentation on theme: "Lecture 10 Non Parametric Testing STAT 3120 Statistical Methods I."— Presentation transcript:
Lecture 10 Non Parametric Testing STAT 3120 Statistical Methods I
STAT3120 – Non Parametric Previously, we discussed the three types of ttests, which represented the most common applications of hypothesis testing: 1) One Sample ttest – uses the mean of a single sample to determine if the projected population mean is statistically different from a specified value; 2) Two Sample ttest – uses the mean of two samples to determine if the two projected populations are statistically different from each other; 3) Paired ttest – uses the difference of two paired samples to determine if the paired samples (i.e., pre- post treatment) are statistically different.
STAT3120 – Non Parametric All of these tests, required the following to be true: 1.the individual samples were normal; 2.the individual samples came from populations with equal variance; 3.the individual samples were independent; 4.we preferred that the individual samples were of a size greater than 30. In some cases, our data will violate these assumptions. Specifically, we may find ourselves with small samples, which are not normal and contain extreme observations. If the samples are still independent, with approx equal variance, we use non-parametric tests in lieu of ttests.
STAT3120 – Non Parametric If we have two small samples which follow a non- normal distribution, and contain extreme observations, we will use the Wilcoxon Rank Sum Test in lieu of the simple two sample ttest. The Wilcoxon Rank Sum test follows the following steps: 1.assign all values across the two samples ascending rankings (the lowest ranking will be 1 and the highest ranking will be n 1 + n 2 ); 2.in the case of ties, give the tied values the average ranking (e.g., if two values would generate a “4”, give each value a 4.5, and the next value a 6); 3.Let T denote the summation of the rankings for population 1.
STAT3120 – Non Parametric When using the Wilcoxon Rank Sum test, the null hypothesis is that the two distributions are the same, and the claim is that they are different – population 1 is shifted to the left or to the right of population 2 (one tail) or a shift exists in either direction (2 tailed). The test statistic is T, which is the summation of the ranks of population 1. The critical value, can be found in Table 5 in your book.
STAT3120 – Non Parametric Decision rule: 1.Reject H 0 if T > T u 2.Reject H 0 if T < T L 3.Reject H 0 if T > T u or if T < T L Note that the power of a Wilcoxon Rank Sum test is always lower than the power of a ttest. Why do you think this is true?
STAT3120 – Non Parametric Review example on page 289.
STAT3120 – Non Parametric SAS Code: proc npar1way wilcoxon data=; class ; var ; exact; run;
STAT3120 – Non Parametric If we have two small paired samples which follow a non- normal distribution, and contain extreme observations, we will use the Wilcoxon Signed Rank Test in lieu of the paired sample ttest. The Wilcoxon Signed Rank test follows the following steps: 1.Calculate the differences in the n pairs of observations; 2.Subtract each observation from the hypothesized median of the distances (i.e., 0); 3.Delete all zeros. Identify the number of nonzero differences as n; 4.Sort the absolute value of the differences in ascending order and rank.
STAT3120 – Non Parametric When using the Wilcoxon Signed Rank test, the null hypothesis is that the distribution of the paired differences is symmetrical around a median of 0. The claim is that the distribution of differences is less than 0 or that the distribution of differences is greater than 0 (both one tailed) or that the differences are just not centered around 0 (could be in either direction – two tailed test). The test statistic is T, which is the lower value of the summation of the + ranks or the – ranks. The critical value, can be found in Table 6 in your book.
STAT3120 – Non Parametric Decision rule: Reject H 0 if z (test)<z(critical) Where z= [T-((n(n+1))/4)/SQRT((n(n+1)(2n+1))/24))] (see page 309)
Review example on page 309. STAT3120 – Non Parametric
SAS Code: proc univariate data=; var ; MU0=; run;