Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Median






The Central Value by Position


Not all measures of central tendency are based on averaging. Some describe position rather than magnitude.

This page introduces the median as the value that divides a distribution into two equally weighted halves. It focuses on how the median is defined through ordering and cumulative probability, and why it remains stable even when extreme values distort other measures of center.

Key Terms

Cumulative Distribution Function— FX(m)=0.5F_X(m) = 0.5 defines the median
Discrete Random Variable— median defined via PMF sum
Continuous Random Variable— median defined via PDF integral
Expected Value— E[X]E[X], the alternative center measure

See All Probability Definitions →


Definition and Concept

The average income of a group is supposed to describe a typical member.
Five people earn 3030, 3535, 4040, 4545 and 5050 thousand. The mean, 4040 thousand, sits right in the middle.
Raise the top salary to 1000 thousand and the mean jumps to 230 — far above what four of the five people earn.
incomes (thousands)meanmiddle value
30, 35, 40, 45, 504040
30, 35, 40, 45, 100023040
One extreme value moved the mean by 190190 thousand. The middle value, 4040, did not move at all.
A centre found by position ignores how extreme the extremes are.

Median as a Measure of Central Tendency

The median is one of three primary measures describing where a distribution centers, alongside the mean and mode.
Unlike the mean, which balances all values through weighted averaging, the median simply identifies the middle position. It cares only about ranking values, not their magnitudes—making it resistant to extreme observations that would distort the mean.
The definition
The median of a distribution is a value mm that splits its probability in half: P(X≤m)≥12P(X \le m) \ge \frac{1}{2} and P(X≥m)≥12P(X \ge m) \ge \frac{1}{2}.
The median is the value that splits a probability distribution exactly in half. It's the point where half the probability lies below and half lies above.

What is the Median?

For any probability distribution, the median is the 50th percentile—the value mm that divides the total probability into two equal parts:
• Discrete distributions: The value mm where cumulative probability reaches or exceeds 0.5 from both directions
• Continuous distributions: The unique value mm where P(X≤m)=0.5P(X \leq m) = 0.5
If you draw random variables from the distribution repeatedly, half will fall below the median and half will fall above it.
So for five equally likely incomes of 3030, 3535, 4040, 4545 and 10001000 thousand, the median is 4040 thousand: two values lie below it and two above.
The median reports the centre by position, so outliers cannot drag it.

Why the Median Matters

The median provides crucial insight into distribution structure:
• Where is the center? The median marks the probability midpoint
• How symmetric is the distribution? Comparing median to mean reveals skewness
• Are there outliers? The median stays stable when extreme values appear
For income data, housing prices, or any measurement prone to outliers, the median often represents the "typical" value better than the mean does.
The median and the mean answer different questions, and the median is not always a single value.

Median vs Other Measures

The median behaves distinctly from mean and mode:
• Robustness: Extreme values beyond the 50% threshold have zero influence
• Unique when the CDF is strictly increasing: Unlike the mode, which can be multiple or absent
• May differ from mean: Skewed distributions separate median and mean substantially
• Interpretability: Represents an achievable middle value, not an abstract balance point
The median complements mean and mode by revealing the distribution's center through probability division rather than probability weighting or probability concentration.
The rest of the page covers the median for discrete and continuous distributions, how they compare, the median against the mean and mode, its properties, how to find it, the 50th percentile, practical use, common distributions, special cases, common mistakes and related concepts.

Median for Discrete Distributions


For discrete distributions, the median is the smallest value where cumulative probability reaches or crosses the halfway point.

Definition


The median of a discrete random variable XX is the smallest value mm satisfying both conditions:

Median for Discrete Distributions
P(X≤m)≥0.5andP(X≥m)≥0.5P(X \leq m) \geq 0.5 \quad \text{and} \quad P(X \geq m) \geq 0.5

This ensures that at least half the probability lies below (or at) mm, and at least half lies above (or at) mm.

Why Two Conditions?


The discrete nature creates jumps in the cumulative distribution function. A single value might satisfy one condition but not the other.

The two-condition definition guarantees the median genuinely divides probability, even when the CDF jumps past 0.5 without landing exactly on it.

How to Find the Median


Unlike expected value, there's no universal formula. Find the median through cumulative probability:

1. Calculate the CDF: F(k)=P(X≤k)F(k) = P(X \leq k) for each value in the support
2. Identify where F(k)F(k) first reaches or exceeds 0.5
3. Verify both conditions hold at that value
4. If multiple consecutive values satisfy both conditions, any of them qualifies as a median

Pitfall: Taking the middle of the listed values
Picking the middle of the support: for values 1,2,3,4,51, 2, 3, 4, 5 with probabilities 0.4,0.3,0.1,0.1,0.10.4, 0.3, 0.1, 0.1, 0.1 that gives 33. Accumulating, F(1)=0.4F(1) = 0.4 and F(2)=0.7F(2) = 0.7, so the median is 22.

The search runs along the support from the smallest value upward, adding probabilities as it goes. Every value contributes its own weight, so a value that carries a large share of the probability can hold the halfway point by itself, wherever it stands in the list.

Medians for Common Discrete Distributions


Discrete Uniform on {a,a+1,…,b}\{a, a+1, \ldots, b\}

Median: a+b2\frac{a+b}{2} when a+ba+b is even

When a+ba+b is odd, both a+b−12\frac{a+b-1}{2} and a+b+12\frac{a+b+1}{2} satisfy the median conditions.

Example
Uniform on {1,2,3,4,5}\{1,2,3,4,5\} has median 33

Binomial with parameters nn and pp

Median: No simple closed form. Approximation: median ≈np\approx np for large nn

Requires numerical computation or tables for exact values.

Example
For n=10,p=0.5n=10, p=0.5, numerical evaluation gives median =5= 5

Geometric with parameter pp

Median: m=⌈−ln⁡(2)ln⁡(1−p)⌉m = \lceil \frac{-\ln(2)}{\ln(1-p)} \rceil

Example
For p=0.3p = 0.3, median =⌈1.94⌉=2= \lceil 1.94 \rceil = 2

Negative Binomial with parameters rr and pp

Median: No closed form. Must evaluate CDF numerically.

Hypergeometric with parameters N,K,nN, K, n

Median: No closed form. Numerical evaluation required.

Poisson with parameter λ\lambda

Median: Approximation: median ≈λ+13−0.02λ\approx \lambda + \frac{1}{3} - \frac{0.02}{\lambda} for large λ\lambda

For small λ\lambda, numerical evaluation of the CDF is necessary.

Non-Uniqueness


Discrete distributions can have multiple medians when the CDF lands on exactly 0.5 at some value and stays flat there until the next jump.

Example
Discrete Uniform on {1,2,3,4}\{1, 2, 3, 4\} has CDF values 0.25,0.5,0.75,1.00.25, 0.5, 0.75, 1.0. Both 22 and 33 satisfy the median conditions. Either value is a valid median.

Visual Identification


On a cumulative probability plot, the median is where the step function first touches or crosses the horizontal line at 0.5. The discrete jumps make this crossing potentially ambiguous.

Key Properties


• The median always lies within the support
• Finding it requires evaluating the CDF, not the PMF directly
• Multiple values may qualify as medians in certain cases
• Unlike the mode, the median depends on cumulative structure, not individual probabilities
• Changing tail probabilities can shift the median, even if the most probable value stays fixed
CDF of the discrete uniform on 1, 2, 3, 4: it equals exactly 0.5 from 2 up to 3, so every value in [2, 3] is a medianxF(x)123450.250.50.751F = 0.5 on [2, 3)P(X = k) = 1/4, k = 1..4medians: all of [2, 3]A flat stretch at 0.5: the median is not unique
A median interval

The CDF of the discrete uniform on {1, 2, 3, 4} climbs in steps of 1/4. At x = 2 it reaches exactly 0.5 and stays there until the jump at 3. Any m from 2 to 3 has P(X ≤ m) ≥ 0.5 and P(X ≥ m) ≥ 0.5, so both conditions hold along the whole flat stretch: 2, 3 and every value between them are medians.

A CDF that jumps past 0.5 instead, as for {1, 2, 3}, gives a single median.

Median for Continuous Distributions


For continuous distributions, the median is the unique value where the cumulative distribution function equals exactly 0.5.

Definition


The median of a continuous random variable XX is the value mm satisfying:

Median for Continuous Distributions
F(m)=P(X≤m)=0.5F(m) = P(X \leq m) = 0.5

Equivalently, using the probability density function:

Median for Continuous Distributions
∫−∞mf(x)dx=0.5\int_{-\infty}^{m} f(x)dx = 0.5

This is the point that divides the area under the density curve into two equal halves.

How to Find the Median


The median can often be found analytically by solving the CDF equation:

1. Write the CDF: F(x)=P(X≤x)F(x) = P(X \leq x)
2. Set F(m)=0.5F(m) = 0.5
3. Solve for mm algebraically
4. Use the inverse CDF when it exists: m=F−1(0.5)m = F^{-1}(0.5)

When no closed-form inverse exists, numerical methods locate the median through root-finding algorithms.

