
MEDIAN TESTName:
Note that the chisquare critical value is a large sample approximation. Conover recommends dropping all samples with only one observation from the analysis in order for the approximation to be valid.
where <y> is the response variable; <x> is the groupid variable; and where the <SUBSET/EXCEPT/FOR qualification> is optional.
<SUBSET/EXCEPT/FOR qualification> where <y1> ... <yk> is a list of 2 to 30 response variables; and where the <SUBSET/EXCEPT/FOR qualification> is optional. This syntax can be used when the data for each sample is in a separate variable. This syntax supports the TO syntax for the variable list and also supports matrix arguments.
MULTIPLE MEDIAN TEST Y1 TO Y5
In addition, the following internal parameters are saved
LET A = MEDIAN TEST CDF Y X LET A = MEDIAN TEST PVALUE Y X In addition to the above LET command, builtin statistics are supported for about 20+ different commands (enter HELP STATISTICS for details).
If the median test indicates the medians are not all equal, you can determine which pairs of medians are not equal by performing the median test on each pairwise set of observations. For example, you could do something like
MEDIAN TEST Y1 Y2 MEDIAN TEST Y1 Y3 MEDIAN TEST Y1 Y4 MEDIAN TEST Y2 Y4 MEDIAN TEST Y3 Y4
where <value> is a quantile between 0 and 1. The default value is 0.5 (i.e., the median).
. Purpose: Test Median Test command . . Step 1: Read Data (example 1 from pp. 304305 of Conover) . let y1 = data 10.8 11.1 10.4 10.1 11.3 let y2 = data 10.8 10.5 11.0 10.9 10.8 10.7 10.8 . let y x = stacked y1 y2 set write decimals 4 . . Step 2: Check the statistic . let stat2 = median test y x let cdf2 = median test cdf y x let pval2 = median test pvalue y x print stat2 cdf2 pval2 . median test y xThe following output is generated. PARAMETERS AND CONSTANTS STAT2  0.1714 CDF2  0.3212 PVAL2  0.6788 Median Test Response Variable: Y GroupID Variable: X H0: Samples Have Equal Medians Ha: At Least Two Samples Have Different Medians Summary Statistics: Original Number of Observations: 12 Number of Observations After Omitting Groups With Less Than Two Observations: 12 Number of Groups: 2 Grand Median: 11 Number of Points > the Grand Median: 4 Number of Points <= the Grand Median: 8 Median Test Statistic Value: 0.1714 CDF of Test Statistic: 0.3211 PValue: 0.6788 Percent Points of the ChiSquare Reference Distribution  Percent Point Value  0.0 = 0.000 50.0 = 0.455 75.0 = 1.322 90.0 = 2.706 95.0 = 3.841 97.5 = 5.024 99.0 = 6.634 99.9 = 10.827 UpperTailed Test: ChiSquare Approximation H0: Medians Are Equal; Ha: Medians Are Not Equal  Null Significance Test Critical Hypothesis Level Statistic Value (>) Conclusion  90.0% 0.1714 2.7055 ACCEPT 95.0% 0.1714 3.8414 ACCEPT 97.5% 0.1714 5.0238 ACCEPT 99.0% 0.1714 6.6348 ACCEPT 99.9% 0.1714 10.8275 ACCEPTProgram 2: . Purpose: Test Median Test command . . Step 1: Read Data (example 1 from pp. 221 of Conover) . let y1 = data 83 91 94 89 89 96 91 92 90 let y2 = data 91 90 81 83 84 83 88 91 89 84 let y3 = data 101 100 91 93 96 95 94 let y4 = data 78 82 81 77 79 81 80 81 . . Step 2: Check the statistic . . stat = 17.6, pvalue = 0.001 . set write decimals 4 multiple median test y1 y2 y3 y4The following output is generated. Median Test H0: Samples Have Equal Medians Ha: At Least Two Samples Have Different Medians Summary Statistics: Original Number of Observations: 34 Number of Observations After Omitting Groups With Less Than Two Observations: 34 Number of Groups: 4 Grand Median: 89 Number of Points > the Grand Median: 16 Number of Points <= the Grand Median: 18 Median Test Statistic Value: 17.5430 CDF of Test Statistic: 0.9994 PValue: 0.0005 Percent Points of the ChiSquare Reference Distribution  Percent Point Value  0.0 = 0.000 50.0 = 2.366 75.0 = 4.107 90.0 = 6.251 95.0 = 7.815 97.5 = 9.348 99.0 = 11.345 99.9 = 16.265 UpperTailed Test: ChiSquare Approximation H0: Medians Are Equal; Ha: Medians Are Not Equal  Null Significance Test Critical Hypothesis Level Statistic Value (>) Conclusion  90.0% 17.5430 6.2513 REJECT 95.0% 17.5430 7.8147 REJECT 97.5% 17.5430 9.3484 REJECT 99.0% 17.5430 11.3448 REJECT 99.9% 17.5430 16.2662 REJECT  
Privacy
Policy/Security Notice
NIST is an agency of the U.S. Commerce Department.
Date created: 09/15/2011 