Tutorials › Statistical Theory I - Probability and Distribution Theory › Verifying a Median by Probability Balance

Support, Quantiles, and Tails · Tutorial 86 of 994

Verifying a Median by Probability Balance

Learn to verify a proposed median by checking how probability lies on each side, including when the distribution has an atom at the candidate.

Beginner 9 min read

What You'll Learn

  • Express the median condition using probabilities strictly below and strictly above a candidate
  • Derive the equivalent CDF criterion using the left limit and the value at the candidate
  • Verify medians for continuous and discrete distributions
  • Check a candidate at an atom in a mixed distribution
  • Identify why a CDF value above one half may not be enough

Why Check Both Sides?

A median need not divide probability into two equal halves. If the distribution has an atom at the candidate value, that probability belongs to both events \(X\le m\) and \(X\ge m\). A reliable check therefore asks how much probability lies strictly below and strictly above \(m\). Each of those two amounts must be at most one half.

This probability-balance test works for continuous, discrete, and mixed distributions. It also makes clear why an atom changes how the CDF should be read: the value \(F(m)\) includes any probability at \(m\), while the left limit \(F(m-)\) does not.

Definition: A real number \(m\) is a median of \(X\) if \(P(X\le m)\ge \tfrac12\) and \(P(X\ge m)\ge \tfrac12\). Equivalently, neither strict side has more than half the probability: \(P(X<m)\le \tfrac12\) and \(P(X>m)\le \tfrac12\).

The Probability-Balance Criterion

Let \(F(x)=P(X\le x)\) be the CDF of a real-valued random variable \(X\). Write \(F(m-)=\lim_{x\uparrow m}F(x)\) for its left limit at \(m\). This left limit is the probability strictly below \(m\), whereas \(F(m)\) includes the probability at \(m\).

Theorem: A real number \(m\) is a median of \(X\) if and only if \(P(X<m)\le \tfrac12\) and \(P(X>m)\le \tfrac12\). Equivalently, \(F(m-)\le \tfrac12\le F(m)\).

Proof. The events \(\{X<m\}\) and \(\{X\ge m\}\) are complements, so \(P(X\ge m)=1-P(X<m)\). Thus \(P(X\ge m)\ge \tfrac12\) holds exactly when \(P(X<m)\le \tfrac12\). Likewise, \(P(X\le m)\) and \(P(X>m)\) are complementary, so \(P(X\le m)\ge \tfrac12\) holds exactly when \(P(X>m)\le \tfrac12\). These are precisely the two median conditions in the definition.

By the definition of the CDF, \(F(m)=P(X\le m)\). Also, \(F(m-)=P(X<m)\): as \(x\) increases to \(m\), the events \(\{X\le x\}\) increase to \(\{X<m\}\), and probability is continuous for increasing sequences of events. Finally, \(P(X>m)=1-F(m)\). Substituting these identities into the strict-side criterion gives \(F(m-)\le \tfrac12\) and \(1-F(m)\le \tfrac12\), or \(F(m-)\le \tfrac12\le F(m)\). This proves the equivalence. \(\square\)

The gap between the left limit and the CDF value records the probability at the candidate:

$$ F(m)-F(m-)=P(X=m). $$

Indeed, \(\{X\le m\}\) is the disjoint union of \(\{X<m\}\) and \(\{X=m\}\); taking probabilities gives the identity. If there is no atom at \(m\), the two CDF quantities agree. If there is an atom, the criterion requires the half-probability level to fall between the left limit and the value after the jump.

Worked Examples

Worked Example: A Median of a Continuous Distribution

Suppose \(X\) has an exponential distribution with rate \(1\), so its CDF is \(F(x)=0\) for \(x<0\) and \(F(x)=1-e^{-x}\) for \(x\ge 0\). Verify that \(m=\ln 2\) is a median.

Since \(\ln 2>0\), the probability strictly below \(m\) is \(P(X<m)=F(m)=1-e^{-\ln 2}=1-\tfrac12=\tfrac12\). There is no atom at \(m\), so this is also the CDF value at \(m\).

The probability strictly above \(m\) is \(P(X>m)=1-F(m)=e^{-\ln 2}=\tfrac12\). Both strict-side probabilities are at most one half, so the criterion verifies that \(\ln 2\) is a median. Here the two sides happen to have equal probability; that equality is not required in general.

Worked Example: A Median in a Discrete Distribution

Let \(X\) have the following probability mass function. Verify that \(m=1\) is a median.

$$ \begin{array}{c|cccc} x & 0 & 1 & 2 & 4\\ \hline P(X=x) & 0.2 & 0.4 & 0.3 & 0.1 \end{array} $$

The probabilities sum to \(0.2+0.4+0.3+0.1=1\), as required. Strictly below \(1\) is only the mass at \(0\), so \(P(X<1)=0.2\). Strictly above \(1\) is the mass at \(2\) plus the mass at \(4\), so \(P(X>1)=0.3+0.1=0.4\). Both are at most \(0.5\), and therefore \(1\) is a median.

