Friday, April 10, 2020

median

A measure of center. The middle value of a set of ordered numbers. 50% of the set lies on either side of the median. Like mean, the median does not have to be a member of the set, so if the set has an even number of elements, the median is halfway between the two middle members.

R Example

> lst <- c(1:34, 35, -22)
> lst
 [1]   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19
[20]  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35 -22
> median(lst)
[1] 17.5

No comments:

Post a Comment

Please help to combat malicious use of the Internet.