# Kuartil

Luncat ka: pituduh, sungsi

Dina statistik déskriptif, kuartil nyaeta hiji tina tilu nilai nu ngabagi susunan data kana opat bagean.

Mangka:

• kuartil kahiji = kuartil handap = motong data sahandapeun 25% = 25th persentil
• kuartil kadua = median = motong satengahna data = 50th persentil
• kuartil katilu = upper quartile = motong data 25% kaluhur, atawa handapeun 75% = 75th percentile

Beda antara kuartil luhur jeung handap disebut interquartile range.

Ilaharna penting keur interpolasi antara nilai keur ngalengkepan ieu, siga conto di handap ieu.

i    x[i]
1    102
2    105
------------- kuartil kahiji, Q1 = (105+106)/2 = 105.5
3    106
4    109
------------- kuartil kadua, Q2 = (109+110)/2 = 109.5
5    110
6    112
------------- kuartil katilu, Q3 = (112+115)/2 = 113.5
7    115
8    118

Nyokot nilai mean sisi sejen tina kuartil ngarupakeun kaputusan teu pasti: dina conto di luhur, nilai kuartil kudu aya dina rentang [105,106], [109,110] and [112, 115].

If the sample size is not a multiple of four, some of the quartiles may be numbers in the original data set, as in this example:

i    x[i]
1    102
2    105 -- Q[1] = 105
3    106
------------- Q[2] = 107.5
4    109
5    110 -- Q[3] = 110
6    112

In both of the above cases, the first and third quartiles can be taken to be the median values of the lower and upper halves of the data, respectively. However, there is more than one school of thought on how to apply this definition when the overall median is one of the original data values. The next two examples are illustrations of some of the rules of thumb which have been adopted; neither always produces correct results, and it would be better to use a precise formulation as shown later.

One may include the median in both "halves" of the data:

i    x[i]
1    102
2    105
3    106 -- Q1 = 106
4    109
5    110
)- Q2 = 110 (note line 5 has been duplicated
5    110              to illustrate the point)
6    112
7    115 -- Q3 = 115
8    118
9    120

Or not include the median in either "half":

i    x[i]
1    102
2    105
------------- Q1 = 105.5
3    106
4    109
5    110 -- Q2 = 110
6    112
7    115
------------- Q3 = 116.5
8    118
9    120

More precise mathematical formulations are possible: the quartiles of the distribution of a random variable X can be defined as the values x such that:

$P(X\leq x)\geq \frac{1}{4} \ and \ P(X\geq x)\geq \frac{3}{4};$
$P(X\leq x)\geq \frac{1}{2} \ and \ P(X\geq x)\geq \frac{1}{2};\ \rm{ or }$
$P(X\leq x)\geq \frac{3}{4} \ and \ P(X\geq x)\geq \frac{1}{4}.$

With these definitions the quartiles in the last example are 106, 110 and 115:

P(X ≤ 106) = 1/3 and P(X ≥ 106) = 7/9;
P(X ≤ 110) = 5/9 and P(X ≥ 110) = 5/9; and
P(X ≤ 115) = 7/9 and P(X ≥ 115) = 1/3.