Unit 1: Descriptive Statistics, Measures of Central Tendency & Data Dispersion
Scales of measurement, weighted/geometric means, sample variance with Bessel's correction, moments, skewness, kurtosis, and box plot outlier detection algorithms
Artificial Intelligence is applied statistics implemented in software. Before training convolutional neural networks or regression estimators, an AI engineer must perform exploratory data analysis (EDA)βsummarizing distributions, detecting outliers, and checking feature variance. In the Second Year Semester 3 curriculum, Unit 1 establishes the mathematical grammar for data exploration. This chapter delivers mathematical proofs, step-by-step solved numerical exam questions, and the official autonomous curriculum answer keys.
1. Population vs. Sample & Measurement Scales
A population represents the entire universe of entities under investigation (e.g., all 10 million transactions in a bank). A sample is an unbiased representative subset drawn from that population (\(n \ll N\)).
Any statistical data feature falls into one of four hierarchical Stevens' Scales of Measurement:
π The 4 Measurement Scales (AI Feature Encoding)
- Nominal Scale: Pure categorical labels without inherent ranking or order (e.g., Gender, IP Protocol type, Image class label). Mathematical operations: Mode only. Encoded via One-Hot Encoding in ML pipelines.
- Ordinal Scale: Categorical attributes possessing a strict natural ranking or order, but where differences between ranks are unequal or non-quantifiable (e.g., Customer Rating: Low, Medium, High; Academic Grade). Mathematical operations: Median, Percentiles. Encoded via Ordinal Encoding.
- Interval Scale: Numerical measurements with meaningful, equal distances between intervals, but lacking a true, absolute zero (e.g., Temperature in Celsius/Fahrenheit, Calendar Year). Ratios are meaningless (40°C is not "twice as hot" as 20°C). Operations: Mean, Variance.
- Ratio Scale: Continuous numerical data with an absolute, physically meaningful zero point (e.g., Salary, Server Latency, Model Loss, Age). Ratios are valid (100ms is twice 50ms). Operations: Geometric Mean, Harmonic Mean, Coefficient of Variation.
2. Measures of Central Tendency
Central tendency identifies the single central value summarizing an entire distribution:
- Arithmetic Mean (\(\bar{x}\)): \(\bar{x} = \frac{\sum x_i}{n}\). Highly sensitive to extreme outlier values.
- Geometric Mean (\(GM\)): \(GM = \sqrt[n]{x_1 \cdot x_2 \cdots x_n}\). Essential for calculating average compound growth rates and normalizing metrics across different scales.
- Harmonic Mean (\(HM\)): \(HM = \frac{n}{\sum \frac{1}{x_i}}\). Used for rates and ratios (e.g., computing the \(F_1\text{-Score}\) as harmonic mean of Precision and Recall).
- Median (\(M\)): The 50th percentile dividing ordered data into two equal halves. Robust against extreme outliers. For grouped data:
\[ M = L + \left[ \frac{\frac{N}{2} - CF}{f} \right] \times h \] - Mode (\(Z\)): Most frequently occurring value. For grouped data:
\[ Z = L + \left[ \frac{f_1 - f_0}{2f_1 - f_0 - f_2} \right] \times h \] - Empirical Relationship: For moderately skewed unimodal distributions:
\[ \text{Mean} - \text{Mode} \approx 3 \times (\text{Mean} - \text{Median}) \]
3. Measures of Dispersion & Bessel's Correction
Dispersion quantifies the degree of scatter or spread of observations around the central mean:
For a sample, using denominator \(n\) systematically underestimates the true population variance (biased estimator). Bessel's Correction divides by degrees of freedom \(n-1\):
\[ s^2 = \frac{\sum_{i=1}^n (x_i - \bar{x})^2}{n - 1} \quad \implies \quad s = \sqrt{\frac{\sum (x_i - \bar{x})^2}{n - 1}} \]
Coefficient of Variation (\(CV\)): A dimensionless relative measure comparing dispersion across datasets with different units:
\[ CV = \frac{s}{\bar{x}} \times 100\% \]
4. Skewness, Kurtosis & Distribution Symmetry
π Higher-Order Statistical Moments
- Symmetric Distribution: \(\text{Mean} = \text{Median} = \text{Mode}\). Skewness \(= 0\). (Standard Normal curve).
- Positively (Right) Skewed: Long tail stretches to the right. \(\text{Mean} > \text{Median} > \text{Mode}\). (Income distributions, user website dwell time).
- Negatively (Left) Skewed: Long tail stretches to the left. \(\text{Mode} > \text{Median} > \text{Mean}\). (Exam scores with easy grading).
- Pearson's First Coefficient of Skewness: \(Sk_1 = \frac{\bar{x} - \text{Mode}}{s}\).
- Kurtosis (\(\beta_2\)): Quantifies "peakedness" and heavy-tail likelihood relative to the normal distribution:
- Mesokurtic (\(\beta_2 = 3\)): Normal distribution bell shape.
- Leptokurtic (\(\beta_2 > 3\)): Sharp central peak with heavy, fat tails (higher probability of extreme black-swan events in stock markets).
- Platykurtic (\(\beta_2 < 3\)): Flatter peak with thin tails.
5. Outlier Detection via Box-and-Whisker Plots (Tukey's IQR Rule)
In machine learning preprocessing, outliers skew gradient descent optimizations. John Tukey's Interquartile Range (IQR) rule establishes formal statistical bounds:
- Compute first quartile \(Q_1\) (25th percentile) and third quartile \(Q_3\) (75th percentile).
- Calculate interquartile range: \(IQR = Q_3 - Q_1\).
- Lower Inner Fence \(= Q_1 - 1.5 \times IQR\). Any observation below this threshold is flagged as a mild outlier.
- Upper Inner Fence \(= Q_3 + 1.5 \times IQR\). Any observation above this threshold is flagged as a mild outlier.
- Extreme fences utilize \(3.0 \times IQR\).
6. Solved Numerical Exam Problems
Problem 1: Given sample dataset: \(\{12, 18, 14, 15, 22, 19, 16, 20\}\). Calculate the sample mean, sample variance, standard deviation, and coefficient of variation.
Solution:
- \(n = 8\). Sum \(\sum x_i = 12 + 18 + 14 + 15 + 22 + 19 + 16 + 20 = 136\).
- Mean \(\bar{x} = \frac{136}{8} = \mathbf{17.0}\).
- Deviations from mean \((x_i - 17)\): \(-5, +1, -3, -2, +5, +2, -1, +3\).
- Squared deviations: \(25 + 1 + 9 + 4 + 25 + 4 + 1 + 9 = 78\).
- Sample Variance \(s^2 = \frac{78}{8 - 1} = \frac{78}{7} \approx \mathbf{11.143}\).
- Sample Standard Deviation \(s = \sqrt{11.143} \approx \mathbf{3.338}\).
- Coefficient of Variation: \(CV = \frac{3.338}{17.0} \times 100\% = \mathbf{19.64\%}\).
π₯ Printable Chapter Reference (PDF Supplement)
Prefer an offline physical copy for revision or exam night preparation? You can download our verified, printer-friendly PDF synthesis for Unit 1 below:
π Related Second Year Study Resources
- SY Semester 3 Academic Library β Full modules for Statistics, DSA, C++, and Graphics
- Statistics for AI: Probability Distributions Deep Dive β Binomial, Poisson, and Normal modeling
- Maths Unit 1: Probability Distributions β First-year foundation in random variables
- ETE Preparation Strategy β 10-day battle-tested revision roadmap for engineering exams