📊 Descriptive Statistics Explained Simply | Mean, Median & Std Dev

Part 3: Statistics for Data Science Series

Goal: Learn how to summarize data effectively before analysis

When working with data, the first and most important question is:

👉 “What does this data look like?”

This is where Descriptive Statistics comes in.

Descriptive statistics help us summarize, understand, and interpret data using simple numerical measures. Before any machine learning, prediction, or dashboarding — descriptive stats are your foundation.

“Descriptive Statistics Explained Simply” on datahark.in


📌 What is Descriptive Statistics?

Descriptive statistics are techniques used to summarize and describe the main features of a dataset.

They help answer questions like:

  • What is the average value?
  • How spread out is the data?
  • Are there extreme values?
  • Where does most of the data lie?

👉 Unlike inferential statistics, descriptive statistics do not make predictions — they explain what already exists.


📈 Measures of Central Tendency (Finding the “Center”)

1️⃣ Mean (Average)

Definition:
The sum of all values divided by the total number of values.

Formula:
Mean = (Sum of values) / (Number of values)

📌 Real-Life Example:
Average daily sales of an e-commerce store over 5 days:
₹10k, ₹12k, ₹11k, ₹13k, ₹14k

Mean = ₹12k

🟢 Best used when data has no extreme outliers


2️⃣ Median (Middle Value)

Definition:
The middle value when data is sorted.

📌 Example:
Monthly salaries in a startup:
₹25k, ₹30k, ₹35k, ₹40k, ₹5,00,000

Median = ₹35k

🟢 Best used when data contains outliers


3️⃣ Mode (Most Frequent Value)

Definition:
The value that appears most often.

📌 Example:
Most sold product sizes:
M, M, L, S, M, L

Mode = M

🟢 Useful for categorical data


📊 Measures of Dispersion (Understanding Spread)

4️⃣ Range

Definition:
Difference between the maximum and minimum values.

📌 Example:
City temperature range:
Min = 20°C, Max = 45°C

Range = 25°C

⚠️ Highly sensitive to outliers


5️⃣ Variance

Definition:
Average of squared differences from the mean.

  • Low variance → values are close together
  • High variance → values are spread out

🟢 Widely used in finance and risk analysis


6️⃣ Standard Deviation

Definition:
Square root of variance.

📌 Example:
Stocks with high standard deviation are more volatile.

🟢 Most important dispersion metric
🟢 Same unit as original data


📐 Percentiles & Interquartile Range (IQR)

7️⃣ Percentiles

Definition:
A percentile shows the value below which a certain percentage of data falls.

📌 Example:
90th percentile salary = ₹20 LPA
You earn more than 90% of employees.


8️⃣ Interquartile Range (IQR)

Formula:
IQR = Q3 − Q1

Why it matters:

  • Identifies outliers
  • Used in box plots
  • Robust against extreme values

📌 Real Scenario:
Detecting abnormal insurance claims or fraud transactions.


🧠 Summary Statistics in Python (Hands-On)

Pandas is the most widely used Python library for descriptive statistics.

🔹 Sample Dataset

import pandas as pd

data = {
    "Sales": [12000, 15000, 10000, 18000, 16000],
    "Profit": [2000, 3000, 1500, 4000, 3500]
}

df = pd.DataFrame(data)

🔹 Using Pandas .describe()

df.describe()

.describe() instantly provides:

  • Count
  • Mean
  • Standard Deviation
  • Minimum & Maximum
  • 25%, 50% (Median), 75% percentiles

🟢 Used in almost every real-world data analysis project


🔹 Individual Statistics in Pandas

df.mean()
df.median()
df.std()
df.var()
df.quantile(0.75)

🏢 Real-World Applications

📌 Business

  • Average revenue per customer
  • Monthly sales analysis
  • Customer behavior tracking

📌 Finance

  • Stock volatility measurement
  • Risk evaluation
  • Portfolio performance

📌 Healthcare

  • Patient recovery analysis
  • Hospital stay durations
  • Disease statistics

🚀 Key Takeaways

  • Descriptive statistics summarize data
  • Mean, median, mode explain central tendency
  • Standard deviation explains variability
  • Percentiles & IQR handle outliers
  • Pandas .describe() is essential for EDA

🔜 What’s Next?

Part 4: Data Visualization for Statistics

  • Histograms
  • Box plots
  • Bar charts
  • Python visualizations

Statistics isn’t hard — it’s just misunderstood. Keep learning! 🚀

❓ Frequently Asked Questions (FAQ)

What is descriptive statistics?

Descriptive statistics is a branch of statistics that summarizes and describes the main characteristics of a dataset using measures like mean, median, mode, variance, and standard deviation.

Why is descriptive statistics important in data science?

Descriptive statistics helps data scientists understand data distribution, identify patterns, detect outliers, and prepare datasets for further analysis and machine learning models.

What is the difference between mean and median?

The mean is the average of all values, while the median is the middle value when data is sorted. Median is more reliable when the dataset contains outliers.

When should I use standard deviation?

Standard deviation is used to measure how spread out values are from the mean. It is commonly used in finance, business analytics, and risk assessment.

What is Pandas describe() used for?

The describe() function in Pandas provides a quick summary of key descriptive statistics including count, mean, standard deviation, minimum, maximum, and percentiles.

Is descriptive statistics enough for data analysis?

Descriptive statistics is the first step in data analysis. For predictions and conclusions about future data, inferential statistics and machine learning techniques are required.

Post a Comment

0 Comments