St · Statistics & Probability

What Distribution Maximizes Variance for a Fixed Mean and Support?

Published By the 9to5Science editorial team

At a glance

  1. 1. Set the bounds

    Write the allowed range as [a, b] and check that the fixed mean μ lies in that interval.

  2. 2. Use the endpoint inequality

    For every value in [a, b], (X − a)(b − X) is nonnegative.

  3. 3. Find the variance bound

    Take expectations, then subtract μ² to obtain Var(X) ≤ (μ − a)(b − μ).

  4. 4. Put mass at endpoints

    The bound is attained by placing probabilities (b − μ)/(b − a) at a and (μ − a)/(b − a) at b.

Advertisement

If you know a random variable’s mean and that its values stay within a fixed interval, you can bound how spread out it can be. The greatest possible variance comes from concentrating the distribution at the interval’s endpoints, with probabilities chosen to preserve the mean.

Let XX take values in [a,b][a,b], where a<ba<b, and let its mean be μ\mu. The maximum variance is

Var⁡(X)≤(μ−a)(b−μ).\operatorname{Var}(X) \le (\mu-a)(b-\mu).

Equality is possible: assign probability (b−μ)/(b−a)(b-\mu)/(b-a) to aa and probability (μ−a)/(b−a)(\mu-a)/(b-a) to bb. This result is known as the Bhatia–Davis inequality.

Deriving the bound

Because XX lies between aa and bb, both X−aX-a and b−Xb-X are nonnegative. Their product must therefore be nonnegative:

(X−a)(b−X)≥0.(X-a)(b-X)\ge 0.

Expand and take expectations. Since E[X]=μ\mathbb{E}[X]=\mu,

(X−a)(b−X)≥0,−X2+(a+b)X−ab≥0,E[X2]≤(a+b)μ−ab.\begin{aligned} (X-a)(b-X)&\ge 0,\\ -X^2+(a+b)X-ab&\ge 0,\\ \mathbb{E}[X^2]&\le (a+b)\mu-ab. \end{aligned}

Use Var⁡(X)=E[X2]−μ2\operatorname{Var}(X)=\mathbb{E}[X^2]-\mu^2 to get

Var⁡(X)≤(a+b)μ−ab−μ2=(μ−a)(b−μ).\begin{aligned} \operatorname{Var}(X)&\le (a+b)\mu-ab-\mu^2\\ &=(\mu-a)(b-\mu). \end{aligned}

This also shows why the mean must satisfy a≤μ≤ba\le\mu\le b: an average of values in the interval cannot lie outside it.

The distribution that reaches the maximum

Consider a two-point random variable that takes only the values aa and bb. If P(X=a)=pP(X=a)=p, then the mean condition requires

pa+(1−p)b=μ.pa+(1-p)b=\mu.

Solving gives

P(X=a)=b−μb−a,P(X=b)=μ−ab−a.P(X=a)=\frac{b-\mu}{b-a},\qquad P(X=b)=\frac{\mu-a}{b-a}.

For this distribution, XX is always at an endpoint, so (X−a)(b−X)=0(X-a)(b-X)=0 with probability 1. That makes the inequality used in the derivation an equality, and its variance reaches the bound.

For an interior mean, this is the only way to attain equality: XX must be at one of the two endpoints with probability 1. If μ=a\mu=a or μ=b\mu=b, the mean constraint forces XX to equal that endpoint almost surely, so the maximum variance is zero.

Worked example

Suppose XX is restricted to [0,10][0,10] and has mean 44. The largest possible variance is

(4−0)(10−4)=24.(4-0)(10-4)=24.

The maximizing distribution is

P(X=0)=10−410−0=0.6,P(X=10)=4−010−0=0.4.P(X=0)=\frac{10-4}{10-0}=0.6,\qquad P(X=10)=\frac{4-0}{10-0}=0.4.

Check the calculation directly: E[X]=0(0.6)+10(0.4)=4\mathbb{E}[X]=0(0.6)+10(0.4)=4, and E[X2]=02(0.6)+102(0.4)=40\mathbb{E}[X^2]=0^2(0.6)+10^2(0.4)=40. Therefore

Var⁡(X)=40−42=24.\operatorname{Var}(X)=40-4^2=24.

A distribution that puts some probability in the interior of the interval has strictly smaller variance, provided it still has the same mean and is not concentrated entirely at the endpoints.

Special case: support on [0, 1]

If 0≤X≤10\le X\le 1 and E[X]=μ\mathbb{E}[X]=\mu, then

Var⁡(X)≤μ(1−μ).\operatorname{Var}(X)\le \mu(1-\mu).

The bound is attained by a Bernoulli random variable: P(X=1)=μP(X=1)=\mu and P(X=0)=1−μP(X=0)=1-\mu. For example, a mean of 0.30.3 allows a maximum variance of 0.3(0.7)=0.210.3(0.7)=0.21.

Common mistakes and support caveats

  • Using the wrong range: The bound applies to a known interval containing every possible value, not just to an interval that contains most observations. If the variable is unbounded, this argument does not give a finite maximum.
  • Confusing standard deviation with variance: The result bounds variance. The corresponding maximum standard deviation is (μ−a)(b−μ)\sqrt{(\mu-a)(b-\mu)}.
  • Ignoring the meaning of “support”: In probability, the support can mean the set of values with positive probability, or the topological support of a distribution. The maximizing two-point distribution has support {a,b}\{a,b\}, not the whole interval [a,b][a,b]. If you require positive probability throughout the interval, the bound generally cannot be attained, though it can often be approached by putting nearly all probability near the endpoints.
  • Using an open interval: If values must lie strictly between aa and bb, endpoint probabilities are not allowed. For an interior mean, the same expression is then a supremum rather than an attained maximum: distributions can approach the endpoint construction, but cannot equal it.

The formula assumes the stated range is [a,b][a,b] (or that all values are contained in it). If a problem specifies a different allowed set, the endpoint construction may not be available; the maximum can depend on that set’s actual permitted values.

References

  1. A Better Bound on the Variance, Rajendra Bhatia and Chandler Davis, The American Mathematical Monthly, 107(4), 353–357 (2000)
  2. Probability and Measure, Patrick Billingsley

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.