Our given list:
Data = {3, 0, 6, −5, −2, 5, −18, 20, 14, 18, −10, 10, 50, −20, 14}
Sorted:
Sort[Data]
{-20, -18, -10, -5, -2, 0, 3, 5, 6, 10, 14, 14, 18, 20, 50}
Range is the difference between the highest and the lowest value:
Max[Data] - Min[Data]
70
Median is the value separating the higher half from the lower half of the data set:
Median[Data]
5
A percentile is the value below which a given percentage of observations in a group of values falls. For example, the 20th percentile is the value below which 20% of the values may be found.
Quantile[Data, 20/100]
-10
The interquartile range (IQR) is equal to the difference between 75th and 25th percentiles, or between upper and lower quartiles. In other words, the IQR is the first quartile subtracted from the third quartile.
Quantile[Data, 3/4] - Quantile[Data, 1/4]
19
Comments
Leave a comment