Mean, Median & ModeMean, Median & Mode均值、中位数与众数
Press Next → or use the ← → arrow keys
आगे → दबाएँ या ← → arrow keys इस्तेमाल करें
点击下一页 →或使用 ← → 方向键
One Number To Stand For Manyबहुत सारे Numbers के लिए एक Number用一个数代表一堆数
That is the whole point of central tendency: describing a pile of numbers with one representative value. But which value? Mean, median and mode each answer differently — and the CEO shows why the choice matters.
Central tendency का यही मतलब है: numbers के ढेर को एक प्रतिनिधि value से बताना। पर कौन सी value? Mean, median और mode हर एक अलग जवाब देते हैं — और CEO दिखाता है कि चुनाव क्यों ज़रूरी है।
这就是集中趋势的意义:用一个有代表性的值来描述一堆数。但该用哪个值?均值、中位数和众数给出的答案各不相同 —— CEO 的例子说明了为什么这个选择很重要。
Mean, median and mode are the three measures of central tendency — the base of descriptive statistics. Learn when each one tells the truth and when it misleads, and you can read almost any dataset at a glance.
Mean, median और mode तीन measures of central tendency हैं — descriptive statistics की नींव। सीख लें कि कब कौन सच बताता है और कब गुमराह करता है, तो आप लगभग कोई भी dataset एक नज़र में पढ़ सकेंगे।
均值、中位数和众数是三种集中趋势的度量 —— 描述统计的基础。弄清楚它们各自什么时候说真话、什么时候会误导,你就能一眼读懂几乎任何数据集。
Understand It Before the Mathsगणित से पहले समझें先看懂,再学公式
| MeasureMeasure度量 | Everyday pictureरोज़ की तस्वीर日常画面 | How to find itकैसे निकालें怎么求 |
|---|---|---|
| MeanMean均值 | A seesaw that balancesसंतुलित seesaw保持平衡的跷跷板 | Add all values, divide by how manyसब values जोड़ें, गिनती से भाग दें所有值相加,除以个数 |
| MedianMedian中位数 | The middle person in a height lineऊँचाई की line में बीच वाला按身高排队时站在正中间的人 | Sort, then take the middle (or average the two middles)Sort करें, फिर बीच वाली लें (या बीच की दो का औसत)排序后取中间值(偶数个时取中间两个的平均) |
| ModeMode众数 | The winner of a voteVote का विजेता投票的获胜者 | Count how often each value appears, take the most frequentगिनें कि हर value कितनी बार आती है, सबसे ज़्यादा वाली लें数每个值出现几次,取次数最多的 |
The Three Measures At A Glanceतीनों Measures एक नज़र में三种度量一览
Mean asks "where is the balance point?" Median asks "what is in the middle?" Mode asks "what is most common?" For a symmetric, single-peaked shape (like a bell curve) all three are the same. When the data is skewed they spread apart — and that gap is information.
Mean पूछता है "संतुलन का बिंदु कहाँ है?" Median पूछता है "बीच में क्या है?" Mode पूछता है "सबसे आम क्या है?" Symmetric, एक peak वाले आकार (जैसे bell curve) में तीनों बराबर होते हैं। Data skewed हो तो वे अलग हो जाते हैं — और वह gap ख़ुद एक जानकारी है।
均值问“平衡点在哪?”中位数问“中间是什么?”众数问“什么最常见?” 对于对称、单峰的形状(比如钟形曲线),三者相同。数据一偏斜,它们就会分开 —— 而这个差距本身就是信息。
The Mean — Every Value Gets A VoteMean — हर Value को एक Vote均值 — 每个值都有一票
Click on the beam to add a point, click a point to remove it, and drag the triangle (fulcrum). The beam only balances when the fulcrum sits exactly at the mean.
Point जोड़ने के लिए beam पर click करें, हटाने के लिए point पर click करें, और त्रिकोण (fulcrum) को खींचें। Beam तभी संतुलित होता है जब fulcrum ठीक mean पर हो।
点击横梁添加一个点,点击某个点将其删除,拖动三角形(支点)。只有当支点正好在均值处时,横梁才会平衡。
On symmetric data without outliers the mean is ideal: it uses all the information and feeds directly into later maths such as variance and standard deviation. Think average temperature, or the mean weight of products on a production line.
बिना outliers वाले symmetric data पर mean सबसे सही है: यह सारी जानकारी इस्तेमाल करता है और आगे के गणित जैसे variance और standard deviation में सीधे काम आता है। जैसे औसत तापमान, या production line पर products का mean वज़न।
在没有离群点的对称数据上,均值是理想选择:它用上了全部信息,还能直接用于方差、标准差等后续计算。比如平均气温,或生产线上产品的平均重量。
One Outlier Can Break The Meanएक Outlier Mean को बिगाड़ सकता है一个离群点就能“打破”均值
Ten team salaries (grey). Tick the box and move the slider to set the CEO salary. Blue = mean, green = median.
Team की दस salaries (स्लेटी)। Box पर tick करें और CEO की salary set करने के लिए slider खिसकाएँ। नीला = mean, हरा = median.
十个团队成员的工资(灰色)。勾选复选框并拖动滑块设置 CEO 的工资。蓝色 = 均值,绿色 = 中位数。
Because the mean adds up every value, one extreme number moves it a lot. One ₹5,00,000 CEO lifted the mean of ten ordinary salaries from ₹42,000 to ₹83,636 — a 99% jump caused by a single row. That is why salary and income reports usually give the median.
क्योंकि mean हर value जोड़ता है, एक extreme number उसे बहुत हिला देता है। ₹5,00,000 वाले एक CEO ने दस आम salaries का mean ₹42,000 से ₹83,636 कर दिया — सिर्फ़ एक row से 99% की छलाँग। इसीलिए salary और income reports आमतौर पर median बताती हैं।
因为均值把每一个值都加进去,一个极端值就能让它大幅移动。一位 ₹5,00,000 的 CEO 让十个普通工资的均值从 ₹42,000 变成 ₹83,636 —— 仅仅一行数据就带来 99% 的跳涨。这就是工资和收入报告通常给出中位数的原因。
import numpy as np
# Monthly salaries (₹) of a 10-person team
team = [32000, 35000, 38000, 40000, 41000, 43000, 44000, 46000, 47000, 54000]
print(f"Team only → mean ₹{np.mean(team):,.0f} median ₹{np.median(team):,.0f}")
# Add the CEO's salary
with_ceo = team + [500000]
print(f"With CEO → mean ₹{np.mean(with_ceo):,.0f} median ₹{np.median(with_ceo):,.0f}")
jump = (np.mean(with_ceo) / np.mean(team) - 1) * 100
print(f"The mean jumped {jump:.0f}%; the median moved only ₹{np.median(with_ceo) - np.median(team):,.0f}")
The Median — The True MiddleMedian — असली बीच中位数 — 真正的中间
Make a new list, add a huge number, then press "Sort & find the median". Watch how the huge number changes the mean but barely touches the median.
नई list बनाएँ, एक बहुत बड़ा number जोड़ें, फिर "Sort करें और median खोजें" दबाएँ। देखें कि बड़ा number mean को बदल देता है पर median को मुश्किल से छूता है।
生成新列表、加入一个超大的数,然后点击“排序并找中位数”。看看这个超大的数如何改变均值,却几乎碰不到中位数。
Six homes sell for ₹45, 48, 50, 50, 52 and 55 lakh, and one luxury villa for ₹420 lakh. The mean price is ₹102.9 lakh — higher than every ordinary home. The median is ₹50 lakh, exactly what a typical buyer sees.
छह घर ₹45, 48, 50, 50, 52 और 55 लाख में बिकते हैं, और एक luxury villa ₹420 लाख में। Mean दाम ₹102.9 लाख है — हर आम घर से ज़्यादा। Median ₹50 लाख है, ठीक वही जो एक आम ख़रीदार देखता है।
六套房子分别以 ₹45、48、50、50、52 和 55 拉克(lakh)成交,另有一栋豪华别墅卖 ₹420 拉克。均值是 ₹102.9 拉克 —— 比每一套普通房子都贵。中位数是 ₹50 拉克,正是普通买家看到的价格。
The Mode — What Shows Up MostMode — जो सबसे ज़्यादा दिखे众数 — 出现最多的
Click any bar to add one more sale or vote. The crown moves to the most frequent value. Try "Make it bimodal", and switch to the colour survey.
एक और sale या vote जोड़ने के लिए किसी भी bar पर click करें। Crown सबसे ज़्यादा बार आने वाली value पर चला जाता है। "इसे bimodal बनाएँ" आज़माएँ, और रंग वाले survey पर जाएँ।
点击任意柱子,再增加一笔销量或一票。皇冠会移到出现次数最多的值上。试试“变成双峰”,再切换到颜色调查。
Across 185 customers, size 8.5 sold most (45 times) — so 8.5 is the mode, and the only number that tells the shop what to reorder. The mode also works on pure categories: in a colour survey where Blue wins 72 of 200 votes, you cannot average colours, but the mode names the favourite. Data can be unimodal, bimodal, multimodal, or have no mode at all.
185 customers में size 8.5 सबसे ज़्यादा बिका (45 बार) — इसलिए 8.5 mode है, और अकेला number जो दुकान को बताता है कि क्या दोबारा मँगाना है। Mode सीधी categories पर भी चलता है: रंग वाले survey में Blue 200 में से 72 votes से जीतता है; रंगों का औसत नहीं निकलता, पर mode पसंदीदा का नाम बताता है। Data unimodal, bimodal, multimodal, या बिना mode का हो सकता है।
在 185 位顾客中,8.5 码卖得最多(45 次)—— 所以 8.5 是众数,也是唯一能告诉商店该补什么货的数字。众数也适用于纯类别数据:在颜色调查中蓝色以 200 票中的 72 票胜出,颜色无法求平均,但众数能说出最受欢迎的那个。 数据可以是单峰、双峰、多峰,或者根本没有众数。
Outliers — The Mean Moves, The Median HoldsOutliers — Mean हिलता है, Median टिका रहता है离群点 — 均值会动,中位数稳住
The mean is pulled toward extremes, the median resists them, and the mode ignores them (unless the extreme value repeats a lot). A large gap between mean and median is a red flag — it usually means outliers or skew, so investigate before you trust the average.
Mean extremes की ओर खिंचता है, median उनका विरोध करता है, और mode उन्हें अनदेखा करता है (जब तक extreme value बहुत बार न दोहराई जाए)। Mean और median के बीच बड़ा gap एक चेतावनी है — आमतौर पर इसका मतलब outliers या skew है, इसलिए average पर भरोसा करने से पहले जाँच करें।
均值会被极端值拉过去,中位数能抵抗它们,众数则不理会它们(除非这个极端值重复出现很多次)。 均值和中位数之间的差距很大是一个危险信号 —— 通常意味着有离群点或偏斜,先查清楚再相信平均数。
How Skew Reorders The ThreeSkew तीनों का क्रम कैसे बदलता है偏斜如何改变三者的顺序
Move the slider from left-skewed to right-skewed. The page draws 5,000 values with that shape and marks the mean, median and mode (the tallest bar).
Slider को left-skewed से right-skewed तक खिसकाएँ। Page उस आकार के 5,000 values बनाता है और mean, median और mode (सबसे ऊँची bar) दिखाता है।
把滑块从左偏拖到右偏。页面按这种形状生成 5,000 个值,并标出均值、中位数和众数(最高的柱子)。
The mode sits at the peak, the mean is dragged toward the long tail, and the median usually lands between them. So the order tells you the shape: mean right of the median → right skew; left of it → left skew. (This is a rule of thumb for smooth, single-peaked data. With lumpy or multi-peaked data it can fail — so always look at a histogram.)
Mode peak पर रहता है, mean लंबी पूँछ की ओर खिंचता है, और median आमतौर पर दोनों के बीच आता है। इसलिए क्रम आकार बताता है: mean, median के दाएँ → right skew; बाएँ → left skew. (यह smooth, एक peak वाले data के लिए आम नियम है। ऊबड़-खाबड़ या कई peaks वाले data पर यह ग़लत हो सकता है — इसलिए हमेशा histogram देखें।)
众数在峰顶,均值被拉向长尾,中位数通常落在两者之间。所以顺序能告诉你形状:均值在中位数右边 → 右偏;在左边 → 左偏。 (这是针对平滑、单峰数据的经验法则。数据坑坑洼洼或有多个峰时可能失效 —— 所以一定要看直方图。)
The Mean–Median Gap Measures SkewMean–Median Gap, Skew को मापता है均值与中位数之差反映偏斜
| DistributionDistribution分布 | Usual orderआम क्रम通常顺序 | Tailपूँछ尾部 | Reportक्या बताएँ报告哪个 |
|---|---|---|---|
| SymmetricSymmetric对称 | Mean = Median = Mode | Noneनहीं无 | Mean is fineMean ठीक है均值即可 |
| Right-skewed (+)Right-skewed (+)右偏(+) | Mode < Median < Mean | Long right tailलंबी दाईं पूँछ右侧长尾 | Prefer medianMedian बेहतर优先用中位数 |
| Left-skewed (−)Left-skewed (−)左偏(−) | Mean < Median < Mode | Long left tailलंबी बाईं पूँछ左侧长尾 | Prefer medianMedian बेहतर优先用中位数 |
When unsure, report the mean and the median. The distance between them is a free skewness detector. Income (a few very high earners) is the classic right skew, which is exactly why "median income" is the honest number.
जब पक्का न हो, mean और median दोनों बताएँ। उनके बीच की दूरी मुफ़्त का skewness detector है। Income (कुछ बहुत ज़्यादा कमाने वाले) सबसे आम right skew है, इसीलिए "median income" ईमानदार number है।
拿不准时,均值和中位数都报告。两者之间的距离就是一个免费的偏斜探测器。收入(少数人挣得特别多)是典型的右偏,这正是“收入中位数”才是诚实数字的原因。
Which Measure, When?कौन सा Measure, कब?什么时候用哪个?
| MeasureMeasure度量 | Data typeData type数据类型 | Use when…कब इस्तेमाल करें…适用于… | Everyday exampleरोज़ का उदाहरण日常例子 |
|---|---|---|---|
| Mean | NumericNumeric数值型 | Roughly symmetric, no outliersलगभग symmetric, बिना outliers大致对称、无离群点 | Average temperature; product weightऔसत तापमान; product का वज़न平均气温;产品重量 |
| Median | Numeric (also ordered categories like ratings)Numeric (और ratings जैसी ordered categories)数值型(也适用于评分这类有序类别) | Skewed or has outliersSkewed या outliers वाला偏斜或有离群点 | Household income; home pricesपरिवार की income; घरों के दाम家庭收入;房价 |
| Mode | Any (including categories)कोई भी (categories समेत)任意(包括类别) | Most popular / typical categoryसबसे लोकप्रिय / आम category最受欢迎 / 最典型的类别 | Favourite colour; best-selling sizeपसंदीदा रंग; सबसे ज़्यादा बिकने वाला size最喜欢的颜色;最畅销的尺码 |
The same logic drives imputation: fill a roughly normal numeric column with its mean, a skewed one with its median, and a categorical column with its mode. In scikit-learn: SimpleImputer(strategy="mean" | "median" | "most_frequent").
यही तर्क imputation में चलता है: लगभग normal numeric column को उसके mean से भरें, skewed को median से, और categorical column को mode से। scikit-learn में: SimpleImputer(strategy="mean" | "median" | "most_frequent").
填补缺失值也是同样的逻辑:大致正态的数值列用均值,偏斜的用中位数,类别列用众数。在 scikit-learn 中:SimpleImputer(strategy="mean" | "median" | "most_frequent")。
Pick The Right Measureसही Measure चुनें选出合适的度量
Read the situation, pick a measure, and read why. Your score is shown at the top.
स्थिति पढ़ें, एक measure चुनें, और वजह पढ़ें। आपका score ऊपर दिखता है।
阅读场景,选择一种度量,再看解释。得分显示在上方。
All Three On 20 Exam Scores20 Exam Scores पर तीनों用 20 个考试分数算三者
Twenty students score between 45 and 92. Their scores add up to 1,369, and 65 appears three times.
बीस students के scores 45 से 92 के बीच हैं। उनका जोड़ 1,369 है, और 65 तीन बार आता है।
二十名学生的分数在 45 到 92 之间,总分 1,369,其中 65 出现了三次。
Mean 68.45 sits above median 65 — the sign of a mild right skew (scipy's skewness = +0.37): a few high scorers pull the average up. The typical student is better described by the median (65), which here is also the mode.
Mean 68.45, median 65 से ऊपर है — हल्के right skew का संकेत (scipy का skewness = +0.37): कुछ ऊँचे scores average को ऊपर खींचते हैं। आम student को median (65) बेहतर बताता है, जो यहाँ mode भी है।
均值 68.45 高于中位数 65 —— 这是轻度右偏的信号(scipy 偏度 = +0.37):少数高分把平均数拉高了。用中位数(65)描述典型学生更合适,这里它恰好也是众数。
Computing All Three In PythonPython में तीनों निकालना用 Python 计算三者
import numpy as np
from scipy import stats
# All 20 exam scores (no "..." — this list is complete)
scores = [45, 52, 55, 57, 60, 61, 62, 63, 64, 65,
65, 65, 70, 73, 76, 80, 85, 88, 91, 92]
mean = np.mean(scores)
median = np.median(scores)
mode = stats.mode(scores, keepdims=False) # returns (mode, count)
print("Count :", len(scores), " Sum:", sum(scores))
print("Mean :", mean)
print("Median:", median)
print("Mode :", mode.mode, f"(appears {mode.count} times)")
# The mean–median gap is a quick skewness check
gap = mean - median
if abs(gap) < 0.5:
print("Roughly symmetric")
else:
print("Right-skewed" if gap > 0 else "Left-skewed", f"(gap = {gap:+.2f})")
print("Skewness (scipy):", round(stats.skew(scores), 3))
(1) stats.mode() returns a result object with .mode and .count — print .mode, not the whole object. (2) Python's statistics.mode returns only the first mode when there is a tie; use statistics.multimode or pandas .mode() to get all of them.
(1) stats.mode() एक result object लौटाता है जिसमें .mode और .count होते हैं — पूरा object नहीं, .mode print करें। (2) Python का statistics.mode बराबरी होने पर सिर्फ़ पहला mode देता है; सभी पाने के लिए statistics.multimode या pandas .mode() इस्तेमाल करें।
(1) stats.mode() 返回一个带 .mode 和 .count 的结果对象 —— 要打印 .mode,而不是整个对象。(2) Python 的 statistics.mode 在并列时只返回第一个众数;要得到全部众数,请用 statistics.multimode 或 pandas 的 .mode()。
In pandas It Is One Call Eachpandas में हर एक के लिए एक Call在 pandas 中各需一行
# Continues from the previous slide (uses the same `scores` list)
import pandas as pd
df = pd.DataFrame({'score': scores})
df['grade'] = pd.cut(df['score'], bins=[0, 54, 69, 84, 100],
labels=['C', 'B', 'A', 'A+'])
print(df['score'].mean(), df['score'].median(), df['score'].mode().tolist())
print(df['grade'].value_counts().sort_index().to_dict())
print("Most common grade:", df['grade'].mode()[0]) # mode works on categories too
print(df['score'].describe().round(2)) # the 50% row is the median
df.describe() gives the mean, the median (the 50% row), min, max and spread in one line. Note that .mode() returns a list, because data can have more than one mode — and it works on text columns such as grades.
df.describe() एक line में mean, median (50% वाली row), min, max और फैलाव दे देता है। ध्यान दें कि .mode() एक list लौटाता है, क्योंकि data के एक से ज़्यादा mode हो सकते हैं — और यह grades जैसे text columns पर भी चलता है।
df.describe() 一行就给出均值、中位数(50% 那一行)、最小值、最大值和离散程度。注意 .mode() 返回的是列表,因为数据可能有不止一个众数 —— 它也适用于成绩等级这样的文本列。
Central Tendency In The Real Worldअसली दुनिया में Central Tendency现实世界中的集中趋势
Six Rules That Keep You Honestछह नियम जो आपको ईमानदार रखते हैं让你保持诚实的六条规则
Three Measures, One Clear Pictureतीन Measures, एक साफ़ तस्वीर三种度量,一幅清晰的图景
Mean, median and mode each describe "typical" differently: the mean uses every value but bends toward outliers, the median holds the true middle, and the mode names the most common value. Their disagreement reveals the shape of the data — so plot first, then choose the measure that tells the honest story.
Mean, median और mode हर एक "आम" को अलग तरह बताते हैं: mean हर value इस्तेमाल करता है पर outliers की ओर झुकता है, median असली बीच पकड़ता है, और mode सबसे आम value का नाम बताता है। उनकी असहमति data का आकार दिखाती है — इसलिए पहले plot करें, फिर वह measure चुनें जो ईमानदार कहानी बताए।
均值、中位数和众数各自以不同方式描述“典型”:均值用到每个值却会偏向离群点,中位数守住真正的中间,众数说出最常见的值。它们之间的分歧揭示了数据的形状 —— 所以先画图,再选出讲真话的那个度量。
Central tendency is only half the story. Pair it with spread (range, variance, standard deviation) and shape (skewness, kurtosis) for a full picture. Measures of dispersion are the natural next step.
Central tendency आधी कहानी है। पूरी तस्वीर के लिए इसे फैलाव (range, variance, standard deviation) और आकार (skewness, kurtosis) के साथ जोड़ें। Measures of dispersion अगला स्वाभाविक कदम है।
集中趋势只是故事的一半。把它和离散程度(极差、方差、标准差)以及形状(偏度、峰度)结合起来,才能看到全貌。离散程度的度量是自然的下一步。