Unit I Β· Lecture 8 of 40 Β· B.Sc. Data Science, 1st Year, Semester II
xΜ = Ξ£xα΅’ / n
xΜ = Ξ£fα΅’xα΅’ / Ξ£fα΅’ | where xα΅’ = midpoint of iα΅Κ° class | Ξ£fα΅’ = N
xΜββ = (nβxΜβ + nβxΜβ) / (nβ + nβ) | xΜw = Ξ£wα΅’xα΅’ / Ξ£wα΅’
Sort data β Median = value of ((n+1)/2)α΅Κ° observation | If n even: average of (n/2)α΅Κ° and (n/2+1)α΅Κ°
Me = L + [(N/2 β CF) / f] Γ h | L = lower limit of median class, CF = cumulative freq before median class, f = freq of median class, h = class width
Ungrouped: Most frequent value | Grouped: Mo = L + [(fβ β fβ) / (2fβ β fβ β fβ)] Γ h
Mean β Mode β 3(Mean β Median) | Mode β 3Median β 2Mean
Qα΅’ = L + [(iN/4 β CF) / f] Γ h | Dβ±Ό = L + [(jN/10 β CF) / f] Γ h | Pβ = L + [(kN/100 β CF) / f] Γ h
Range = H β L | Coefficient of Range = (H β L) / (H + L)
QD = (Qβ β Qβ) / 2 | Coefficient of QD = (Qβ β Qβ) / (Qβ + Qβ)
MD = Ξ£|xα΅’ β A| / n | A = Mean, Median, or Mode | MD from Median is always minimum
ΟΒ² = Ξ£fα΅’(xα΅’ β xΜ)Β² / N | Ο = βΟΒ² | Shortcut: ΟΒ² = (Ξ£fα΅’xα΅’Β² / N) β xΜΒ²
ΟββΒ² = [nβ(ΟβΒ² + dβΒ²) + nβ(ΟβΒ² + dβΒ²)] / (nβ + nβ) | dα΅’ = xΜα΅’ β xΜββ
CV = (Ο / xΜ) Γ 100 | Lower CV β more consistent | Use to compare datasets with different units or scales
(a) Mean:
n = 10
Ξ£x = 12 + 15 + 18 + 18 + 20 + 22 + 25 + 28 + 30 + 35 = 223
xΜ = 223 / 10 = 22.3
(b) Median:
Data is already sorted. n = 10 (even).
Median = average of (n/2)α΅Κ° and (n/2 + 1)α΅Κ° values
= average of 5α΅Κ° and 6α΅Κ° values
= (20 + 22) / 2 = 21
(c) Mode:
18 appears twice; all other values appear once.
Mode = 18
Verification β Empirical Relation:
3Median β 2Mean = 3(21) β 2(22.3) = 63 β 44.6 = 18.4 β Mode (18) β
(Approximate β works best for moderately skewed data)
| Class | f | x (mid) | fx | CF |
|---|---|---|---|---|
| 0 β 10 | 5 | 5 | 25 | 5 |
| 10 β 20 | 8 | 15 | 120 | 13 |
| 20 β 30 | 12 | 25 | 300 | 25 |
| 30 β 40 | 10 | 35 | 350 | 35 |
| 40 β 50 | 5 | 45 | 225 | 40 |
| Total | 40 | 1220 |
Mean:
xΜ = Ξ£fx / N = 1220 / 40 = 30.5
Median:
N/2 = 40/2 = 20. CF just exceeding 20 is 25 β Median class: 20β30
L = 20, CF = 13, f = 12, h = 10
Me = L + [(N/2 β CF) / f] Γ h
= 20 + [(20 β 13) / 12] Γ 10
= 20 + (7/12) Γ 10
= 20 + 5.83 = 25.83
Mode:
Modal class = class with highest frequency = 20β30 (f = 12)
L = 20, fβ = 8 (freq of class before modal class)
fβ = 12 (freq of modal class), fβ = 10 (freq of class after), h = 10
Mo = L + [(fβ β fβ) / (2fβ β fβ β fβ)] Γ h
= 20 + [(12 β 8) / (2Γ12 β 8 β 10)] Γ 10
= 20 + [4 / (24 β 18)] Γ 10
= 20 + (4/6) Γ 10
= 20 + 6.67 = 26.67
Empirical Relation Check:
Mean = 30.5, Median = 25.83, Mode = 26.67
Mean β Mode β 3(Mean β Median)
30.5 β 26.67 β 3(30.5 β 25.83)
3.83 β 3(4.67) = 14.01 β (Does not hold well)
Alternative check: 3Median β 2Mean = 3(25.83) β 2(30.5) = 77.49 β 61 = 16.49 β 26.67
Note: The empirical relation is approximate and works best for moderately skewed, unimodal distributions. This distribution is somewhat irregular, so the approximation is poor. This is expected and acceptable.
Qβ (First Quartile):
iN/4 = 1Γ40/4 = 10. CF just exceeding 10 is 13 β class 10β20
L = 10, CF = 5, f = 8, h = 10
Qβ = 10 + [(10 β 5)/8] Γ 10 = 10 + 6.25 = 16.25
Qβ (Third Quartile):
iN/4 = 3Γ40/4 = 30. CF just exceeding 30 is 35 β class 30β40
L = 30, CF = 25, f = 10, h = 10
Qβ = 30 + [(30 β 25)/10] Γ 10 = 30 + 5.0 = 35.0
Dβ (7th Decile):
jN/10 = 7Γ40/10 = 28. CF just exceeding 28 is 35 β class 30β40
L = 30, CF = 25, f = 10, h = 10
Dβ = 30 + [(28 β 25)/10] Γ 10 = 30 + 3.0 = 33.0
Pββ (90th Percentile):
kN/100 = 90Γ40/100 = 36. CF just exceeding 36 is 40 β class 40β50
L = 40, CF = 35, f = 5, h = 10
Pββ = 40 + [(36 β 35)/5] Γ 10 = 40 + 2.0 = 42.0
Interpretation: 25% of observations fall below 16.25. 75% fall below 35.0. 70% fall below 33.0. 90% fall below 42.0.
Mean: xΜ = (8+12+15+18+20+22+25+30)/8 = 150/8 = 18.75
Range:
Range = H β L = 30 β 8 = 22
Coefficient of Range = (30β8)/(30+8) = 22/38 = 0.579
Quartile Deviation:
n = 8. Qβ = value of (9/4)α΅Κ° = 2.25α΅Κ° item
= 12 + 0.25(15β12) = 12.75
Qβ = value of (27/4)α΅Κ° = 6.75α΅Κ° item
= 22 + 0.75(25β22) = 24.25
QD = (24.25 β 12.75)/2 = 5.75
Coefficient of QD = (24.25β12.75)/(24.25+12.75) = 11.5/37 = 0.311
Mean Deviation from Mean:
|xα΅’ β 18.75|: 10.75, 6.75, 3.75, 0.75, 1.25, 3.25, 6.25, 11.25
Ξ£|deviations| = 44.0
MD = 44/8 = 5.5
Interpretation: The mean deviation (5.5) is less than the SD (computed in Problem 6), as SD penalises larger deviations more heavily due to squaring.
| Class | f | x | fx | fxΒ² |
|---|---|---|---|---|
| 0 β 10 | 5 | 5 | 25 | 125 |
| 10 β 20 | 8 | 15 | 120 | 1800 |
| 20 β 30 | 12 | 25 | 300 | 7500 |
| 30 β 40 | 10 | 35 | 350 | 12250 |
| 40 β 50 | 5 | 45 | 225 | 10125 |
| Total | 40 | 1020 | 31800 |
ΟΒ² = (Ξ£fxΒ² / N) β xΜΒ²
xΜ = 1020/40 = 25.5
ΟΒ² = 31800/40 β (25.5)Β²
= 795 β 650.25
= 144.75
Ο = β144.75 = 12.03
Verification: ΟΒ² = 144.75 β₯ 0 β (A negative variance is impossible and would signal an arithmetic error.)
Combined Mean:
xΜββ = (nβxΜβ + nβxΜβ) / (nβ + nβ)
= (30Γ65 + 50Γ72) / (30 + 50)
= (1950 + 3600) / 80
= 5550 / 80 = 69.375
Combined Variance:
dβ = xΜβ β xΜββ = 65 β 69.375 = β4.375
dβ = xΜβ β xΜββ = 72 β 69.375 = 2.625
ΟββΒ² = [nβ(ΟβΒ² + dβΒ²) + nβ(ΟβΒ² + dβΒ²)] / (nβ + nβ)
= [30(64 + 19.14) + 50(100 + 6.89)] / 80
= [30(83.14) + 50(106.89)] / 80
= [2494.2 + 5344.5] / 80
= 7838.7 / 80 = 97.98
Οββ = β97.98 = 9.90
Interpretation: The combined SD (9.90) is larger than either individual SD (8 or 10). This is because the two sections have different means, adding between-group variability to the total spread.
CV for A: (Ο / xΜ) Γ 100 = (12/45) Γ 100 = 26.67%
CV for B: (Ο / xΜ) Γ 100 = (15/55) Γ 100 = 27.27%
Since CV_A (26.67%) < CV_B (27.27%),
Batsman A is more consistent.
Interpretation:
Consistency: A is slightly more consistent (lower CV), meaning his scores vary less proportionally around his mean.
Better scorer: B has a higher average (55 vs 45), so B is the better run-scorer overall.
Key insight: "More consistent" and "better" are different questions. Consistency (CV) measures predictability; mean measures performance level. A coach might prefer A for reliability in a chase, but B for overall run contribution.
1. Wrong Ξ£fx β always verify by adding twice or using a calculator.
2. Negative variance (impossible!) β signals a computation error in Ξ£fxΒ² or Ξ£fx.
3. Forgetting to square the mean in the shortcut formula: ΟΒ² = (Ξ£fxΒ²/N) β xΜΒ², not Ξ£fxΒ²/N alone.
4. Using N vs Nβ1 β in this course, use N (population SD). Some textbooks use Nβ1 (sample SD).
1. Using Mean for skewed data with outliers β Median is more appropriate.
2. Confusing QD with IQR β QD = IQR/2, they are not the same.
3. Thinking SD = 0 means "no data" β it means all values are identical.
4. Comparing SDs of datasets with different means or units β use CV instead.
1. Using class boundaries instead of midpoints for fx β always use midpoints.
2. Wrong cumulative frequency β add frequencies cumulatively, don't skip.
3. Identifying wrong median/modal class β check which CF first exceeds N/2.
4. Forgetting class width h in the interpolation formula.
For grouped data, build a table with columns: Class, f, x, fx, fxΒ², CF before computing anything. This prevents most errors.
Check: Ξ£f = N. Ξ£fx = xΜ Γ N. ΟΒ² β₯ 0. These catches prevent most arithmetic errors.
Don't just give xΜ = 65. Say: "The average marks are 65." Interpretation earns marks.
Symmetric β Mean+SD. Skewed β Median+QD. Comparing datasets β CV. Open-ended β Median.
1. Compute mean, median, and mode from a grouped frequency distribution. (Very common)
2. Find quartiles, deciles, or percentiles from grouped data. (Common)
3. Compute variance and SD using the shortcut method. (Very common)
4. Compare two datasets using CV and state which is more consistent. (Almost every exam)
5. Compute combined mean and/or combined SD for two groups. (Common)
6. Verify the empirical relation Mean β Mode β 3(Mean β Median). (Occasional)
7. Compute Range, QD, and MD from raw data. (Occasional)
8. Theory: "When is Median preferred over Mean?" or "Properties of a good average." (Theory question)
Q1: Which measure of central tendency uses ALL data values?
Q2: For a positively skewed distribution:
Q3: The median class in a grouped distribution is identified by:
Q4: Variance can be:
Q5: If every value in a dataset is multiplied by 3, the new SD is:
Q6: Mean Deviation from _____ is always minimum:
Q7: CV is used to compare variability when datasets have:
Q8: Quartile Deviation (QD) equals:
Q9: For open-end classes (e.g., "60 and above"), which measure can still be computed?
Q10: If ΟΒ² = 0, then:
Q11: The shortcut formula for variance is:
Q12: Which is NOT a property of a good measure of central tendency?
Arithmetic Mean
Ungrouped & Grouped
Combined & Weighted Mean
Median & Mode
Ungrouped & Grouped
Empirical Relation
Quartiles, Deciles
Percentiles
Positional Measures
Range & QD
Mean Deviation
Measures of Dispersion
Variance & SD
Combined SD
Coefficient of Variation
You have completed Unit I β Descriptive Statistics.
The concepts of mean, variance, and SD from this unit appear in every subsequent unit β probability distributions (Unit III), correlation and regression (Unit IV), and beyond. Master these formulas and you'll find the rest of the course much smoother.
Next up: Unit II β Probability!
BDS113 Introduction to Statistics Β· B.Sc. Data Science, Semester II Β· Unit I Review Complete