Medians for Common Continuous Distributions


Continuous Uniform on [a,b][a, b]

Median: m=a+b2m = \frac{a+b}{2}

The midpoint of the interval.

Normal with parameters μ,σ\mu, \sigma

Median: m=μm = \mu

Symmetry ensures median equals mean.

Exponential with rate parameter λ\lambda

Median: m=ln⁡(2)λ≈0.693λm = \frac{\ln(2)}{\lambda} \approx \frac{0.693}{\lambda}

Derivation: The CDF is F(x)=1−e−λxF(x) = 1 - e^{-\lambda x}. Setting F(m)=0.5F(m) = 0.5 gives:

Median for Continuous Distributions
1−e−λm=0.51 - e^{-\lambda m} = 0.5

Median for Continuous Distributions
e−λm=0.5e^{-\lambda m} = 0.5

Median for Continuous Distributions
m=ln⁡(2)λm = \frac{\ln(2)}{\lambda}
The derivation above as a chain of steps, from the CDF condition to the formula.
DownloadPNG2×PDF
FindThe median mm of the exponential distribution with rate λ\lambda
1
1−e−λm=0.51 - e^{-\lambda m} = 0.5
CDFThe CDF is F(x)=1−e−λxF(x) = 1 - e^{-\lambda x}; setting F(m)=0.5F(m) = 0.5
2
e−λm=0.5e^{-\lambda m} = 0.5
rearrangeMove the exponential to one side
3
m=ln⁡(2)λm = \frac{\ln(2)}{\lambda}
key stepTake the natural logarithm and divide by −λ-\lambda, using ln⁡(0.5)=−ln⁡(2)\ln(0.5) = -\ln(2)
m=ln⁡(2)λ≈0.693λm = \frac{\ln(2)}{\lambda} \approx \frac{0.693}{\lambda}
Deriving the median of the exponential distributionLearn Math Class
Taking logarithms in the last step frees mm from the exponent; the rate λ\lambda only rescales the result.
Pitfall: Setting the density equal to one half
Solving f(m)=0.5f(m) = 0.5 instead of F(m)=0.5F(m) = 0.5: for λ=2\lambda = 2, 2e−2m=0.52e^{-2m} = 0.5 gives m=ln⁡42≈0.693m = \frac{\ln 4}{2} \approx 0.693. The CDF condition 1−e−2m=0.51 - e^{-2m} = 0.5 gives m=ln⁡22≈0.347m = \frac{\ln 2}{2} \approx 0.347.

The derivation runs entirely through the CDF F(x)=1−e−λxF(x) = 1 - e^{-\lambda x}, which measures the area under the density λe−λx\lambda e^{-\lambda x} between 00 and xx. Solving it once gives the median for every rate at the same time: a larger λ\lambda packs the probability closer to 00, and doubling λ\lambda halves the median.

Beta Distribution with parameters α,β\alpha, \beta

Median: No general closed form except for special cases

When α=β\alpha = \beta, median =0.5= 0.5 by symmetry

Numerical methods required for general α,β\alpha, \beta

Gamma Distribution with shape kk and rate θ\theta

Median: No closed form

For k=1k=1, reduces to exponential with median ln⁡(2)θ\frac{\ln(2)}{\theta}

Numerical evaluation required for k>1k > 1

Weibull Distribution with shape kk and scale λ\lambda

Median: m=λ(ln⁡2)1/km = \lambda (\ln 2)^{1/k}

Derived from the CDF F(x)=1−e−(x/λ)kF(x) = 1 - e^{-(x/\lambda)^k}

Cauchy Distribution with location x0x_0 and scale γ\gamma

Median: m=x0m = x_0

The median equals the location parameter. The mean does not exist for this distribution.

Lognormal Distribution with parameters μ,σ\mu, \sigma

Median: m=eμm = e^\mu

The median of the lognormal equals the exponential of the underlying normal's mean.

Triangular Distribution on [a,c,b][a, c, b] with mode cc

Median depends on the position of mode cc:

If c≥a+b2c \geq \frac{a+b}{2}: median =a+(b−a)(c−a)2= a + \sqrt{\frac{(b-a)(c-a)}{2}}

If c<a+b2c < \frac{a+b}{2}: median =b−(b−a)(b−c)2= b - \sqrt{\frac{(b-a)(b-c)}{2}}

Uniqueness


RULE
Continuous distributions with strictly increasing CDFs have exactly one median.

The smoothness of the CDF eliminates the ambiguity present in discrete cases.

If the CDF has flat regions (constant over an interval), any value in that interval satisfies the median definition, creating non-uniqueness.

Relationship to Density


The median need not coincide with the peak of the PDF. Skewed distributions separate the median from the mode.

The median divides probability mass equally, while the mode identifies maximum density. These are distinct concepts that align only in symmetric distributions.

Visual Identification


On a density curve, the median is the vertical line that splits the area under the curve into two equal parts. For symmetric distributions, this line passes through the peak. For skewed distributions, the median usually sits between the mode and mean.

Key Properties


• Continuous distributions typically have a unique median
• The median can be found by solving F(m)=0.5F(m) = 0.5 or using F−1(0.5)F^{-1}(0.5)
• Ties are rarer than in discrete cases, but a flat stretch of the CDF at height 0.50.5 still makes every point of that stretch a median
• The median is always in the interior of the support for distributions with unbounded support
• For bounded support, the median may approach but typically doesn't reach the boundaries
0.00.20.40.60.81.000.61.21.92.53.13.74.45.0xF(x) = P(X ≤ x)
Exponential CDF, lambda = 1: the median is where F crosses one half

For a continuous variable the CDF is a smooth increasing curve, so it crosses one half at exactly one point; for the exponential family that point is the natural logarithm of 2 over lambda, about 0.69, well below the mean of 1 because of the right tail. Move along the curve and find where the accumulated probability reaches one half on the continuous CDF visualizer.

Discrete and continuous medians differ in exactly this uniqueness.

Discrete vs Continuous Median


The median behaves differently for discrete and continuous distributions due to fundamental differences in how probability distributes.

Uniqueness


Continuous distributions: The median is unique. The CDF is smooth and crosses 0.5 at exactly one point.

Discrete distributions: Multiple values may satisfy the median conditions when the CDF equals exactly 0.5 at some value.

Example
Discrete uniform on {1,2,3,4}\{1, 2, 3, 4\} has both 2 and 3 as valid medians.

Definition Complexity


Continuous case: Simple condition F(m)=0.5F(m) = 0.5

Discrete case: Requires both P(X≤m)≥0.5P(X \leq m) \geq 0.5 and P(X≥m)≥0.5P(X \geq m) \geq 0.5 to handle probability jumps properly

The two-condition requirement for discrete distributions ensures the median genuinely divides probability despite the CDF's discontinuities.

Computational Methods


Continuous: Solve F(m)=0.5F(m) = 0.5 analytically or use inverse CDF F−1(0.5)F^{-1}(0.5)

Discrete: Evaluate the CDF at each support value, find where cumulative probability first reaches 0.5, verify both conditions

Continuous distributions often have closed-form median expressions. Discrete distributions typically require numerical evaluation or lookup tables.

Median as an Interval


Discrete: When multiple values satisfy the conditions, the median is technically an interval rather than a single point

Continuous: Always a single point (except for pathological cases with flat CDF regions)

In practice, discrete medians are reported as the smallest qualifying value, even when an interval exists.

Visual Differences


Continuous: The PDF curve shows the median as the vertical line splitting area equally

Discrete: The PMF bar chart requires examining cumulative probabilities to locate the median

Identifying the median visually is more intuitive for continuous distributions than discrete ones.

Impact on Calculations


Continuous: Integration yields exact median through ∫−∞mf(x)dx=0.5\int_{-\infty}^{m} f(x)dx = 0.5

Discrete: Summation requires careful handling of boundary cases: ∑k≤mP(X=k)≥0.5\sum_{k \leq m} P(X = k) \geq 0.5

The discrete case demands attention to whether inequalities are strict or non-strict.

Relationship to Other Measures


Both types: Median can differ from mean and mode in skewed distributions

Continuous: The separation is smooth and predictable based on distribution shape

Discrete: The separation can be irregular due to probability concentration at specific points

Why Continuous is Simpler


The smoothness of continuous CDFs eliminates ambiguity. Every strictly increasing CDF crosses 0.5 at exactly one location, making median identification straightforward.

Discrete distributions introduce complexity through jumps, ties, and the possibility of no value landing precisely at the 50% cumulative probability mark.

Discrete vs Continuous at a Glance


