SynfraCore
Synfracore
Start Learning
Navigation

Academies

Platform

RoadmapsLabsCertificationsInterviewPYQsAI AssistantCareer
Start Learning Free Learning Roadmaps

Statistics for Analysts — Fundamentals

Core concepts and commands — hands-on from the start

📄
Last updated Dec 2026
Expert Content

Statistics for Analysts — Fundamentals

Mean, Median, and Mode

One-line idea: The mean (average) can be dragged far away from "what's typical" by just one extreme value — the median can't, which is why salary and price data almost always gets reported as a median.

Everyday comparison: If six people in a room earn ₹25,000-₹38,000 a month and one CEO walks in earning ₹1,20,000, the average salary in the room jumps to a number nobody but the CEO actually earns. The median — the middle value when everyone's sorted in a line — barely moves, because it only cares about who's in the middle of the line, not how far the outlier at the end is from everyone else.

Worked example: Monthly salaries (₹ thousands) for 7 people at a small firm: 25, 28, 30, 32, 35, 38, 120.

•Mean: (25+28+30+32+35+38+120) / 7 = 44 (₹ thousands) — i.e. ₹44,000.
•Median: sort the 7 values — 25, 28, 30, 32, 35, 38, 120 — and take the middle one (the 4th): 32 (₹ thousands) — i.e. ₹32,000.

The mean says "typical pay here is ₹44,000." Six of the seven people earn less than that. The median's ₹32,000 is a far more honest answer to "what does a typical person here earn?" — this is exactly why salary surveys, house prices, and income data are reported as medians, not means.

Mode is simply the most frequent value — useful for categorical or discrete data, less useful for continuous data like salary where every value might be unique. Example: shoe sizes sold in a day — 7, 8, 8, 9, 9, 9, 10 — have a mode of 9 (it appears 3 times, more than any other size).

Excel/Sheets:        =AVERAGE(A2:A8)      =MEDIAN(A2:A8)      =MODE.SNGL(A2:A8)
python
import statistics
salaries = [25, 28, 30, 32, 35, 38, 120]
print(statistics.mean(salaries))     # 44.0
print(statistics.median(salaries))   # 32

Common mistake + fix: Reporting the mean for anything with a realistic chance of outliers (salary, house prices, deal size) without checking the median too. Fix: whenever one number could be far from the rest, pull both — if they're close, either is fine; if they're far apart, lead with the median and say why.

Memory line: Mean gets pulled by outliers. Median doesn't. When they disagree, the median is usually the more honest "typical."

Range, IQR, and Why IQR Is the Better Outlier Filter

One-line idea: Range (max − min) is wrecked by a single extreme value, the same way the mean is — the interquartile range (IQR) ignores the extremes entirely and only looks at where the "middle half" of the data sits.

Everyday comparison: Range is like judging a cricket team's consistency by its single highest and single lowest score all season — one freak innings in either direction ruins the picture. IQR is like only looking at the middle 50% of innings, ignoring both the best and worst, to see how consistent the "normal" game actually is.

Worked example: Using the same salary data (25, 28, 30, 32, 35, 38, 120 — ₹ thousands):

•Q1 (25th percentile): 29 (₹ thousands) — i.e. ₹29,000
•Q3 (75th percentile): 36.5 (₹ thousands) — i.e. ₹36,500
•IQR = Q3 − Q1: 7.5 (₹ thousands) — i.e. ₹7,500

The range here is 120−25 = ₹95,000 — almost entirely driven by the one ₹1,20,000 outlier. The IQR of ₹7,500 describes the other six people far better: most of them are within ₹7,500 of each other.

Excel/Sheets:  =QUARTILE.INC(A2:A8,1)   =QUARTILE.INC(A2:A8,3)   =QUARTILE.INC(A2:A8,3)-QUARTILE.INC(A2:A8,1)
python
import numpy as np
salaries = np.array([25, 28, 30, 32, 35, 38, 120])
q1, q3 = np.percentile(salaries, [25, 75])
print(q1, q3, q3 - q1)   # 29.0 36.5 7.5

Common mistake + fix: Using range to describe "how spread out" a dataset is when outliers exist. Fix: use IQR instead — it's the standard definition analysts and BoxPlot charts both use for exactly this reason.

Memory line: Range sees only the two most extreme points. IQR describes the middle half — much closer to what "typical spread" actually means.

Variance and Standard Deviation — Sample vs. Population

One-line idea: Standard deviation measures how far values typically sit from the mean — and Excel has two different formulas depending on whether your data is the whole population or just a sample of it.

💡 In simple words

One-line idea: STDEV.S divides by (n−1); STDEV.P divides by n. If your data is a sample meant to represent a bigger group, use STDEV.S — almost always the right choice for analyst work, since you're rarely measuring literally every person/transaction that exists.

Try it in 2 minutes: You have sales data for 7 of your company's 40 regional branches (not all 40). Which function — STDEV.S or STDEV.P — should you use?

Answer: STDEV.S — you have a sample (7 of 40 branches), not the full population. Using STDEV.P on a sample understates how much the full population likely varies.

Worked example: Same 7 salaries (25, 28, 30, 32, 35, 38, 120 — ₹ thousands):

•Sample standard deviation (STDEV.S): 33.79
•Population standard deviation (STDEV.P): 31.28
•Sample variance (VAR.S, std-dev squared): 1141.67

