Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Quartile
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Discrete distributions === For discrete distributions, there is no universal agreement on selecting the quartile values.<ref>{{cite journal |title=Sample quantiles in statistical packages|journal=American Statistician |date=November 1996 |volume=50 |issue=4 |pages=361β365 |first1=Rob J |last1=Hyndman |author1-link=Rob J. Hyndman |first2=Yanan |last2=Fan |url=http://robjhyndman.com/papers/quantiles/ |doi=10.2307/2684934|jstor=2684934}}</ref> ==== Method 1 ==== # Use the [[median]] to divide the ordered data set into two halves. The median becomes the second quartile. #* If there are an odd number of data points in the original ordered data set, '''do not include''' the median (the central value in the ordered list) in either half. #* If there are an even number of data points in the original ordered data set, split this data set exactly in half. # The lower quartile value is the median of the lower half of the data. The upper quartile value is the median of the upper half of the data. This rule is employed by the [[TI-83]] calculator [[boxplot]] and "1-Var Stats" functions. ==== Method 2 ==== # Use the median to divide the ordered data set into two halves. The median becomes the second quartile. #* If there are an odd number of data points in the original ordered data set, '''include''' the median (the central value in the ordered list) in both halves. #* If there are an even number of data points in the original ordered data set, split this data set exactly in half. # The lower quartile value is the median of the lower half of the data. The upper quartile value is the median of the upper half of the data. The values found by this method are also known as "[[John Tukey|Tukey]]'s hinges";<ref>{{Cite book|isbn=978-0-201-07616-5|title=Exploratory Data Analysis|last1=Tukey|first1=John Wilder|author-link=John Tukey|date=1977|publisher=Addison-Wesley Publishing Company |url-access=registration|url=https://archive.org/details/exploratorydataa00tuke_0}}</ref> see also [[midhinge]]. ==== Method 3 ==== # Use the median to divide the ordered data set into two halves. The median becomes the second quartile. #* If there are odd numbers of data points, then go to the next step. #* If there are even numbers of data points, then the Method 3 starts off the same as the Method 1 or the 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 the new datapoint, then proceed to the step 2 or 3 below 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>, <math>x_{k}</math> is the last data point in quartile ''p'', and <math>x_{k+1}</math> is the first data point in quartile ''p''+1. <math>\alpha</math> measures where the quartile falls between <math>x_{k}</math> and <math>x_{k+1}</math>. If <math>\alpha</math> = 0 then the quartile falls exactly on <math>x_{k}</math>. If <math>\alpha</math> = 0.5 then the quartile falls exactly half way between <math>x_{k}</math> and <math>x_{k+1}</math>. <math>q(p/4) = x_{k} + \alpha(x_{k+1} - x_{k})</math>, where <math>k = \lfloor p(n+1)/4 \rfloor</math> and <math>\alpha = p(n+1)/4 - \lfloor p(n+1)/4 \rfloor</math>.<ref name=":0" /> To find the first, second, and third quartiles of the dataset we would evaluate <math>q(0.25)</math>, <math>q(0.5)</math>, and <math>q(0.75)</math> respectively. ==== Example 1 ==== Ordered Data Set (of an odd number of data points): 6, 7, 15, 36, 39, '''40''', 41, 42, 43, 47, 49. The bold number (40) is the median splitting the data set into two halves with equal number of data points. {| class="wikitable" |- ! ! Method 1 ! Method 2 ! Method 3 !Method 4 |- ! ''Q''<sub>1</sub> | 15 | 25.5 | 20.25 |15 |- ! ''Q''<sub>2</sub> | 40 | 40 | 40 |40 |- ! ''Q''<sub>3</sub> | 43 | 42.5 | 42.75 |43 |} ==== Example 2 ==== Ordered Data Set (of an even number of data points): 7, 15, '''36, 39''', 40, 41. The bold numbers (36, 39) are used to calculate the median as their average. As there are an even number of data points, the first three methods all give the same results. (The Method 3 is executed such that the median is not chosen as a new data point and the Method 1 started.) {| class="wikitable" |- ! ! Method 1 ! Method 2 ! Method 3 !Method 4 |- ! ''Q''<sub>1</sub> | 15 | 15 | 15 |13 |- ! ''Q''<sub>2</sub> | 37.5 | 37.5 | 37.5 |37.5 |- ! ''Q''<sub>3</sub> | 40 | 40 | 40 |40.25 |}
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Quartile
(section)
Add topic