The table below lines up the discrete and continuous cases side by side, summarizing how the same underlying idea — splitting probability at 0.5 — plays out under each setting.
DownloadPNG2×PDF
Layout
AspectDiscreteContinuous
Defining conditionsmallest m with P(X ≤ m) ≥ 0.5 and P(X ≥ m) ≥ 0.5unique m where F(m) = 0.5
Uniquenessmay be non-unique when CDF jumps past 0.5unique when CDF is strictly increasing
CDF shapestep function with jumps at support valuessmooth, continuous curve
Computationsummation: ∑k≤m_{k ≤ m} P(X = k) ≥ 0.5integration: ∫−∞_{-∞}ᵐ f(x) dx = 0.5
Solving methodevaluate CDF at each support valuesolve F(m) = 0.5 or use m = F⁻¹(0.5)
Closed form availabilityrare (geometric is a notable exception)often available (normal, exponential, Weibull, ...)
Visual identificationstep function crosses horizontal line at 0.5vertical line splitting density area into equal halves
Result isa value or sometimes an intervalalways a single point (non-pathological)
Discrete vs Continuous MedianLearn Math Class
A strictly increasing CDF crosses one half once; a stepped CDF jumps past it, which is why discrete medians need two conditions.

Median, Mean, and Mode Compared


Three measures describe where distributions center: median, mean, and mode. Each reveals different structural features.

Quick Definitions


Median: The 50th percentile that divides total probability equally

Mean: Weighted balance point calculated from all values

Mode: Peak location—where probability or density reaches maximum

Symmetric Distributions


When unimodal distributions mirror themselves around a center point, all three measures collapse to the same value.

Normal distribution: median = mean = mode = μ\mu

Discrete Uniform on {1,2,3,4,5}\{1,2,3,4,5\}: mean and median equal 33, and every value is a mode

Perfect symmetry forces the probability split, the balance point, and the peak to occupy identical positions.

Skewed Distributions


Asymmetry typically separates the three measures in a familiar pattern — a rule of thumb, not a guarantee.

Right skew (tail stretches toward larger values):

Median, Mean, and Mode Compared
mode<median<mean\text{mode} < \text{median} < \text{mean}

Extreme large values drag the mean rightward. The median holds closer to the probability bulk. The mode stays fixed at the density peak.

Exponential distribution: mode = 00, median = ln⁡(2)λ\frac{\ln(2)}{\lambda}, mean = 1λ\frac{1}{\lambda}

Fact: A half-life is a median
The half-life of an isotope is the median lifetime of one atom, ln⁡2λ\frac{\ln 2}{\lambda}. The mean lifetime 1λ\frac{1}{\lambda} is about 1.441.44 half-lives, because the few atoms that last much longer pull the average up.

Radioactive decay produces exactly this shape. Each atom waits an exponential time before it decays, at a rate λ\lambda fixed by the isotope: most atoms go early, while a few survive many times longer than the rest. Tables of isotopes do not list the rate itself. They list the time by which half of a large sample has decayed.

Left skew (tail stretches toward smaller values):

Median, Mean, and Mode Compared
mean<median<mode\text{mean} < \text{median} < \text{mode}

The ordering reverses—mean pulled left, mode anchored at the right peak.

Comparison Table

Comparing Median, Mean, and Mode

FeatureMedianMeanMode
DefinitionValue at 50th percentileProbability-weighted averageValue with highest probability
CalculationFind cumulative 0.5 pointWeight all valuesFind maximum
UniquenessSingle value (continuous)Single valueCan have multiple
Outlier impactNoneStrongNone
Data typeNumerical onlyNumerical onlyAny (including categorical)
InterpretationMiddle valueAverage outcomeMost likely value
Skewness indicationBetween mode and meanPulled by tailAt peak
,


Robustness Differences


Mean: Vulnerable. One extreme observation can shift it substantially.

Median: Resistant. Values beyond the 50% threshold have no influence.

Mode: Immune. Tail behavior irrelevant unless it creates a new peak.

Income data illustrates this: billionaires inflate the mean drastically while leaving median and mode nearly unchanged.

Selection Criteria


Choose median for:
• Skewed distributions
• Data contaminated by outliers
• Representing a "central" value that's actually achievable
• Reporting typical values when extremes distort the mean

Choose mean for:
• Symmetric data without extreme values
• Leveraging mathematical properties (additivity, scaling)
• Incorporating all observations equally

Choose mode for:
• Categorical outcomes (colors, brands, types)
• Identifying the most frequent occurrence
• Detecting multiple concentration points

Spatial Relationships


Symmetric case: All three occupy the same point at distribution center.

Right-skewed case: Mode sits at the left peak, median slightly right, mean furthest right chasing the tail.

Left-skewed case: Reversed ordering with mean leftmost, mode rightmost.

The median usually falls between the mode and mean in skewed distributions, acting as a compromise measure that balances probability division against probability concentration.
Exponential density with rate 1: mode 0, median ln 2 = 0.69, mean 1xf(x)12340.51f(x) = e^(−x)mode 0median 0.69mean 1half the area left of 0.69the long right tail pulls the meanRight skew: mode < median < mean
Mode, median and mean of a skewed density

The exponential density with rate 1 is highest at 0, so the mode is 0. Half of the area lies left of ln 2 ≈ 0.69, which is the median. The mean is 1: the long right tail carries values far from 0, and the mean weighs their size while the median only counts how many lie on each side.

Mirror the density and the order reverses: mean < median < mode for left skew.

Properties of the Median


The median exhibits specific mathematical behaviors that distinguish it from other central tendency measures.

Minimizes Absolute Deviation


The median minimizes the expected value of absolute deviation:

Properties of the Median
median(X)=arg⁡min⁡mE[∣X−m∣]\text{median}(X) = \arg\min_m E[|X - m|]

Fact: Mean and median within one standard deviation
For any XX with finite variance, ∣μ−m∣≤σ|\mu - m| \leq \sigma, however skewed the distribution. The chain is short: ∣μ−m∣≤E∣X−m∣≤E∣X−μ∣≤σ|\mu - m| \leq E|X - m| \leq E|X - \mu| \leq \sigma, where the middle step is the median's minimizing property.

Among all possible values mm, the median produces the smallest average absolute distance from XX. This contrasts with the mean, which minimizes squared deviations: E[(X−μ)2]E[(X - \mu)^2].

So the two centres answer two different questions about distance. The mean is the best single guess when errors are squared, the median the best when errors count at their plain size. In a skewed distribution the two best guesses move apart, and the long tail decides how far the mean is dragged away from the median.

Transformation Under Linear Operations


For a random variable XX with median mm, consider the transformation Y=aX+bY = aX + b where a≠0a \neq 0.

The median of YY is:

Properties of the Median
median(Y)=a⋅median(X)+b\text{median}(Y) = a \cdot \text{median}(X) + b

Linear transformations shift and scale the median predictably. Multiply by aa, add bb—the middle point moves accordingly.

Example
If XX has median 44, then Y=3X−2Y = 3X - 2 has median 3(4)−2=103(4) - 2 = 10.

Invariance Under Monotonic Transformations


For strictly monotonic functions gg (always increasing or always decreasing):

Properties of the Median
median(g(X))=g(median(X))\text{median}(g(X)) = g(\text{median}(X))

If gg is strictly increasing, it preserves the ordering of values, so the 50th percentile stays at the same relative position.

Example
If XX has median 55, then Y=X2Y = X^2 has median 2525 (assuming X>0X > 0).

Pitfall: Squaring the median when X can be negative
Squaring the median of XX uniform on [−1,1][-1, 1] gives 02=00^2 = 0. But P(X2≤t)=tP(X^2 \leq t) = \sqrt{t}, which reaches 0.50.5 at t=0.25t = 0.25, so the median of X2X^2 is 0.250.25.

The example asks for X>0X > 0 because x2x^2 is strictly increasing only on the positive half of the line. There a larger value of XX always gives a larger value of X2X^2, so the order of the outcomes survives the transformation and the value with half the probability below it keeps its place.

This property holds for the median, and for the mode of a discrete variable, but fails for the mean.

Robustness to Outliers


The median completely ignores values beyond the 50th percentile threshold. Extreme observations in either tail have zero impact on the median as long as they don't cross the middle rank.

Change every value above the median by any amount—the median stays fixed as long as the cumulative probability structure at the 50th percentile remains unchanged.

This makes the median ideal for data with contamination or measurement errors in the tails.

Uniqueness for Continuous Distributions


Continuous distributions with strictly increasing CDFs have exactly one median. The smoothness eliminates ambiguity.

Discrete distributions may have multiple medians when the CDF equals exactly 0.5 at some value.

Relationship to Symmetry


For symmetric distributions centered at cc:

Properties of the Median
median(X)=c=mean(X)\text{median}(X) = c = \text{mean}(X)

Symmetry forces the 50th percentile and the balance point to coincide at the center of symmetry.

Skewed distributions separate median from mean, with the median usually positioned between the mode and mean.

Independence from Distribution Spread


The median reveals nothing about variance or spread. Two distributions can share the same median while having vastly different variability.

Example
Normal distributions N(0,1)N(0, 1) and N(0,100)N(0, 100) both have median 00, yet their standard deviations are 11 and 1010.

The median operates independently of scale—it tracks the probability midpoint, not dispersion.

No Additivity


Unlike the mean, medians don't add:

Properties of the Median
median(X+Y)≠median(X)+median(Y)\text{median}(X + Y) \neq \text{median}(X) + \text{median}(Y)

Even for independent XX and YY, the 50th percentile of the sum doesn't generally equal the sum of individual 50th percentiles.

