Boxplots in matplotlib: Markers and outliers

后端 未结 6 907
情深已故
情深已故 2020-12-07 08:52

I have some questions about boxplots in matplotlib:

Question A. What do the markers that I highlighted below with Q1, Q2

6条回答
  •  囚心锁ツ
    2020-12-07 09:46

    The image below shows the different parts of a boxplot.

    Quantile 1/Q1: 25th Percentile

    Interquartile Range (IQR): 25th percentile to the 75th percentile.

    Median (Quantile 2/Q2): 50th Percentile.

    Quantile 3/Q3: 75th Percentile.

    I should note that the blue part are the whiskers of the boxplot.

    The image below compares the box plot of a normal distribution against the probability density function. It should help explain the "Minimum", "Maximum", and outliers.

    "Minimum": (Q1-1.5 IQR)

    "Maximum": (Q3+1.5 IQR)

    As zelusp said, 99.3% of data is contained within 2.698σ (standard deviations) for a normal distribution. The green circles (outliers) in the image below are the remaining .7% of the data. Here is a derivation of how those numbers came to be.

提交回复
热议问题