Per Microsoft's own function references, [STDEV.S](https://support.microsoft.com/en-us/office/stdev-s-function-7d69cf97-0c1f-4acf-be27-f3e83904cc23) "estimates standard deviation based on a sample" using the n−1 method, while [STDEV.P](https://support.microsoft.com/en-us/office/stdev-p-function-6e917c05-31a0-496f-ade7-4f4e7462f285) "calculates standard deviation based on the entire population" using the n method — the sample version divides by one fewer, which is why it always comes out slightly larger on the same data.

Excel/Sheets:  =STDEV.S(A2:A8)     =STDEV.P(A2:A8)     =VAR.S(A2:A8)
python
import statistics
salaries = [25, 28, 30, 32, 35, 38, 120]
print(statistics.stdev(salaries))        # sample std dev: 33.788558221188816
print(statistics.pstdev(salaries))       # population std dev: 31.282126343511698
print(statistics.variance(salaries))     # sample variance: 1141.6666666666667

Common mistake + fix: Using STDEV.P by habit (it's alphabetically first in the autocomplete list) on data that's actually a sample. Fix: ask "do I have every single data point that exists, or just some of them?" — almost always, the honest answer is "just some," which means STDEV.S.

Memory line: Sample data → STDEV.S (÷ n−1). The whole population, nothing missing → STDEV.P (÷ n). Default to STDEV.S when unsure.

Percentiles

One-line idea: A percentile tells you where one value ranks against the rest of the data — "the 90th percentile" means 90% of values are at or below it.

Everyday comparison: If an exam result says you're in the 90th percentile, it means you scored higher than 90% of everyone who took that exam — a far more useful statement than your raw score alone, since it tells you where you actually stand.

Worked example: 10 students' exam marks out of 100: 42, 55, 61, 67, 70, 72, 75, 78, 85, 91. (For reference, this class's mean is 69.6, median is 71, sample standard deviation is 14.36, and population standard deviation — if this were literally every student who ever sat this exact paper, not a sample — would be 13.62.)

•90th percentile: 85.6
•10th percentile: 53.7

Excel's PERCENTILE.INC (and Google Sheets' PERCENTILE) use linear interpolation between the two closest ranked values when the percentile doesn't land exactly on one — per [Microsoft's function reference](https://support.microsoft.com/en-us/office/percentile-inc-function-680f9539-45eb-410b-9a5e-c1355e5fe2ed), it returns "the k-th percentile of values in a range," inclusive of the 0th and 100th percentile (the min and max).

Excel/Sheets:  =PERCENTILE.INC(A2:A11,0.9)    =PERCENTILE.INC(A2:A11,0.1)
python
import numpy as np
marks = np.array([42, 55, 61, 67, 70, 72, 75, 78, 85, 91])
print(np.percentile(marks, 90))   # 85.6 — matches Excel's PERCENTILE.INC method
print(np.percentile(marks, 10))   # 53.7

Common mistake + fix: Confusing "90th percentile" with "90% score" — they're not the same thing; a 90th-percentile score could be a raw 72/100 if the exam was hard for everyone. Fix: always state which one you mean, and don't assume a high percentile means a high raw score.

Memory line: A percentile ranks you against everyone else. A raw score just states your own number — neither one replaces the other.

Outliers

One-line idea: An outlier is a value far enough from the rest of the data that it's worth asking "is this real, or is this a data-entry mistake?" before using it in any calculation.

Everyday comparison: If 9 students score 60-80 on a test and one scores 3, that 3 might be a genuinely struggling student — or it might be a student who left halfway through, or a typo for 30. You investigate before you decide which.

Common mistake + fix: Silently deleting any extreme value because it "messes up the average." Fix: investigate first — a real outlier (the CEO's ₹1,20,000 salary above) is a true data point that belongs in a median-based summary, not a data-entry error to be deleted. Only remove a value once you've confirmed it's actually wrong.

Memory line: An outlier is a question, not an automatic deletion — "is this real?" comes before "should I exclude this?"

Distributions: Normal and Skewed

One-line idea: A distribution is the shape all your data makes when you plot how often each value (or range of values) occurs — and that shape tells you whether the mean is even a good summary to use.

Everyday comparison: Adult height, plotted across a large population, makes a symmetric bell shape (a "normal" distribution) — most people cluster near the average, with fewer and fewer people the further you go in either direction. Household income, by contrast, is "right-skewed" — most people cluster at the lower end, with a long thin tail of a few very high earners stretching the mean upward (exactly like the ₹1,20,000 salary above).

Worked example (same salary data): Plotting the 7 salaries as a histogram shows six values bunched between ₹25,000-₹38,000, and one far off to the right at ₹1,20,000 — a visibly right-skewed shape, not a symmetric bell. That shape is itself the reason the median beat the mean earlier in this page.

Excel/Sheets:  Insert → Chart → Histogram (select the salary column)
python
import matplotlib.pyplot as plt
salaries = [25, 28, 30, 32, 35, 38, 120]
plt.hist(salaries, bins=5)
plt.show()

Common mistake + fix: Assuming every dataset is roughly a symmetric "bell curve" by default. Fix: plot a histogram before trusting mean/std-dev-based summaries — a skewed shape (like income or salary) usually means median/IQR tell the more honest story, as shown earlier on this page.

Memory line: Plot the shape before trusting the summary. A skewed shape means the mean is lying to you a little.

Share:
Join our Community
Daily tips, job alerts, interview help — join engineers learning together
→
Up Next
⚡
Statistics for Analysts — Intermediate
Real-world patterns, best practices, and deeper topics
Also Worth Exploring
← Back to all Statistics for Analysts modules
← InstallationIntermediate →