This limits the median's usefulness in probability calculations involving sums or combinations.

Properties at a Glance


The properties above can be read in any order, but collected into a single grid they show how the median's behavior under transformations and operations contrasts systematically with the mean.
DownloadPNG2×PDF
Layout
PropertyStatementNotes / example
Minimizes absolute deviationmedian(X) = arg minₘ E[|X − m|]mean minimizes squared deviation instead
Linear transformationmedian(aX + b) = a · median(X) + b, a ≠ 0X has median 4 ⟹ 3X − 2 has median 10
Monotonic invariancemedian(g(X)) = g(median(X)) for strictly monotonic gfails for the mean; holds for mode
Robustness to outliersvalues beyond the 50% threshold have zero impactideal for contaminated data, income, housing
Uniqueness (continuous)unique when CDF is strictly increasingmay be an interval if CDF has flat regions
Symmetric distributionsmedian = mean = center of symmetrynormal: all three equal μ
Independent of spreadtwo distributions can share a median yet differ in varianceN(0, 1) and N(0, 100) both have median 0
No additivitymedian(X + Y) ≠ median(X) + median(Y) in generallimits use in sums; mean is additive
Properties of the MedianLearn Math Class

How to Find the Median


The method for finding the median depends on whether the distribution is discrete or continuous.

For Discrete Distributions


Step 1: Calculate the CDF

Compute cumulative probabilities F(k)=P(X≤k)F(k) = P(X \leq k) for each value in the support using the probability mass function.

Step 2: Find where CDF reaches 0.5

Identify the smallest value kk where F(k)≥0.5F(k) \geq 0.5.

Step 3: Verify both conditions

Check that both P(X≤k)≥0.5P(X \leq k) \geq 0.5 and P(X≥k)≥0.5P(X \geq k) \geq 0.5 hold.

Step 4: Handle non-uniqueness

If multiple consecutive values satisfy both conditions, any of them qualifies as a median. Report the smallest value or acknowledge the interval.

Example
Binomial with n=10,p=0.5n = 10, p = 0.5
Compute CDF values for k=0,1,2,…,10k = 0, 1, 2, \ldots, 10. The CDF reaches F(5)=0.623≥0.5F(5) = 0.623 \geq 0.5, and P(X≥5)=0.623≥0.5P(X \geq 5) = 0.623 \geq 0.5.
Median = 55.

Pitfall: Looking for an exact half on a discrete CDF
Requiring F(m)=0.5F(m) = 0.5 here finds no kk, since FF jumps from F(4)≈0.377F(4) \approx 0.377 to F(5)≈0.623F(5) \approx 0.623; interpolating gives 4.54.5, which is not a median. The median is the first kk with F(k)≥0.5F(k) \geq 0.5: m=5m = 5.

Between neighbouring values of the support the CDF of a discrete variable stays flat, and at each value it rises in a single step. The size of each step is the probability of that value, so for the binomial the largest steps sit near the centre of the distribution.

Shortcut for known distributions: Many standard distributions have analytical approximations or tables:
• Geometric: median = ⌈−ln⁡(2)ln⁡(1−p)⌉\lceil \frac{-\ln(2)}{\ln(1-p)} \rceil
• Poisson: median ≈λ\approx \lambda for large λ\lambda

For Continuous Distributions


Step 1: Write the CDF

Start with the cumulative distribution function F(x)=P(X≤x)F(x) = P(X \leq x).

Step 2: Set equation to 0.5

Solve F(m)=0.5F(m) = 0.5 for mm.

Step 3: Solve algebraically

Use inverse CDF when it exists: m=F−1(0.5)m = F^{-1}(0.5).

Rearrange the equation to isolate mm and solve directly.

Step 4: Apply numerical methods if needed

When no closed form exists, use root-finding algorithms:
• Bisection method
• Newton-Raphson method
• Built-in quantile functions in statistical software

Example: Exponential distribution with rate λ\lambda

The CDF is F(x)=1−e−λxF(x) = 1 - e^{-\lambda x}.

Setting F(m)=0.5F(m) = 0.5:

How to Find the Median
1−e−λm=0.51 - e^{-\lambda m} = 0.5

How to Find the Median
e−λm=0.5e^{-\lambda m} = 0.5

How to Find the Median
−λm=ln⁡(0.5)-\lambda m = \ln(0.5)

How to Find the Median
m=−ln⁡(0.5)λ=ln⁡(2)λm = \frac{-\ln(0.5)}{\lambda} = \frac{\ln(2)}{\lambda}

Median = ln⁡(2)λ\frac{\ln(2)}{\lambda}.

Example
Normal distribution with parameters μ,σ\mu, \sigma
By symmetry, the median equals the mean:
Median = μ\mu.
No calculation needed for symmetric distributions.

Using Statistical Software


Modern software provides built-in median functions.

These functions implement the inverse CDF method automatically.

From Sample Data


When working with observed data rather than theoretical distributions:

Step 1: Sort the data

Arrange values in ascending order: x1≤x2≤⋯≤xnx_1 \leq x_2 \leq \cdots \leq x_n.

Step 2: Find the middle

For odd sample size nn: median = x(n+1)/2x_{(n+1)/2}

For even sample size nn: median = xn/2+xn/2+12\frac{x_{n/2} + x_{n/2+1}}{2}

Example
Data {3,7,1,9,5}\{3, 7, 1, 9, 5\}
Sorted: {1,3,5,7,9}\{1, 3, 5, 7, 9\}
Median = 55 (middle value).

Example
Data {3,7,1,9}\{3, 7, 1, 9\}
Sorted: {1,3,7,9}\{1, 3, 7, 9\}
Median = 3+72=5\frac{3 + 7}{2} = 5.

Pitfall: Forgetting to sort the data
Taking the middle entry as recorded: for {3,7,1,9,5}\{3, 7, 1, 9, 5\} the third entry is 11. Sorted, the list is {1,3,5,7,9}\{1, 3, 5, 7, 9\} and the median is 55.

In both examples the median's place in the list is set by the sample size alone: position n+12\frac{n+1}{2}, which is the third value for n=5n = 5 and falls halfway between the second and third for n=4n = 4. The values themselves decide only what sits at that place.

Visual Methods


For quick estimation:

Discrete: Examine the cumulative probability plot, find where steps cross 0.5

Continuous: Locate the area split point on the PDF curve where left area equals right area

Visual methods provide intuition but lack precision for formal analysis.

To find the median of your own data set, along with the mean, mode and quartiles, use the statistics calculator.
0.00.20.40.60.81.0-4-3.0-2.0-1.0-0.01.02.03.04.0xF(x) = P(X ≤ x)
Normal CDF, mean 0, standard deviation 1

Finding a continuous median means solving F(m) equal to one half; for a symmetric density such as the normal the solution is the centre of symmetry, here 0, where the S-curve passes through one half. Skewed families put the median away from the mean. Read the crossing point on the continuous CDF visualizer.

The cases above as one map: sample data, a discrete distribution and a continuous one, with the continuous case split by how much algebra it needs.
DownloadPNG2×PDF
every route at once
finding the median

Which way to the median?

Data or a distribution first; for a distribution, discrete or continuous decides the method.
sample datayesnoa distributiondiscretecontinuousyesnoyesno
The middle value
sort, then take x(n+1)/2x_{(n+1)/2}→ How to find the median
{3, 7, 1, 9, 5} → sorted {1, 3, 5, 7, 9} → 5
Average the two middle values
sort, then take (xn/2+xn/2+1)/2(x_{n/2} + x_{n/2+1})/2→ How to find the median
{3, 7, 1, 9} → (3 + 7)/2 = 5
Is the sample size n odd?after sorting the values
First k with F(k) ≥ 0.5
check both P(X ≤ k) ≥ 0.5 and P(X ≥ k) ≥ 0.5→ Discrete distributions
binomial, n = 10, p = 0.5 → median 5
The centre of symmetry
no calculation needed→ Continuous distributions
normal with mean μ → median μ
Solve F(m) = 0.5
use the inverse CDF: m = F⁻¹(0.5)→ Continuous distributions
exponential with rate λ → m = ln(2)/λ
Find the root numerically
bisection, Newton–Raphson, or a software quantile function→ Continuous distributions
Can F(m) = 0.5 be solved by algebra?
Symmetric?
Discrete or continuous?
StartWhat is given?
Which way to the median?·/probability/medianLearn Math Class
Only the discrete route looks for an inequality instead of an equation. A discrete CDF jumps past 0.50.5 rather than meeting it, so F(m)=0.5F(m) = 0.5 usually has no solution there; the common mistakes show what goes wrong when the continuous rule is used on a discrete variable.
The percentile view generalises this from one half to any level.

Median as the 50th Percentile


The median is the 50th percentile of a distribution—the value below which 50% of the probability lies.

Percentiles and Quantiles


A percentile divides a distribution at a specific cumulative probability. The pp-th percentile is the value xpx_p where:

Median as the 50th Percentile
P(X≤xp)=p100P(X \leq x_p) = \frac{p}{100}

The median is the special case where p=50p = 50:

