Numerical Ability

📊 Statistics (Mean, Median, Mode, Variance, SD)

Day 4 | ⏱️ Part of 2.5-Hour Stats & DI Block | TCS Interview Prep


📌 Subtopics

  • Mean: Arithmetic mean, weighted mean
  • Median: Middle value, for odd/even count
  • Mode: Most frequently occurring value
  • Variance: Measure of data spread
  • Standard Deviation: Square root of variance

📖 Comprehensive Notes

1. Mean (Arithmetic & Weighted)

The mean is the average of a set of numbers.

  • Arithmetic Mean: Mean (xˉ)=∑xin\text{Mean } (\bar{x}) = \frac{\sum x_i}{n}
  • Weighted Mean: Used when data values have different weights/frequencies: Weighted Mean=∑wixi∑wi\text{Weighted Mean} = \frac{\sum w_i x_i}{\sum w_i}

Example: Find the mean of 5,8,12,15,5, 8, 12, 15, and 2020. Mean=5+8+12+15+205=605=12\text{Mean} = \frac{5 + 8 + 12 + 15 + 20}{5} = \frac{60}{5} = 12.

2. Median

The median is the middle value in a sorted, ascending or descending list of numbers.

  • Steps to Calculate:
    1. Arrange the data in ascending order.
    2. If the number of terms (nn) is odd, the median is the (n+12)\left(\frac{n+1}{2}\right)-th term.
    3. If the number of terms (nn) is even, the median is the average of the (n2)\left(\frac{n}{2}\right)-th and (n2+1)\left(\frac{n}{2} + 1\right)-th terms.

Example: Find the median of 7,2,15,9,5,117, 2, 15, 9, 5, 11. Sorted order: 2,5,7,9,11,152, 5, 7, 9, 11, 15 (n=6n=6, even). Median =Average of 3rd and 4th terms=7+92=8= \text{Average of 3rd and 4th terms} = \frac{7 + 9}{2} = 8.

3. Mode

The mode is the value that appears most frequently in a data set.

  • A dataset can be unimodal (one mode), bimodal (two modes), multimodal (more than two modes), or have no mode (if all values appear once).
  • Empirical Relationship: For moderately skewed distributions: Mode=3×Median−2×Mean\text{Mode} = 3 \times \text{Median} - 2 \times \text{Mean}

Example: Find the mode of the dataset: 3,5,3,8,5,3,93, 5, 3, 8, 5, 3, 9. Frequencies: 33 appears three times, 55 appears twice, others once. Mode=3\text{Mode} = 3.

4. Variance

Variance measures how far a set of numbers is spread out from their average value.

  • Population Variance (σ2\sigma^2): σ2=∑(xi−xˉ)2n\sigma^2 = \frac{\sum (x_i - \bar{x})^2}{n}
  • Shortcut formula: σ2=∑xi2n−(xˉ)2\sigma^2 = \frac{\sum x_i^2}{n} - (\bar{x})^2

Example: Find the variance of the numbers 2,4,62, 4, 6. Mean (xˉ)=2+4+63=4\text{Mean } (\bar{x}) = \frac{2 + 4 + 6}{3} = 4. Deviations from mean: (2−4)=−2(2-4)=-2, (4−4)=0(4-4)=0, (6−4)=2(6-4)=2. Squared deviations: 4,0,44, 0, 4. Variance (σ2)=4+0+43=83≈2.67\text{Variance } (\sigma^2) = \frac{4 + 0 + 4}{3} = \frac{8}{3} \approx 2.67.

5. Standard Deviation

Standard Deviation (SD) is the square root of the variance. It is expressed in the same units as the original data, making it easier to interpret. Standard Deviation (σ)=Variance\text{Standard Deviation } (\sigma) = \sqrt{\text{Variance}}

  • A low standard deviation indicates that the data points tend to be close to the mean.
  • A high standard deviation indicates that the data points are spread out over a wider range.

🌐 Learning Resources

ResourceLink
IndiaBIX — Average (Mean)indiabix.com
GFG — Mean, Median, Modegeeksforgeeks.org
GFG — Variance & Standard Deviationgeeksforgeeks.org
PrepInsta — TCS Statisticsprepinsta.com
Khan Academy — Statisticskhanacademy.org
Math is Fun — Standard Deviationmathsisfun.com

PlatformLink
PrepInsta — Statistics Questionsprepinsta.com
GFG — Statistics Practicegeeksforgeeks.org

📝 Key Formulas

MEAN:
  Mean = Σxᵢ / n

MEDIAN:
  Sort the data first
  Odd n:  Median = (n+1)/2 th term
  Even n: Median = average of (n/2)th and (n/2+1)th terms

MODE:
  Most frequent value (a data set can have no mode, one mode, or multiple modes)

VARIANCE:
  σ² = Σ(xᵢ - x̄)² / n          [Population]
  s² = Σ(xᵢ - x̄)² / (n-1)      [Sample]

STANDARD DEVIATION:
  σ = √(Variance)

Shortcut for Variance:
  σ² = (Σxᵢ²/n) - (Σxᵢ/n)²