Does outliers begin on the whisker limit or above it?
In the (Python) example below the calculcated upper whisker limit is 64.8125
. Is a value of 64.8125
an outlier (>= upper_limit
)? Or the outliers are higher then the limit (> upper_limit
)?
>>> import seaborn as sns
>>> df = sns.load_dataset('titanic)
>>> df.age.quantile([.25, .5, .75])
0.25 20.125
0.50 28.000
0.75 38.000
Name: age, dtype: float64
>>> q1, q2, q3 = df.age.quantile([.25, .5, .75])
>>> iqr = q3 - q1
>>> whisker_length = iqr * 1.5
>>> upper_limit = q3 + whisker_length
>>> lower_limit = q1 - whisker_length
>>> lower_limit, upper_limit
(-6.6875, 64.8125)