Median as the 50th Percentile
P(X≤m)=0.5P(X \leq m) = 0.5

Quantiles use fractional notation instead of percentages. The 0.5-quantile equals the 50th percentile equals the median.

Relationship to Quartiles


Quartiles divide the distribution into four equal parts:

• First quartile Q1Q_1 (25th percentile): P(X≤Q1)=0.25P(X \leq Q_1) = 0.25
• Second quartile Q2Q_2 (50th percentile): P(X≤Q2)=0.5P(X \leq Q_2) = 0.5 — this is the median
• Third quartile Q3Q_3 (75th percentile): P(X≤Q3)=0.75P(X \leq Q_3) = 0.75

The median sits at the center of the quartile structure, with equal probability mass on each side.

Five-Number Summary


The median anchors the five-number summary used in descriptive statistics:

Median as the 50th Percentile
Minimum, Q1, Median, Q3, Maximum\text{Minimum, } Q_1, \text{ Median, } Q_3, \text{ Maximum}

This summary captures distribution shape through five key positions. Box plots visualize this summary, displaying the median as the central line inside the box.

Interquartile Range


The interquartile range (IQR) measures spread using quartiles:

Median as the 50th Percentile
IQR=Q3−Q1\text{IQR} = Q_3 - Q_1

This range contains the middle 50% of the distribution, centered at the median. The IQR provides a robust measure of spread that ignores extreme values, complementing the median's role as a robust measure of center.

General Percentile Formula


For continuous distributions, the pp-th percentile solves:

Median as the 50th Percentile
F(xp)=pF(x_p) = p

Using the inverse CDF:

Median as the 50th Percentile
xp=F−1(p)x_p = F^{-1}(p)

The median is F−1(0.5)F^{-1}(0.5).

For discrete distributions, the pp-th percentile is the smallest value xx where:

Median as the 50th Percentile
P(X≤x)≥pP(X \leq x) \geq p

Extension to Other Percentiles


Beyond quartiles, distributions can be divided into:

• Deciles: 10th, 20th, ..., 90th percentiles (divide into 10 parts)
• Percentiles: 1st through 99th percentiles (divide into 100 parts)
• Any quantile: solve F(x)=qF(x) = q for any 0<q<10 < q < 1

The median generalizes to arbitrary probability splits. Just as the median splits at 0.5, other percentiles split at different thresholds.

Why the 50th Percentile Matters


The 50th percentile is unique among percentiles:

• Divides probability exactly in half
• Minimizes absolute deviation E[∣X−m∣]E[|X - m|]
• Robust to extreme values in either tail
• Natural midpoint for symmetric distributions

Other percentiles describe spread or tail behavior, but the median describes central location through probability balance.

Computing Other Percentiles


The same methods used to find the median apply to any percentile:

Continuous: Solve F(xp)=pF(x_p) = p or use xp=F−1(p)x_p = F^{-1}(p)

Discrete: Find smallest xx where P(X≤x)≥pP(X \leq x) \geq p

Statistical software provides quantile functions: qnorm(p) in R, ppf(p) in Python's scipy.stats.

Median vs Mean in Percentile Context


The mean is not a percentile—it's a weighted average, not a cumulative probability threshold.

The median answers "what value splits the distribution?" The mean answers "what is the balance point?" These are fundamentally different questions that happen to coincide for symmetric distributions.

Median for Common Distributions


The median takes characteristic values across common distribution families. Some families admit a clean closed form, others reduce to numerical evaluation of the CDF, and a few — like the Cauchy — have a well-defined median even when the mean does not exist. The reference below collects every distribution discussed throughout this page so the formulas, the structural type (discrete vs continuous), and the relevant caveats sit in one place.
DownloadPNG2×PDF
Layout
DistributionTypeMedianNotes
Discrete Uniform on {a, ..., b}discrete(a + b)/2 when a + b is eventwo valid medians when a + b is odd
Binomial(n, p)discrete≈ np (no closed form)numerical CDF lookup for exact value
Geometric(p)discrete⌈−ln(2) / ln(1 − p)⌉rare closed form among discrete distributions
Negative Binomial(r, p)discreteno closed formnumerical CDF required
Hypergeometric(N, K, n)discreteno closed formnumerical evaluation required
Poisson(λ)discrete≈ λ + 1/3 − 0.02/λ (large λ)numerical for small λ
Continuous Uniform on [a, b]continuous(a + b)/2midpoint of the interval; = mean
Normal(μ, σ)continuousμ= mean = mode by symmetry
Exponential(λ)continuousln(2)/λ ≈ 0.693/λstrictly below the mean 1/λ
Beta(α, β)continuous0.5 when α = β; else no closed formnumerical for general α, β
Gamma(k, θ)continuousln(2)/θ when k = 1; else numericalreduces to exponential at k = 1
Weibull(k, λ)continuousλ (ln 2)1/k^{1/k}closed form for any shape k
Cauchy(x₀, γ)continuousx₀mean does not exist; median still well-defined
Lognormal(μ, σ)continuouseμ^{μ}strictly below the mean eμ+σ2/2^{μ + σ²/2}
Median for Common DistributionsLearn Math Class

Special Cases and Edge Cases


Certain distributions exhibit unusual median behavior that deviates from standard patterns.

Distributions Where Median Equals Mean


Symmetric distributions have medians at their center of symmetry, which coincides with the mean.

Normal: median = mean = μ\mu

Uniform distributions: median = mean = a+b2\frac{a+b}{2}

Any distribution with mirror symmetry around a point cc has median = mean = cc.

Distributions Where Median Differs Substantially from Mean


Skewed distributions separate median and mean significantly.

Exponential: median = ln⁡(2)λ≈0.693/λ\frac{\ln(2)}{\lambda} \approx 0.693/\lambda, mean = 1λ\frac{1}{\lambda}

The gap is approximately 0.307/λ0.307/\lambda. For λ=1\lambda = 1, median ≈0.693\approx 0.693 while mean =1= 1.

Lognormal: Highly right-skewed with median << mean. The median is eμe^\mu while the mean is eμ+σ2/2e^{\mu + \sigma^2/2}, which can be orders of magnitude larger.

Non-Unique Medians in Discrete Distributions


Discrete Uniform on even number of values has two medians.

Example
Uniform on {1,2,3,4}\{1,2,3,4\} has medians at both 22 and 33 since the CDF equals exactly 0.50.5 at 22.

Binomial can have two medians when the CDF equals exactly 0.50.5 at some value.

Distributions with No Mean but Well-Defined Median


Cauchy Distribution: The median equals the location parameter x0x_0, but the mean does not exist due to heavy tails.

The median provides a measure of central tendency when the mean fails.

Student's t-distribution with ν=1\nu = 1 (Cauchy): median = 00, mean undefined.

Median at Distribution Boundaries


Some distributions can have medians at the edge of their support.

Degenerate distribution at cc: Every observation equals cc, so median = cc trivially.

Beta distributions with extreme skew can push the median very close to boundaries 00 or 11, though typically not exactly at them unless the distribution degenerates.

Multiple Medians in Continuous Distributions


Continuous distributions with flat CDF regions (constant over an interval) have infinitely many medians.

If F(x)=0.5F(x) = 0.5 for all x∈[a,b]x \in [a,b], then every value in [a,b][a,b] qualifies as a median.

This occurs in pathological constructed distributions, not in standard families.

Median When Support Changes


Truncated distributions alter the median by restricting the support.

Truncating the normal distribution to [0,∞)[0, \infty) shifts the median away from μ\mu toward positive values since negative values are removed.

The median of the truncated distribution must be recalculated using the new CDF on the restricted support.

Mixture Distributions


Combining distributions can create medians that don't match either component.

Mixture: 0.5⋅N(0,1)+0.5⋅N(10,1)0.5 \cdot N(0,1) + 0.5 \cdot N(10,1)

The median falls near 55 (the midpoint between the two modes), despite neither component having a median near 55.

Median for Discrete Distributions with Gaps


Distributions with gaps in the support (missing values) require careful CDF evaluation.

Example
Support {1,2,5,6}\{1, 2, 5, 6\} with equal probabilities. The CDF jumps from 0.50.5 at k=2k=2 to 0.750.75 at k=5k=5. Every value in [2,5][2, 5] meets the median conditions; reported as the smallest qualifying value, the median is 22.

When Median Analysis Fails


For distributions with no clear cumulative structure or undefined CDFs, the median concept becomes meaningless.

Empirical data with heavy discretization or rounding may show artificial median values that don't reflect the underlying continuous distribution.

Edge Cases at a Glance


The table below collects the patterns above into a single reference, pairing each edge case with the structural condition that produces it and a concrete example.
DownloadPNG2×PDF
Layout
Edge caseWhen it occursExample
Median = meandistribution is symmetric around a pointnormal: median = mean = μ
Median ≪ meanstrong right skew or heavy right taillognormal: median eμ^{μ} ≪ mean eμ+σ2/2^{μ + σ²/2}
Non-unique discrete medianCDF lands exactly on 0.5 at a support valuediscrete uniform on {1, 2, 3, 4}: medians at 2 and 3
Median exists, mean doesn'theavy-tailed distribution with undefined first momentCauchy: median = x₀; mean undefined
Median shifts under truncationsupport is restricted, removing probability mass from one sidenormal truncated to [0, ∞): median > μ
Median far from peaksmixture of well-separated components0.5 · N(0, 1) + 0.5 · N(10, 1): median ≈ 5, between the two modes
Infinitely many mediansCDF is flat over an interval at level 0.5pathological constructed densities only
Special Cases and Edge CasesLearn Math Class

