The MEDIAN function
returns the median of the nonmissing or nonnull values. If all arguments
have missing or null values, the result is a missing or null value.
Note: The formula that is used
in the MEDIAN function is the same as the formula that is used in
PROC UNIVARIATE in Base SAS Procedures Guide: Statistical Procedures. For more information,
see SAS Elementary Statistics Procedures.
Comparisons
The MEDIAN function
returns the median of nonmissing or nonnull values, whereas the MEAN
function returns the arithmetic mean (average).
Example
The following statements
illustrate the MEDIAN function: