Download presentation
Presentation is loading. Please wait.
Published byVeronika Widjaja Modified over 6 years ago
1
Lesson Inferences about the Differences between Two Medians: Dependent Samples
2
Objectives Test a claim about the difference between the medians of two dependent samples
3
Vocabulary Wilcoxon Matched-Pairs Signed-Ranks Test -- a nonparametric procedure that is used to test the equality of two population medians obtained through dependent sampling (matched pairs). Ranks – 1 through n with ties award the sum of the tied ranks divided by the number tied. For example, if 4th and 5th observation was tied then they would both receive a 4.5 ranking. Signed-Ranks – ranks are constructed with absolute values and then the sign of the value (positive or negative) is applied to the ranking.
4
Parametric vs Nonparametric
For our parametric test for matched-pairs (dependent samples), we Compared the corresponding observations by subtracting one from the other Performed a test of whether the mean is 0 using either t or z procedures Conditions: SRS, Independence (of differences), Normality For our nonparametric case for matched-pairs (dependent samples), we will Compare the corresponding observations by subtracting one from the other Perform a test of whether the median is 0 Conditions: matched pairs, random sample
5
Hypothesis Tests Using Wilcoxon Test
Step 0: Compute the differences in the matched-pairs observations. Rank the absolute value of all sample differences from smallest to largest after discarding those differences that equal 0. Handle ties by finding the mean of the ranks for tied values. Assign negative values to the ranks where the differences are negative and positive values to the ranks where the differences are positive. Step 1 Hypotheses: Step 2 Box Plot: Draw a boxplot of the differences to compare the sample data from the two populations. This helps to visualize the difference in the medians. Step 3 Level of Significance: (level of significance determines the critical value) Determine a level of significance, based on the seriousness of making a Type I error Small-sample case: Use Table XI. Large-sample case: Use Table IV. (z table) Step 4 Compute Test Statistic: Step 5 Critical Value Comparison: Reject H0 if test statistic < critical value Step 6 Conclusion: Reject or Fail to Reject Left-Tailed Two-Tailed Right-Tailed H0: MD = 0 H1: MD < 0 H0: MD = 0 H1: MD ≠ 0 H0: MD= 0 H1: MD > 0
6
Test Statistic for the Wilcoxon Matched-Pairs Signed-Ranks Test
Small-Sample Case: (n ≤ 30) Large-Sample Case: (n > 30) Left-Tailed Two-Tailed Right-Tailed H0: MD = 0 H1: MD < 0 H0: MD = 0 H1: MD ≠ 0 H0: MD= 0 H1: MD > 0 T = T+ T = smaller of T+ or |T-| T = |T-| Note: MD is the median of the differences of matched pairs. T+ is the sum of the ranks of the positive differences T- is the sum of the ranks of the negative differences n (n + 1) T – z0 = n (n + 1)(2n + 1) Need: T (from above) n (number in sample) where T is the test statistic from the small-sample case.
7
Critical Value for Wilcoxon Matched-Pairs Signed-Ranks Test
Small-Sample Case (n ≤ 30): Using α as the level of significance, the critical value is obtained from Table XI in Appendix A. Large-Sample Case (n > 30): Using α as the level of significance, the critical value is obtained from Table IV in Appendix A. The critical value is always in the left tail of the standard normal distribution. Left-Tailed Two-Tailed Right-Tailed -Tα -Tα/2 Left-Tailed Two-Tailed Right-Tailed -zα -zα/2
8
Comparison: TS vs CV Two-Tailed: if TS < CVα/2, reject H0
Left-Tailed: if TS < CVα, reject H0 Right-Tailed: if TS < CVα, reject H0
9
Example 1 from 15.4 X Y D = Y-X |D| Signed Rank NegT-calc 11.5 26.0
14.5 +7.5 14.1 26.2 12.1 +5 19.3 24.6 5.3 +3 35.0 30.8 -4.2 4.2 -2 15.9 37.5 21.6 +11 21.5 36.0 11.7 25.9 14.2 +6 17.1 16.9 -0.2 0.2 -1 27.3 50.2 22.9 +12 13.8 33.1 +10 43.2 99.9 56.7 +14 11.2 26.1 14.9 +9 34.2 43.8 9.6 +4 26.7 63.8 37.1 +13 T+ = 88 T- = |-3| = 3
10
Example continued H0: Meddif = 0 (Medians daily volumes are the same) Ha: Meddif > 0 (Medy > Medx Right tailed test) Box plot: Med-y > Med-x (My has an outlier) Test Statistic: |T-| = 3 (Sum of ranks in support of H0) From Table XI: Tcritcal = T0.05 = 25 The test statistic is less than the critical value (3 < 25) so we reject the null hypothesis and conclude My > Mx
11
HyCCI for Example 1 Hyp: H0: Median daily volume of JDS = Nortel Ha: Median daily volume of JDS > Nortel Conditions: Assume a matched pair random sample Calculations: Box plot: MedJDS > MedNortel (MJDS has an outlier) Test Statistic: |T-| = 3 (Sum of ranks in support of H0) From Table XI: Tcritcal = T0.05 = 25 Interpretation: The test statistic is less than the critical value (3 < 25) so we reject the null hypothesis and conclude MJDS > MNortel
12
Summary and Homework Summary Homework
The Wilcoxon sign test is a nonparametric test for comparing the median of two dependent samples This test is a weighted count of the differences in signs between the paired observations The critical values for small samples are given in tables The critical values for large samples can be approximated by a calculation with the normal distribution Homework problems 2, 4, 5, 8, 9, 15 from the CD
13
Homework Answers n T+ T- T z0 Test Stat Prob 4 20 65 -1.493 Prob 5 15
33 -1.533 Prob 8 14 60 45 -0.471 Prob 9 40 300 -1.479 Prob 15 8 30 4 -1.96 Diff Rank 38 52 58 2 72 7 5 74 -2 56 54 36 48 12 6 n = -4
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.