Median Notation

Notation

Median Notation

Half the probability on each side is the concept; the marks for it never settled into one symbol. This section fixes the three families in circulation — the spelled-out operator, the tilde that marks a sample estimate, and the quantile spellings that make the median one value of a larger function. All of them are catalogued among the probability symbols.
P(⋅)P(\cdot) and the variable letters come from the probability function and random variable notation; FF from CDF notation; the mean's μ\mu, E[X]E[X] and xˉ\bar{x} from expected value notation.
median⁡(X)\operatorname{median}(X), Med⁡(X)\operatorname{Med}(X), mm
the median of X
The operator spelling, written out or abbreviated — upright, like Var⁡\operatorname{Var} and Cov⁡\operatorname{Cov} — plus the bare letter mm for the value itself. The defining inequality pair lives in Median for Discrete Distributions above; the notation here names the number those two conditions pin down.
CasesLowercase med⁡(X)\operatorname{med}(X) in journal shorthand; and the caveat the field itself admits: unlike variance with its settled σ2\sigma^2 and Var⁡\operatorname{Var}, the median has no universally adopted symbol — careful technical writing defines its choice explicitly, and a reader should expect the convention to change between sources.
Do not confuseThe letter mm at its other jobs. Nothing reserves mm — the same problem may hand it to a slope, a count or a bound; when the median genuinely matters, the operator spelling removes the ambiguity the single letter invites.
x~\tilde{x}
x-tilde — the sample median
A tilde stacked over the letter marks the median's side of the population/estimate line: x~\tilde{x} is to the sample as xˉ\bar{x} is to μ\mu — the pairing expected value notation draws for the mean; μ~\tilde{\mu} appears when a text wants the population median wearing Greek.
CasesFrom sorted data the sample median reads off the order statistics — parenthesized subscripts x(k)x_{(k)} mean "kk-th smallest" — as x((n+1)/2)x_{((n+1)/2)} for odd nn, and by the averaging convention 12(x(n/2)+x(n/2+1))\tfrac{1}{2}\left(x_{(n/2)} + x_{(n/2+1)}\right) for even nn; the average is a convention, not a theorem.
Same glyph elsewhereThe same squiggle between symbols is the distribution declaration X∼FX \sim F of random variable notation — position decides the job: over a letter it estimates, between letters it declares.
Q2=F−1(0.5)Q_2 = F^{-1}(0.5)
the second quartile — F-inverse at one half
The median in its quantile uniforms: second quartile Q2Q_2 of the Q1,Q2,Q3Q_1, Q_2, Q_3 family, the 0.50.5-quantile x0.5x_{0.5} (also written Q0.5Q_{0.5}), the 50th percentile — Median as the 50th Percentile above walks the equivalence. F−1F^{-1} inverts the CDF: a probability goes in, a value comes back.
CasesThe −1^{-1} is the inverse-function label, not a reciprocal — and for a discrete or plateaued FF no literal inverse exists, so the quantile function means the smallest xx with F(x)≥0.5F(x) \ge 0.5, which is exactly why the discrete definition above needs two inequalities instead of one equation.
Do not confuseThe subscripts of Q2Q_2 and Q0.5Q_{0.5}. One counts cut points — second of the three quartiles — and the other states a probability; the two conventions sit one keystroke apart and name the same value by different logic.
DownloadPNG2×PDF
Notation · Cheat sheet
Expectation and Spread: Notation at a Glance
The marks from the notation cards across the pages on expected value, variance, covariance, median and mode: how each is read and what it means. Every group links to the full card on its page.
Expected value
E[X],  E[X]E[X], \; \mathbb{E}[X]
the expected value of X
Takes a whole random variable, returns one number.
μ\mu
mu, the mean
The same number as a constant: μ=E[X]\mu = E[X].
E[g(X)]E[g(X)]
expected value of g of X
Weights g(x)g(x), not xx; in general not g(E[X])g(E[X]).
Variance
Var⁡(X)\operatorname{Var}(X)
the variance of X
The expected squared distance from the mean.
σ2\sigma^2
sigma squared
The variance as a constant; never negative.
σ,  SD⁡(X)\sigma, \; \operatorname{SD}(X)
the standard deviation
The square root of the variance, in the units of XX.
Covariance
Cov⁡(X,Y)\operatorname{Cov}(X, Y)
the covariance of X and Y
How two variables move together.
σXY\sigma_{XY}
sigma X Y
The covariance as a constant; σXX=σX2\sigma_{XX} = \sigma_X^2.
ρXY\rho_{XY}
rho, the correlation
Covariance over σXσY\sigma_X\sigma_Y: always in [−1,1][-1, 1].
MedianThis page
median⁡(X),  m\operatorname{median}(X), \; m
the median of X
The middle value: half the probability on each side.
x~\tilde{x}
x tilde
The sample median, as xˉ\bar{x} is the sample mean.
Q2=F−1(0.5)Q_2 = F^{-1}(0.5)
the second quartile
The median as the 0.50.5 quantile.
Mode
mode⁡(X)\operatorname{mode}(X)
the mode of X
The most likely value.
arg⁡max⁡xf(x)\arg\max_x f(x)
where f is largest
The location of the peak, not its height.
{k1,…,km}\{k_1, \ldots, k_m\}
several modes
Braces when values tie: the mode need not be unique.
Same marks, different job
xˉ\bar{x} vs x~\tilde{x}The bar marks the sample mean, the tilde the sample median.
σ2\sigma^2 vs σ\sigmaVariance in squared units against standard deviation in the units of XX.
max⁡\max vs arg⁡max⁡\arg\maxThe height of the peak against where it stands.
F−1F^{-1}The quantile function, not 1F\frac{1}{F}.
Expectation and Spread: Notation at a Glance·/probability/expected-valueLearn Math Class

Formula Summary

This summary sorts the formulas of the page into four families: finding the median, comparing it with the mean and the mode, its properties, and percentiles. Each family has a line on what it covers, and each formula a note on when it applies with a link to the section that explains it. The buttons above the cards show one family at a time.

The first family gives the two conditions for a discrete median, the equation for a continuous one in two forms, and the exponential median. The second orders the three centres under right and left skew. The third covers the minimizing property, symmetry, transformations and the failure of additivity. The last places the median among percentiles.
DownloadPNG2×PDF
Finding the median4 formulas
The conditions a median must meet, for discrete and for continuous variables.
P(X≤m)≥0.5andP(X≥m)≥0.5P(X \leq m) \geq 0.5 \quad \text{and} \quad P(X \geq m) \geq 0.5
The discrete median needs both conditions, since the CDF may jump past one half; see discrete distributions.
F(m)=P(X≤m)=0.5F(m) = P(X \leq m) = 0.5
For a continuous variable the CDF crosses one half at the median, as continuous distributions shows.
∫−∞mf(x)dx=0.5\displaystyle \int_{-\infty}^{m} f(x)dx = 0.5
The same condition written with the density: half of the area lies to the left of mm (continuous distributions).
m=ln⁡(2)λ\displaystyle m = \frac{\ln(2)}{\lambda}
The exponential median, solved step by step in how to find the median.
Against the mean and the mode2 formulas
Where the three centres sit when a distribution is skewed; under symmetry they coincide.
mode<median<mean\text{mode} < \text{median} < \text{mean}
Right skew: the long tail of large values drags the mean furthest (median, mean and mode compared).
mean<median<mode\text{mean} < \text{median} < \text{mode}
Left skew reverses the order, from the same comparison.
Properties5 formulas
How the median behaves under transformations and sums.
median(X)=arg⁡min⁡mE[∣X−m∣]\text{median}(X) = \arg\min_m E[|X - m|]
The median minimizes the average absolute distance, as properties of the median explains.
median(X)=c=mean(X)\text{median}(X) = c = \text{mean}(X)
For a distribution symmetric about cc, median and mean coincide at the centre (properties).
median(Y)=a⋅median(X)+b\text{median}(Y) = a \cdot \text{median}(X) + b
For Y=aX+bY = aX + b with a≠0a \neq 0, the median shifts and scales with the data (properties).
median(g(X))=g(median(X))\text{median}(g(X)) = g(\text{median}(X))
Holds for strictly monotonic gg, which keeps the order of values, as properties of the median shows.
median(X+Y)≠median(X)+median(Y)\text{median}(X + Y) \neq \text{median}(X) + \text{median}(Y)
Medians do not add, even for independent variables (properties).
Percentiles4 formulas
The median as the 50th percentile, and the same idea at other levels.
P(X≤xp)=p100\displaystyle P(X \leq x_p) = \frac{p}{100}
The pp-th percentile; the median is the case p=50p = 50 (median as the 50th percentile).
IQR=Q3−Q1\text{IQR} = Q_3 - Q_1
The spread of the middle half of the distribution, centred at the median (the 50th percentile).
F(xp)=p,xp=F−1(p)F(x_p) = p, \quad x_p = F^{-1}(p)
A continuous percentile solves the CDF equation or reads the inverse CDF, from the 50th percentile.
P(X≤x)≥pP(X \leq x) \geq p
A discrete percentile is the smallest xx meeting this condition (the 50th percentile).
Median formulas·All probability formulasLearn Math Class
For a continuous variable, finding the median means solving one equation; for a discrete one, check both conditions, since a flat stretch of the CDF can make a whole interval qualify. The properties then carry the median through transformations, but never through sums.

