Dataplot Vol 2 Vol 1

# DIFFERENCE OF MEDIAN

Name:
DIFFERENCE OF MEDIAN (LET)
Type:
Let Subcommand
Purpose:
Compute the difference between the medians for two response variables.
Description
The median is the value of the observation for which half the observations are larger and half are smaller. If there are an even number of data points, the mean is taken of the two middle points.

For the difference of medians, the median is computed for two samples and then their difference is taken.

Syntax:
LET <par> = DIFFERENCE OF MEDIAN <y1> <y2>
<SUBSET/EXCEPT/FOR qualification>
where <y1> is the first response variable;
<y2> is the first response variable;
<par> is a parameter where the computed difference of the meidans is stored;
and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Examples:
LET A = DIFFERENCE OF MEDIAN Y1 Y2
LET A = DIFFERENCE OF MEDIAN Y1 Y2 SUBSET X > 1
Note:
Dataplot statistics can be used in a number of commands. For details, enter

Default:
None
Synonyms:
None
Related Commands:
 MEDIAN = Compute the median. MEAN = Compute the mean. DIFFERENCE OF MEAN = Compute the difference of means. DIFFERENCE OF TRIMMED MEAN = Compute the difference of trimmed means. DIFFERENCE OF MIDMEAN = Compute the difference of midmeans. DIFFERENCE OF BIWEIGHT LOCATION = Compute the difference of biweight locations. STATISTICS PLOT = Generate a statistic versus subset plot. BOOTSTRAP PLOT = Generate a bootstrap plot. TABULATE = Perform a tabulation for a specified statistic.
Applications:
Data Analysis
Implementation Date:
2003/03
Program:
```SKIP 25
READ IRIS.DAT Y1 TO Y4 X
.
LET A = DIFFERENCE OF MEDIAN Y1 Y2
TABULATE DIFFERENCE OF MEDIAN Y1 Y2 X
.
XTIC OFFSET 0.2 0.2
X1LABEL GROUP ID
Y1LABEL DIFFERENCE OF MEDIANS
CHAR X
LINE BLANK
DIFFERENCE OF MEDIAN PLOT Y1 Y2 X
CHAR X ALL
LINE BLANK ALL
BOOTSTRAP DIFFERENCE OF MEDIAN PLOT Y1 Y2 X
```
Dataplot generated the following output.
```       ******************************************
**  LET A = DIFFERENCE OF MEDIAN Y1 Y2  **
******************************************

THE COMPUTED VALUE OF THE CONSTANT A             =  0.28000002E+01

*********************************************
**  TABULATE DIFFERENCE OF MEDIAN Y1 Y2 X  **
*********************************************

*    Y1       AND Y2
X           *    DIFFERENCE OF MEDIAN
**********************************************
1.00000     *     1.60000
2.00000     *     3.10000
3.00000     *     3.50000

GROUP-ID AND STATISTIC WRITTEN TO FILE DPST1F.DAT
```

NIST is an agency of the U.S. Commerce Department.

Date created: 03/21/2003
Last updated: 11/09/2015