├── Statistics                                      
│   ├── Descriptive Statistics                      
│   │   ├── Mean, Median, Mode                      
│   │   ├── Standard Deviation                      
│   │   └── Percentiles / Quartiles                 
│   ├── Inferential Statistics                      
│   │   ├── Hypothesis Testing                      
│   │   ├── p-Value                                 
│   │   ├── Confidence Intervals                    
│   │   └── A/B Testing                             
│   ├── Correlation vs Causation                    
│   └── Sampling Methods                            
│       ├── Random Sampling                         
│       ├── Stratified Sampling                     
│       └── Bootstrap                               

Statistics exists to answer two fundamental questions about data:

  1. “What do we have?” → Summarizing or describing data we already collected.
  2. “What can we infer?” → Making generalizations or predictions about a larger population from a sample.

Descriptive Statistics

Goal: Summarize and describe the main features of a dataset. It doesn’t generalize or predict it only describes what is actually observed.

You surveyed 100 people and found:

  • Average height = 170 cm
  • Minimum = 150 cm
  • Maximum = 190 cm
  • 60% are male

These numbers describe your sample they do not claim anything about all people in the world.

CategoryExamplesPurpose
Measures of Central TendencyMean, Median, ModeShow the center or typical value
Measures of DispersionRange, Variance, Standard DeviationShow how spread out data is
Graphical ToolsHistograms, Pie Charts, Box PlotsVisualize data distribution
Measures of ShapeSkewness, KurtosisDescribe asymmetry or peakedness

Inferential Statistics

Goal: Make conclusions or predictions about a population based on a sample.

Because we can’t measure everyone, we collect a sample, compute statistics on it, and infer population-level patterns while accounting for uncertainty.

You measure the average height of 100 people in a city (170 cm) and infer that the average height of the whole city’s population is likely close to that but not exact.

You quantify that uncertainty using confidence intervals or hypothesis tests.

CategoryExamplesPurpose
EstimationConfidence Intervals, Point EstimatesEstimate population parameters
Hypothesis Testingt-test, chi-square, ANOVATest if observed effects are significant
Regression & CorrelationLinear regression, correlation coefficientModel relationships between variables
Probability ModelsNormal distribution, binomial, PoissonModel random variation

outlier

An outlier is a data point that is inconsistent with the overall pattern of the dataset.

Heights of adults (in cm):
160, 162, 165, 170, 172, 168, 450

Here, 450 cm doesn’t fit the pattern it’s likely an error or a completely different kind of observation.

So:

  • Normal variation: within the expected range.
  • Outlier: outside the expected range.

to Detect Outliers

There’s no single universal definition, but several statistical rules of thumb are widely used.

(a) Z-Score Method (Standard Deviation Rule)

If data is roughly normal (bell-shaped):

where

  • ( x ) = data point
  • ( \mu ) = mean
  • ( \sigma ) = standard deviation

If |Z| > 3 → it’s far from the mean by more than 3 standard deviations → potential outlier.

(Why 3?) In a normal distribution, 99.7% of points fall within ±3σ. So anything beyond that is extremely rare.

(b) IQR Method (Boxplot Rule)

Works well for non-normal data.

  1. Find Q1 (25th percentile) and Q3 (75th percentile).
  2. Compute IQR = Q3 – Q1.
  3. Define limits:
  4. Any point outside this range is a potential outlier.

(Why 1.5×IQR?) It empirically captures ~99% of central data for many typical distributions, while flagging extremes.

(c) Visual Methods

  • Box Plot: Outliers appear as dots outside whiskers.
  • Scatter Plot: Useful for multivariate outliers.
  • Histogram: Can show gaps or tails where outliers live.

Five number summary

Every dataset can be summarized along two main questions:

  1. Where are the values located? (center, extremes)
  2. How are they spread out? (variation, range)

The five-number summary is a compact way to describe both using five key points that divide and bound your data.

It’s especially useful for non-normal, skewed, or small datasets, where mean and standard deviation can be misleading.

PositionSymbolNameDescription
1MinMinimumSmallest value in dataset
2Q1First Quartile (25th percentile)Value below which 25% of data lies
3Median (Q2)Second Quartile (50th percentile)Middle value (splits data in half)
4Q3Third Quartile (75th percentile)Value below which 75% of data lies
5MaxMaximumLargest value in dataset

Let’s take a simple dataset: Data: [2, 4, 5, 7, 8, 10, 12, 13, 14, 18]

Step 1 — Order the data: (Already sorted)

Step 2 — Find the median (Q2): Middle value between 8 and 10 → (8 + 10)/2 = 9.

Step 3 — Split into halves:

  • Lower half: [2, 4, 5, 7, 8]
  • Upper half: [10, 12, 13, 14, 18]

Step 4 — Find Q1 (median of lower half): = 5

Step 5 — Find Q3 (median of upper half): = 13

Step 6 — Min = 2, Max = 18

Five-number summary: [2, 5, 9, 13, 18]

ValueWhat It RepresentsWhat It Tells You
MinLower boundSmallest observed value
Q1Lower quartileStart of central 50%
Median (Q2)CenterCentral location
Q3Upper quartileEnd of central 50%
MaxUpper boundLargest observed value

The middle 50% of the data lies between Q1 and Q3. The spread of that zone is called the IQR (Interquartile Range):

The five-number summary directly generates a box plot, which visualizes:

Min  Q1  Median  Q3  Max
 |----|=====|====|----|
  • The box spans from Q1 to Q3 (the interquartile range).
  • The line inside the box marks the median.
  • The whiskers extend to Min and Max (or sometimes to limits before outliers).

So, the five-number summary is the numerical backbone of the box plot.