Common Mistakes


Several recurring errors appear when working with the median.

Confusing Median with Mean


The two measures are fundamentally different:

Median = 50th percentile

Mean = weighted average

Using "median" when you mean "average" is incorrect. The median identifies the middle value by probability rank, not the balance point of all values.

Assuming Median Always Equals Mean


The median equals the mean only for symmetric distributions.

Skewed distributions separate them substantially. Exponential distributions have median far below the mean.

Never assume equality without checking distribution symmetry.

Forgetting the Two-Condition Rule for Discrete Distributions


Discrete distributions require both P(X≤m)≥0.5P(X \leq m) \geq 0.5 and P(X≥m)≥0.5P(X \geq m) \geq 0.5.

Checking only one condition can give incorrect results when the CDF jumps past 0.5.

Always verify both conditions hold.

Assuming the Median is Always Unique


Discrete distributions can have multiple medians when the CDF lands exactly on 0.5.

Example
Discrete Uniform on {1,2,3,4}\{1,2,3,4\} has both 22 and 33 as valid medians.

Never assume exactly one median without checking the probability structure.

Computing Median from PMF Instead of CDF


The median requires cumulative probability, not individual probabilities.

Finding the median from the PMF directly without accumulation leads to errors.

Always work with the CDF when locating the median.

Thinking Median Must Be in the Dataset


For continuous distributions, the median is any value satisfying F(m)=0.5F(m) = 0.5, which may not appear in observed data.

For even-sized samples, the sample median is often the average of two middle values, creating a median not present in the original dataset.

The median is a calculated position, not necessarily an observed value.

Using Median When Mean is More Appropriate


The median is ideal for skewed data and outlier resistance, but the mean has superior mathematical properties for symmetric distributions.

The mean supports algebraic operations (additivity, scaling) that the median lacks.

Choose based on distribution shape and analysis goals, not by default.

Assuming Median is Always "Central"


The median marks the 50th percentile, which may not align with intuitive notions of "center."

For highly skewed distributions, the median sits far from the mode or the bulk of probability mass.

The median represents probability division, not necessarily spatial centrality.

Confusing Median with Mode


Median = probability split point

Mode = peak probability

These are distinct concepts. The Exponential distribution has mode at 00 but median at ln⁡(2)λ\frac{\ln(2)}{\lambda}.

Never use the terms interchangeably.

Treating Sample Median as Population Median


The median observed in finite data may not reflect the true population median, especially with small samples.

Sampling variability affects median estimation. Confidence intervals help quantify uncertainty.

Large samples and clear distribution structure increase reliability.

Ignoring Median for Ordinal or Ranked Data


When data is naturally ranked but not numerically meaningful (like satisfaction ratings), the median often provides more interpretable results than the mean.

Calculating a mean of {\{poor, fair, good, excellent}\} coded as {1,2,3,4}\{1,2,3,4\} assumes equal spacing that may not exist. The median respects the ordering without assuming equal intervals.

Taking the middle of the listed values

The support of a discrete variable is written in order, and the value in the middle of that list is taken as the median, as if every value had the same probability.

Wrong working, for values 1,2,3,4,51, 2, 3, 4, 5 with probabilities 0.4,0.3,0.1,0.1,0.10.4, 0.3, 0.1, 0.1, 0.1:
middle of {1,2,3,4,5}=3\text{middle of } \{1, 2, 3, 4, 5\} = 3


Right working: accumulate the probabilities and stop at the first value where the total reaches 0.50.5.
F(1)=0.4,F(2)=0.4+0.3=0.7≥0.5F(1) = 0.4, \quad F(2) = 0.4 + 0.3 = 0.7 \geq 0.5

Both conditions hold at 22: P(X≤2)=0.7P(X \leq 2) = 0.7 and P(X≥2)=0.6P(X \geq 2) = 0.6. The median is 22.

Why it happens: for a list of data, or for a uniform distribution, the middle position is the median, and the habit carries over to distributions whose values carry unequal weights.

How to check: at the proposed median, add the probabilities on each side. At 33, P(X≥3)=0.3P(X \geq 3) = 0.3, which is below 0.50.5, so 33 fails the second condition.

Setting the density equal to one half

For a continuous variable, the condition "half the probability" is applied to the density ff instead of to the CDF FF.

Wrong working, for the exponential distribution with λ=2\lambda = 2:
2e−2m=0.5  ⟹  e−2m=0.25  ⟹  m=ln⁡42≈0.6932e^{-2m} = 0.5 \implies e^{-2m} = 0.25 \implies m = \frac{\ln 4}{2} \approx 0.693


Right working: the area to the left of mm must be one half.
1−e−2m=0.5  ⟹  e−2m=0.5  ⟹  m=ln⁡22≈0.3471 - e^{-2m} = 0.5 \implies e^{-2m} = 0.5 \implies m = \frac{\ln 2}{2} \approx 0.347


Why it happens: for a discrete variable the probabilities are read straight from the PMF, and the density looks like the continuous version of it. But a density value is not a probability; only areas under the density are.

How to check: put the answer back into the CDF. F(0.693)=1−e−1.386=1−0.25=0.75F(0.693) = 1 - e^{-1.386} = 1 - 0.25 = 0.75, so three quarters of the probability lies below the wrong answer, not half.

Squaring the median when X can be negative

The rule median(g(X))=g(median(X))\text{median}(g(X)) = g(\text{median}(X)) is applied with g(x)=x2g(x) = x^2 to a variable that takes both negative and positive values, where x2x^2 is not monotonic.

Wrong working, for XX uniform on [−1,1][-1, 1]:
median(X)=0  ⟹  median(X2)=02=0\text{median}(X) = 0 \implies \text{median}(X^2) = 0^2 = 0


Right working: find the CDF of Y=X2Y = X^2 directly. For 0≤t≤10 \leq t \leq 1:
P(X2≤t)=P(−t≤X≤t)=2t2=tP(X^2 \leq t) = P(-\sqrt{t} \leq X \leq \sqrt{t}) = \frac{2\sqrt{t}}{2} = \sqrt{t}

Setting t=0.5\sqrt{t} = 0.5 gives t=0.25t = 0.25, so the median of X2X^2 is 0.250.25.

Why it happens: the rule is stated for strictly monotonic gg, and squaring is usually met on positive numbers, where it is increasing. On [−1,1][-1, 1] it folds the negative half onto the positive one, so values from both ends of XX land at the top of X2X^2.

How to check: X2X^2 is never negative, so a median of 00 would need half the probability at or below 00. But P(X2≤0)=P(X=0)=0P(X^2 \leq 0) = P(X = 0) = 0.

Looking for an exact half on a discrete CDF

The continuous condition F(m)=0.5F(m) = 0.5 is applied to a discrete variable, whose CDF rises in steps and usually never takes the value 0.50.5.

Wrong working, for the binomial with n=10n = 10, p=0.5p = 0.5:
F(4)≈0.377,F(5)≈0.623F(4) \approx 0.377, \quad F(5) \approx 0.623

No kk gives F(k)=0.5F(k) = 0.5, so either the median is declared not to exist, or the two values are interpolated:
m=4+0.5−0.3770.623−0.377=4.5m = 4 + \frac{0.5 - 0.377}{0.623 - 0.377} = 4.5


Right working: take the first value where the CDF reaches or passes 0.50.5, and check both conditions there.
F(5)≈0.623≥0.5,P(X≥5)=1−F(4)≈0.623≥0.5F(5) \approx 0.623 \geq 0.5, \quad P(X \geq 5) = 1 - F(4) \approx 0.623 \geq 0.5

The median is 55.

Why it happens: F(m)=0.5F(m) = 0.5 is the first definition most learners meet, and it works in every continuous example. For a discrete variable the CDF jumps over 0.50.5 between two neighbouring values.

How to check: test both conditions at the answer. At 4.54.5, P(X≤4.5)=F(4)≈0.377P(X \leq 4.5) = F(4) \approx 0.377, which is below one half, so 4.54.5 is not a median.

Forgetting to sort the data

The sample median is read from the middle position of the data as they were recorded, before the values are put in order.

Wrong working, for the data {3,7,1,9,5}\{3, 7, 1, 9, 5\}: with n=5n = 5 the middle position is the third, and the third entry is 11.

