π Example
Find Qβ, Qβ, Qβ for: 12, 18, 22, 25, 28, 31, 35, 38, 42, 48, 55
Unit II Β· Lectures 13β14 of 40 Β· B.Sc. Data Science, 1st Year, Semester II
Partition values (also called quantiles or fractiles) are values that divide an ordered dataset into equal parts. They are positional measures. The median is itself a partition value β it divides data into two equal halves.
Imagine a rope of length 100 cm. You place marks at specific points to cut it into equal pieces. 1 cut β median. 3 cuts β quartiles. 9 cuts β deciles. 99 cuts β percentiles.
Select which partition values to display:
Quartiles are values that divide an ordered dataset into four equal parts. There are three quartiles:
β’ Qβ (First / Lower Quartile): 25% below. Position = N/4.
β’ Qβ (Second Quartile / Median): 50% below. Position = N/2. Qβ = Median.
β’ Qβ (Third / Upper Quartile): 75% below. Position = 3N/4.
Qβ separates the first quarter. Qβ (median) splits the halves. Qβ separates the last quarter. Between Qβ and Qβ lies the middle 50% of data.
Click "Show Quartiles" to see how Qβ, Qβ, Qβ divide 20 data points into four groups:
Find Qβ, Qβ, Qβ for: 12, 18, 22, 25, 28, 31, 35, 38, 42, 48, 55
n = 11. Data is ordered.
Qβ = position (11+1)/4 = 3rd value = 22
Qβ = position (11+1)/2 = 6th value = 31 (= Median)
Qβ = position 3(11+1)/4 = 9th value = 42
IQR = Qβ β Qβ = 42 β 22 = 20
β’ 25% below 22 (Qβ) Β· 50% below 31 (Qβ) Β· 75% below 42 (Qβ)
β’ The middle 50% lies between 22 and 42 (IQR = 20)
Click "Calculate" to watch Qβ, Qβ, Qβ being identified position by position:
Same pattern as the median formula β only the position changes.
Qβ = L + [(2N/4 β CF)/f] Γ h = L + [(N/2 β CF)/f] Γ h β identical to the median formula. Qβ = Median always.
Find Qβ, Qβ, Qβ:
| Class | 0β10 | 10β20 | 20β30 | 30β40 | 40β50 | 50β60 |
|---|---|---|---|---|---|---|
| f | 5 | 8 | 12 | 15 | 7 | 3 |
N = 50. CF: 5, 13, 25, 40, 47, 50.
Qβ (k=1): N/4 = 12.5. CF first β₯ 12.5 at 10β20 (CF=13).
L=10, CF(before)=5, f=8, h=10
Qβ = 10 + [(12.5β5)/8] Γ 10 = 10 + 9.375 = 19.375
Qβ (k=2): N/2 = 25. CF first β₯ 25 at 20β30 (CF=25).
L=20, CF(before)=13, f=12, h=10
Qβ = 20 + [(25β13)/12] Γ 10 = 20 + 10 = 30
Qβ (k=3): 3N/4 = 37.5. CF first β₯ 37.5 at 30β40 (CF=40).
L=30, CF(before)=25, f=15, h=10
Qβ = 30 + [(37.5β25)/15] Γ 10 = 30 + 8.33 = 38.33
IQR = 38.33 β 19.375 = 18.96
Qβ = 19.375, Qβ = 38.33
Q.D. = (38.33 β 19.375) / 2 = 9.48
C.Q.D. = 18.955 / 57.705 = 0.328
β Lecture 14 β
Deciles divide data into 10 equal parts. Nine deciles: DββDβ. Dβ has 10k% below it.
β’ Dβ β 10% below
β’ Dβ
β 50% below β Dβ
= Median = Qβ
β’ Dβ β 90% below
Use: "Top 10% earners" starts at Dβ. "Below 3rd decile" means below Dβ.
Data: 15, 22, 28, 33, 38, 42, 47, 53, 60, 68 (n=10)
Dβ = position 3(11)/10 = 3.3rd
= 28 + 0.3(33β28) = 28 + 1.5 = 29.5
Dβ = position 7(11)/10 = 7.7th
= 47 + 0.7(53β47) = 47 + 4.2 = 51.2
| Class | 10β20 | 20β30 | 30β40 | 40β50 | 50β60 |
|---|---|---|---|---|---|
| f | 6 | 10 | 14 | 12 | 8 |
N=50. kN/10 = 15. CF: 6, 16, 30, 42, 50.
CF first β₯ 15 at 20β30 (CF=16).
L=20, CF(before)=6, f=10, h=10
Dβ = 20 + [(15β6)/10]Γ10 = 20 + 9 = 29
Percentiles divide data into 100 equal parts. 99 percentiles: PββPββ. Pβ has k% below it. Most fine-grained partition values.
β’ 99th percentile in exams β scored better than 99%
β’ Growth charts: child at 75th percentile is taller than 75% of peers
β’ Outlier detection: values below Pβ or above Pββ are unusual
β’ Poverty lines: below Pββ might be "below poverty line"
Find Pββ , Pβ β, Pββ :
| Class | 0β10 | 10β20 | 20β30 | 30β40 | 40β50 | 50β60 |
|---|---|---|---|---|---|---|
| f | 5 | 8 | 12 | 15 | 7 | 3 |
N=50. CF: 5, 13, 25, 40, 47, 50.
Pββ
: kN/100 = 12.5 β same as Qβ β 19.375
Pβ
β: kN/100 = 25 β same as Qβ β 30
Pββ
: kN/100 = 37.5 β same as Qβ β 38.33
| % Below | Quartile | Decile | Percentile |
|---|---|---|---|
| 10% | β | Dβ | Pββ |
| 25% | Qβ | Dβ | Pββ |
| 50% | Qβ (Median) | Dβ | Pβ β |
| 75% | Qβ | Dβ | Pββ |
| 90% | β | Dβ | Pββ |
| Feature | Quartiles | Deciles | Percentiles |
|---|---|---|---|
| Parts | 4 equal | 10 equal | 100 equal |
| Count | 3 (Qβ,Qβ,Qβ) | 9 (DββDβ) | 99 (PββPββ) |
| Ungrouped | k(n+1)/4 | k(n+1)/10 | k(n+1)/100 |
| Grouped | L+[(kN/4βCF)/f]Γh | L+[(kN/10βCF)/f]Γh | L+[(kN/100βCF)/f]Γh |
| Median link | Qβ = Median | Dβ = Median | Pβ β = Median |
| Common use | Box plots, IQR | Income analysis | Exam ranks, growth charts |
A box plot visualises data using five key values: Min, Qβ, Median, Qβ, Max. One of the most powerful EDA tools β built entirely on quartiles.
Select type, enter k, and see the position formula:
Q1: Qβ is the same as:
Q2: 75% of observations lie below:
Q3: Dβ equals:
Q4: Quartile Deviation =:
Q5: Pββ is equivalent to:
Q6: For n=20, the position of Dβ is:
Q7: A box plot uses:
Q8: IQR represents:
Q9: "99th percentile" means:
Q10: The general formula for all partition values in grouped data is:
1. Find Qβ, Qβ, Qβ, IQR for: 14, 22, 28, 33, 38, 42, 48, 55, 62, 70, 78.
2. Find Qβ and Qβ from grouped data and compute Q.D. and C.Q.D.:
| Class | 10β20 | 20β30 | 30β40 | 40β50 | 50β60 | 60β70 |
|---|---|---|---|---|---|---|
| f | 6 | 10 | 14 | 18 | 8 | 4 |
Questions? Let's discuss!
Lecture 15: Unit II Review & Problem-Solving Session
Then: Unit III β Measures of Dispersion, Skewness & Kurtosis
Unit II Β· Lectures 13β14 Β· BDS113 Introduction to Statistics Β· B.Sc. Data Science, Semester II