[go: nahoru, domu]

Quartile: Difference between revisions

Content deleted Content added
Simplified unnecessarily complex or wrong descriptions of quartiles in the introductory section.
→‎Method 3: Clarified the method 3 description to avoid confusion.
Line 65:
==== Method 3 ====
 
# If there are even numbers of data points, then Method 3 starts off the same as Method 1 or Method 2 above and you can choose to include or not include the median as a new datapoint. If you choose to include the median as athe new datapoint, then proceed to the step 2 or 3 of Method 3below because you now have an odd number of datapoints. If you do not choose the median as the new data point, then continue the Method 1 or 2 where you have started.
# If there are (4''n''+1) data points, then the lower quartile is 25% of the ''n''th data value plus 75% of the (''n''+1)th data value; the upper quartile is 75% of the (3''n''+1)th data point plus 25% of the (3''n''+2)th data point.
# If there are (4''n''+3) data points, then the lower quartile is 75% of the (''n''+1)th data value plus 25% of the (''n''+2)th data value; the upper quartile is 25% of the (3''n''+2)th data point plus 75% of the (3''n''+3)th data point.
 
==== Method 4 ====
If we have an ordered dataset <math>x_1, x_2, ..., x_n</math>, then we can interpolate between data points to find the <math>p</math>th empirical [[quantile]] if <math>x_i</math> is in the <math>i/(n+1)</math> quantile. If we denote the integer part of a number <math>a</math> by <math>\lfloor a \rfloor</math>, then the empirical quantile function is given by,
 
<math>q(p/4) = x_{k} + \alpha(x_{k+1} - x_{k})</math>,