Right working: sort first, then take the middle position.
{1,3,5,7,9}  ⟹  median=5\{1, 3, 5, 7, 9\} \implies \text{median} = 5


Why it happens: the position formula n+12\frac{n+1}{2} is applied mechanically. It gives a position, and a position only means something in a sorted list.

How to check: count the values on each side of the answer. With 11 there are no values below it and four above, while a median of five values has two on each side.

Pitfalls at a Glance


The table below packages the most frequent errors into a single reference, pairing each mistake with the underlying confusion and the correct view.
DownloadPNG2×PDF
Layout
MistakeWhy it's wrongCorrect view
Treating median as the averagemedian is a percentile rank, not a weighted sumuse mean for averages, median for the 50% split
Assuming median = mean alwaysonly true for symmetric distributionscheck symmetry; skew separates them substantially
Checking only one inequality (discrete)CDF can jump past 0.5 without landing on itverify both P(X ≤ m) ≥ 0.5 and P(X ≥ m) ≥ 0.5
Assuming uniquenessdiscrete distributions can have multiple mediansinspect the CDF behavior near 0.5
Reading median off the PMF peakmedian depends on cumulative probability, not individual valuesuse the CDF; the peak is the mode
Expecting median to be in the datasetmedian is a calculated position, not necessarily an observed valuefor even n, sample median averages the two middle values
Confusing median with modemedian = probability split; mode = peakexponential has mode 0 but median ln(2)/λ
Treating sample median as population mediansmall samples vary substantiallyuse confidence intervals; larger samples are more reliable
Common MistakesLearn Math Class

Related Concepts


The median connects to numerous other probability and statistics concepts.

Other Measures of Central Tendency


Mean (Expected Value): The probability-weighted average of all values. Balances the distribution.

Mode: The value with maximum probability or density. Identifies the peak.

These three measures work together to characterize where distributions center and how they're shaped.

Measures of Dispersion


Variance: Quantifies spread around the mean. High variance means values scatter widely.

Interquartile Range (IQR): Measures spread using quartiles: Q3−Q1Q_3 - Q_1. Robust to outliers like the median.

The median reveals the center while dispersion measures reveal spread. Both are needed for complete distribution description.

Percentiles and Quantiles


The median is the 50th percentile or 0.5-quantile. It generalizes to other probability thresholds:

Quartiles: Q1Q_1 (25th), Q2Q_2 (median), Q3Q_3 (75th)

Deciles: 10th, 20th, ..., 90th percentiles

Any quantile qq: solves F(x)=qF(x) = q

Percentiles divide probability by cumulative area; the median is the special case at 0.5.

Cumulative Distribution Function


CDF: The median solves F(m)=0.5F(m) = 0.5.

The inverse CDF F−1F^{-1} maps probabilities to values: m=F−1(0.5)m = F^{-1}(0.5).

Understanding the CDF is essential for finding medians.

Probability Functions


Probability Mass Function (PMF): For discrete distributions, accumulating the PMF gives the CDF needed to find the median.

Probability Density Function (PDF): For continuous distributions, integrating the PDF to 0.5 locates the median.

The median depends on cumulative structure, not pointwise probabilities or densities directly.

Skewness


Skewness measures asymmetry. The relative positions of median, mean, and mode directly indicate skewness direction:

Right skew: mode << median << mean

Left skew: mean << median << mode

Symmetric unimodal: mode = median = mean

Specific Distribution Families


Discrete Distributions: Binomial, Geometric, Poisson, and others each have characteristic median behaviors.

Continuous Distributions: Normal, Exponential, Beta, and others show diverse median patterns.

Understanding distribution-specific medians helps identify which model fits observed data.

Robustness


The median is a robust statistic—resistant to outliers and extreme values.

Median Absolute Deviation (MAD): A robust measure of spread based on the median: MAD=median(∣X−median(X)∣)\text{MAD} = \text{median}(|X - \text{median}(X)|).

Robust methods use the median as a foundational concept for estimation in contaminated data.

Order Statistics


In a sample of size nn, the median is the middle order statistic.

For odd nn: median is the n+12\frac{n+1}{2}-th smallest value

For even nn: median is the average of the n2\frac{n}{2}-th and n2+1\frac{n}{2}+1-th smallest values

Order statistics formalize ranking and selection procedures.

Optimization


The median minimizes absolute deviation: E[∣X−m∣]E[|X - m|] is minimized at the median.

The mean minimizes squared deviation: E[(X−μ)2]E[(X - \mu)^2] is minimized at the mean.

These optimization properties distinguish the two measures fundamentally.

Median at a Glance

The table below condenses the central facts about the median — what it is, how to compute it in the discrete and continuous cases, how it lines up against the mean and the mode, the properties that define it, and the contexts in which it is the right tool versus the wrong one — into a single quick-reference card.
DownloadPNG2×PDF
Layout
AspectStatementExample / note
What it isthe value that splits total probability into two equal halvesthe 50th percentile of the distribution
Discrete casesmallest m with P(X ≤ m) ≥ 0.5 and P(X ≥ m) ≥ 0.5may be non-unique when the CDF lands on 0.5
Continuous casesolve F(m) = 0.5, or use m = F⁻¹(0.5)exponential: m = ln(2)/λ
Vs other measuresa rank-based center, not a weighted balance point or peakright-skewed: mode < median < mean
Symmetric vs skewedequals mean and mode under symmetry; sits between them under skewnormal: median = μ; exponential: median < mean
Defining propertyminimizes E[|X − m|]; invariant under monotonic transformationsmedian(g(X)) = g(median(X)) for strictly monotonic g
When it shinesskewed data, outlier resistance, ordinal dataincome, housing prices, satisfaction ratings
When it's weakno additivity; reveals nothing about spread; algebra is awkwardmedian(X + Y) ≠ median(X) + median(Y)
Median at a GlanceLearn Math Class

Skills You Should Learn

Each skill opens its step-by-step method page. Skills marked "On this page" are taught above.
Taught on this page
Random variable methods

Median FAQ

Can a distribution have multiple medians?

+
Yes, though it takes a specific setup. A discrete distribution has several medians when the CDF steps from below 0.5 to above it and lands exactly on 0.5 along the way — the discrete uniform on {1,2,3,4} has medians at both 2 and 3. Continuous distributions are unique unless the CDF has a flat stretch at height 0.5.Read more →

Is there a standard symbol for the median?

+
No — unlike the variance, which settled on σ² and Var, the median never adopted one symbol. You will meet median(X), Med(X), med(X), a bare m, x̃ for the sample version, and quantile spellings like Q₂. Careful technical writing states which convention it is using, and a reader should expect it to change between sources.Read more →

Why does the discrete median need two inequalities instead of one equation?

+
Because the CDF of a discrete variable jumps rather than passing smoothly through 0.5, so F(m) = 0.5 usually has no solution at all. The pair P(X ≤ m) ≥ 0.5 and P(X ≥ m) ≥ 0.5 pins down the value the equation cannot reach. The same gap is why F⁻¹ is not a literal inverse for stepped or plateaued CDFs.Read more →

Why do you average the two middle values when the sample size is even?

+
Because it is a convention, not a theorem. With an even count no single observation sits in the middle, and every value between the two central ones satisfies the median conditions equally well. Taking their average picks one representative from that whole interval. Other choices are defensible; the average is simply the one everyone agreed to use.Read more →

Does the subscript in Q₂ mean the same as in Q₀.₅?

+
No — the two conventions count different things and happen to name the same value. Q₂ is the second of the three quartiles, so its subscript counts cut points. Q₀.₅ is the 0.5-quantile, so its subscript states a probability. Both land on the median, but reading one subscript as the other misidentifies every quantile except this one.Read more →

How far apart can the mean and the median be?

+
At most one standard deviation: ∣μ−m∣≤σ|\mu - m| \le \sigma for any variable with finite variance, however skewed. The chain is ∣μ−m∣≤E∣X−m∣≤E∣X−μ∣≤σ|\mu - m| \le E|X - m| \le E|X - \mu| \le \sigma, where the middle step holds because the median minimizes the average absolute distance. For the exponential with λ=1\lambda = 1, the gap is 1−ln⁡2≈0.311 - \ln 2 \approx 0.31, well inside σ=1\sigma = 1.Read more →

Is a half-life a median or a mean?

+
A median. The half-life of an isotope is the time by which half of a large sample has decayed, which is the median lifetime of one atom, ln⁡2λ\frac{\ln 2}{\lambda}. The mean lifetime is 1λ\frac{1}{\lambda}, about 1.441.44 half-lives, because the exponential lifetime has a long right tail: the few atoms that last much longer than the rest pull the average up.Read more →

Is the median of X² the square of the median of X?

+
Only when squaring keeps the order, as it does for X≥0X \ge 0; then a median of 55 gives 2525. When XX takes both signs it fails: for XX uniform on [−1,1][-1, 1] the median is 00, but P(X2≤t)=tP(X^2 \le t) = \sqrt{t}, which reaches 0.50.5 at t=0.25t = 0.25. Squaring folds both ends of XX onto the top of X2X^2, so the median of X2X^2 is 0.250.25, not 00.Read more →