🔥Limited Offer: Get 50% OFFon AI & Full Stack Courses🔥
Back to Data Analytics Notes
Topic #17

Data Analysis Using Statistics

By the end of this lesson, you will be able to summarize a dataset using key descriptive statistics and interpret what these numbers reveal about central tendency and spread.

What it is

Descriptive statistics are numerical measures that summarize the main features of a collection of data. Unlike inferential statistics, which make predictions or generalizations about a larger population, descriptive stats simply describe what is already present in your sample. The mental model is "compression": you take thousands of raw data points and compress them into a few meaningful numbers. Key terms include Mean (average), Median (middle value), Mode (most frequent value), Variance (average squared deviation from the mean), and Standard Deviation (square root of variance, representing typical distance from the mean).

Why it matters

  • Quick Insight: Allows stakeholders to understand large datasets without reading every row.
  • Data Quality Check: Extreme values in mean vs. median can reveal outliers or data entry errors.
  • Baseline Comparison: Provides a reference point for tracking changes over time (e.g., monthly sales averages).
  • Feature Engineering: Statistical summaries often become input features for machine learning models.

Syntax or steps

To perform basic descriptive analysis manually or conceptually: 1. Clean Data: Remove nulls or handle missing values appropriately. 2. Calculate Central Tendency: Compute Mean, Median, and Mode. 3. Calculate Dispersion: Compute Range (Max - Min), Variance, and Standard Deviation. 4. Interpret: Compare Mean and Median to check for skewness; look at Standard Deviation to assess consistency.

Example

While this topic focuses on concepts, here is a minimal Python example using the standard library to calculate basic stats without external dependencies like Pandas.
import statistics

# Sample data: Daily website visitors
data = [105, 98, 112, 105, 120, 95, 105]

mean_val = statistics.mean(data)
median_val = statistics.median(data)
stdev_val = statistics.stdev(data) # Sample standard deviation

print(f"Mean: {mean_val}")
print(f"Median: {median_val}")
print(f"Std Dev: {stdev_val:.2f}")
Explanation: The code defines a list of integers. statistics.mean() sums all values and divides by the count. statistics.median() sorts the data and picks the middle number. statistics.stdev() calculates how much the values typically vary from the mean. In this output, if the Mean is significantly higher than the Median, the data is skewed right (likely due to high outliers).

Common mistakes

  • Ignoring Outliers: Using the Mean when the Median would be more representative because of extreme values (e.g., income data).
  • Misinterpreting Standard Deviation: Assuming a low SD means "good" quality; it only means "consistent," which could be consistently bad.
  • Confusing Population vs. Sample: Using the formula for population variance ($\sigma^2$) when analyzing a sample ($s^2$), leading to underestimation of variability.
  • Blindly Reporting Numbers: Presenting stats without context or units, making them meaningless to non-technical audiences.

When to use it

Use descriptive statistics for initial exploration and reporting. Use inferential statistics when you need to test hypotheses or predict future trends.
ScenarioBest ApproachReason
Summarizing last month's sales Descriptive Stats You have the full data for that period; no prediction needed.
Predicting next quarter's growth Inferential Stats You must generalize from past samples to future unknowns.
Detecting fraud anomalies Descriptive + Visual Identify values far outside the normal distribution range.

Practice

Guided Exercise: Given the dataset [2, 4, 4, 4, 5, 5, 7, 9], calculate the Mean and Median. Hint: Sum all numbers and divide by 8 for Mean. Sort and find the average of the two middle numbers for Median. Challenge: Why might the Mean and Median differ in real-world salary data? Write one sentence explaining the role of executives' salaries in this difference.

Quick check

Question: If a dataset has a Mean of 50 and a Median of 20, what does this suggest about the distribution? Answer: It suggests the data is positively skewed (skewed right), likely containing high-value outliers that pull the Mean up while the Median remains resistant to those extremes.

Summary

Descriptive statistics provide a concise snapshot of data through measures of center and spread. Mastering the distinction between Mean and Median allows analysts to choose the most accurate representation of "typical" values, especially in skewed distributions.

Want to go beyond the notes?

Join CodingNow 2.0's Data Analytics course — live mentorship, real projects, and 100% placement support.

Enroll Now — Free Demo Available

Data Analysis Using Statistics – FAQs

Quick answers about learning Data Analysis Using Statistics in Data Analytics.

This free note from CodingNow 2.0 explains Data Analysis Using Statistics in Data Analytics — concept, syntax and worked code examples you can copy, run and revise before interviews.
Yes. Every Data Analytics topic on CodingNow 2.0, including Data Analysis Using Statistics, is 100% free with no signup required.
With focused practice, most students grasp Data Analysis Using Statistics in 1–3 days from these notes; pairing it with CodingNow 2.0's mentor-led course takes you to job-ready depth faster.
Use the code examples in this note, then ask doubts for free on the CodingNow 2.0 Community (/community) — expert instructors answer within 24 hours.
WhatsApp
Call NowEnroll Now