SSMEDIAN

SSMEDIAN median for grouped data

Synopsis

SSMEDIAN(array,interval)

Arguments

array: data set

interval: length of each grouping interval, defaults to 1

Description

The data are assumed to be grouped into intervals of width interval. Each data point in array is the midpoint of the interval containing the true value. The median is calculated by interpolation within the median interval (the interval containing the median value), assuming that the true values within that interval are distributed uniformly:

median = L + interval*(N/2 - CF)/F

where:

L = the lower limit of the median interval

N = the total number of data points

CF = the number of data points below the median interval

F = the number of data points in the median interval

Note

If array is empty, this function returns a #NUM! error. If interval <= 0, this function returns a #NUM! error. SSMEDIAN does not check whether the data points are at least interval apart.

See also

MEDIAN.