Box diagram calculation method

Hypothetical array

arr = [12, 15, 17, 19, 20, 23, 25, 28, 30, 33, 34, 35, 36, 37] a total of 14 elements

 

 Q1's position = (n +1) / 4,

n represents the number of elements, so the position of Q1 = (14 + 1) /4=3.75, round off the decimal, the index value is 3

Therefore, we have to go to the third and fourth elements as parameters to calculate the value of Q1

Q1 = 0.25 × third item + 0.75 × fourth item = 0.25 × 17 + 0.75 × 19 = 18.5;

 

Medium: (median)

The position of the median = 2 (14 + 1) /4=7.5,

median = 0.5 × 7th term + 0.5 × 8th term = 0.5 × 25 + 0.5 × 28 = 26.5

 

Q3's position = 3 (14 + 1) /4=11.25,

Q3 = 0.75 × Eleventh term + 0.25 × Twelfth term = 0.75 × 34 + 0.25 × 35 = 34.25.

 

Upper limit

The upper limit is the maximum value in the non-abnormal range.

The first thing to know is how to calculate the interquartile range?

Interquartile range IQR = Q3-Q1, then upper limit = Q3 + 1.5IQR

Lower limit

The lower limit is the minimum value in the non-abnormal range.

Lower limit = Q1-1.5IQR

Guess you like

Origin www.cnblogs.com/IWings/p/12746240.html