The same check in CDF form gives \(F(1-)=0.2\) and \(F(1)=0.2+0.4=0.6\). Thus \(F(1-)\le 0.5\le F(1)\), as required. The jump over one half is not a problem: it is exactly how the atom at \(1\) contributes to the median condition.

Worked Example: A Mixed Distribution With a Median at an Atom

Suppose \(X\) has probability \(0.3\) at \(-1\), probability \(0.2\) at \(0\), and its remaining probability \(0.5\) is uniformly distributed over \((1,2)\). Verify that \(m=0\) is a median.

The total probability is \(0.3+0.2+0.5=1\). The only probability strictly below \(0\) is the atom at \(-1\), so \(P(X<0)=0.3\). The only probability strictly above \(0\) is the continuous component on \((1,2)\), so \(P(X>0)=0.5\). Both are at most one half; hence \(0\) is a median.

Here \(F(0-)=0.3\) and \(F(0)=0.3+0.2=0.5\). In particular, \(F(0)=\tfrac12\) does verify the median condition: monotonicity gives \(F(0-)\le F(0)=\tfrac12\), so both inequalities \(F(0-)\le\tfrac12\le F(0)\) hold. The atom at \(0\) is included in \(F(0)\), but not in \(F(0-)\).

Worked Example: A Median Inside the Continuous Part of a Mixed Law

Let \(X\) have probability \(0.4\) at \(0\), and with probability \(0.6\) have a uniform distribution on \([1,3]\). Verify the candidate \(m=\tfrac43\).

The candidate lies in the continuous part. The portion of the interval \([1,3]\) strictly below \(\tfrac43\) has length \(\tfrac43-1=\tfrac13\), out of total length \(2\). Its conditional probability under the uniform component is therefore \(\tfrac{1/3}{2}=\tfrac16\). Weighting by the probability \(0.6\) of that component gives \(0.6(\tfrac16)=0.1\). Adding the atom at \(0\), which is strictly below the candidate, gives \(P(X<\tfrac43)=0.4+0.1=0.5\).

The portion of \([1,3]\) strictly above \(\tfrac43\) has length \(3-\tfrac43=\tfrac53\). Its conditional probability is \(\tfrac{5/3}{2}=\tfrac56\), and its unconditional probability is \(0.6(\tfrac56)=0.5\). Thus \(P(X>\tfrac43)=0.5\). Both sides satisfy the criterion, so \(\tfrac43\) is a median. There is no atom at this candidate, and the continuous probability balances the atom below it.

A Common CDF Pitfall

The CDF value at \(m\) is useful, but it must be interpreted correctly. In particular, if \(F(m)=\tfrac12\), then \(m\) is a median: since \(F\) is nondecreasing, \(F(m-)\le F(m)=\tfrac12\), and the required two CDF inequalities both hold.

However, a CDF value strictly greater than one half does not, by itself, establish that \(m\) is a median. For example, suppose \(P(X=-1)=0.6\), \(P(X=0)=0.1\), and \(P(X=1)=0.3\). At \(m=0\), \(F(0)=0.7\), but \(F(0-)=0.6>\tfrac12\). Equivalently, \(P(X<0)=0.6\), which violates the strict-side criterion. Thus \(0\) is not a median, despite \(F(0)\) being greater than one half.

The correction is not to reject CDF checks, but to check the right CDF quantities. Verify \(F(m-)\le\tfrac12\le F(m)\), especially at a jump. Another tempting error is to require the strict-side probabilities to equal one half. The definition requires only that each be at most one half; probability at \(m\) can make the two sides unequal.

Why the Criterion Is Useful

The probability-balance criterion provides one check that applies without assuming a density, a mass function, or a particular shape. For a continuous law, it often reduces to solving for equal tail probabilities because there is no atom at the candidate. For a discrete or mixed law, the strict inequalities keep the mass at the candidate from being counted as though it were strictly on either side.

It is also a direct verification rather than a guess based on appearance or on a single summary. Once a candidate \(m\) has been proposed, compute \(P(X<m)\) and \(P(X>m)\), or equivalently locate \(F(m-)\) and \(F(m)\). The candidate qualifies exactly when neither strict side contains more than half the probability.

Check Your Understanding

Use strict-side probabilities or the CDF criterion to answer each question.

  1. For a continuous distribution with \(F(m)=0.5\), explain why \(m\) is a median.
  2. A discrete distribution has \(F(m-)=0.45\) and \(F(m)=0.65\). Is \(m\) a median? What is the probability at \(m\)?
  3. Can a candidate with \(P(X<m)=0.5\) and \(P(X>m)=0.6\) be a median? Explain.
  4. In the distribution with probabilities \(0.6,0.1,0.3\) at \(-1,0,1\), respectively, why does \(F(0)=0.7\) fail to verify that \(0\) is a median?
  5. State the CDF criterion for a median and explain why it uses \(F(m-)\) as well as \(F(m)\).