Tutorials › Statistical Theory I - Probability and Distribution Theory › Beta Reflection and Complement Transformations

Uniform, Beta, and Gamma Laws · Tutorial 169 of 994

Beta Reflection and Complement Transformations

Learn how replacing a Beta random variable by its complement swaps its shape parameters and transforms its probabilities and moments.

Beginner 8 min read

What You'll Learn

  • Derive the distribution of the complement of a Beta random variable.
  • Explain why equal shape parameters give symmetry about one-half, and why symmetry requires equal parameters.
  • Convert CDF values, tail probabilities, and interval probabilities under complementation.
  • Find moments of the complement and relate them to moments of the original variable.
  • Recognize common errors involving swapped parameters and reversed inequalities.

Why Complementation Matters

A Beta random variable takes values between zero and one, so its complement \(1-X\) is also a natural quantity to study. If \(X\) represents a proportion, then \(1-X\) represents the remaining proportion. The transformation is especially useful when a probability is awkward to calculate in one tail but straightforward in the other, or when a moment of the complement is needed.

The key fact is that complementation swaps the two shape parameters: if \(X\) has a Beta distribution with parameters \(a\) and \(b\), then \(1-X\) has a Beta distribution with parameters \(b\) and \(a\). We will derive this fact from the density, then use it to connect symmetry, probabilities, and moments.

Definition: For \(a>0\) and \(b>0\), the distribution \(\operatorname{Beta}(a,b)\) has density $$ f_X(x)=\frac{x^{a-1}(1-x)^{b-1}}{B(a,b)},\qquad 0<x<1, $$ and density zero outside \((0,1)\). Here $$ B(a,b)=\int_0^1 x^{a-1}(1-x)^{b-1}\,dx $$ is the beta function. The parameters \(a\) and \(b\) are positive shape parameters.

The Distribution of the Complement

Set \(Y=1-X\). This is a one-to-one transformation from \((0,1)\) to \((0,1)\), with inverse \(x=1-y\) and absolute derivative \(|dx/dy|=1\). Applying the one-dimensional change-of-variables formula gives the density of \(Y\).

Theorem: If \(X\sim\operatorname{Beta}(a,b)\), where \(a,b>0\), then $$ 1-X\sim\operatorname{Beta}(b,a). $$

To see every part of the transformation, substitute \(x=1-y\) into the density of \(X\):

$$ \begin{aligned} f_Y(y) &=f_X(1-y)\left|\frac{d}{dy}(1-y)\right|\\ &=\frac{(1-y)^{a-1}y^{b-1}}{B(a,b)},\qquad 0<y<1. \end{aligned} $$

The beta function is unchanged when its arguments are interchanged. Indeed, substituting \(u=1-x\) into its defining integral gives \(B(a,b)=B(b,a)\). Therefore,

$$ f_Y(y)=\frac{y^{b-1}(1-y)^{a-1}}{B(b,a)},\qquad 0<y<1, $$

which is exactly the \(\operatorname{Beta}(b,a)\) density. The Jacobian is one, but it is still important to include it in the transformation: for a different transformation, omitting its absolute derivative could give an incorrect density. \(\square\)

Worked Example: Identify the Complement Distribution

Suppose \(X\sim\operatorname{Beta}(2,5)\), and let \(Y=1-X\). Identify the distribution of \(Y\).

The complement theorem swaps the two shape parameters. The first parameter of \(X\) is \(2\), and the second is \(5\), so $$ Y=1-X\sim\operatorname{Beta}(5,2). $$

For a direct density check, the density of \(X\) is \(30x(1-x)^4\) on \((0,1)\), since \(B(2,5)=1/30\). Thus $$ f_Y(y)=f_X(1-y)=30(1-y)y^4=30y^4(1-y),\qquad 0<y<1, $$ which is the \(\operatorname{Beta}(5,2)\) density. The larger shape parameter has moved from the factor near zero to the factor near one in the original variable; after complementation, those roles reverse.

Symmetry and Equal Shape Parameters

A distribution on \((0,1)\) is symmetric about \(1/2\) when reflecting values around \(1/2\) leaves its distribution unchanged. For a Beta variable, reflection around \(1/2\) is exactly the complement transformation. The theorem therefore gives both a simple symmetry condition and its converse.

Theorem: If \(X\sim\operatorname{Beta}(a,b)\) with \(a,b>0\), then \(X\) is symmetric about \(1/2\) if and only if \(a=b\).

If \(a=b\), the density itself verifies symmetry: $$ f_X(1-x) =\frac{(1-x)^{a-1}x^{a-1}}{B(a,a)} =f_X(x),\qquad 0<x<1. $$ Equivalently, the complement theorem gives \(1-X\sim\operatorname{Beta}(a,a)\), the same distribution as \(X\).

For the converse, suppose the distribution is symmetric about \(1/2\), so \(X\) and \(1-X\) have the same distribution. The Beta mean is \(E[X]=a/(a+b)\), and the complement theorem gives \(E[1-X]=b/(a+b)\). Equality in distribution implies equal means, so $$ \frac{a}{a+b}=\frac{b}{a+b}. $$ Since \(a+b>0\), this implies \(a=b\). Thus no unequal pair of positive shape parameters can produce a symmetric Beta distribution.

When \(a=b\), the mean is \(1/2\), but a mean of \(1/2\) alone does not establish symmetry. The symmetry follows from the full density identity, not merely from the mean.

Worked Example: Use Symmetry to Compute a Tail

Let \(X\sim\operatorname{Beta}(3,3)\). Find \(P(X>0.7)\) in terms of a lower-tail probability.

The shape parameters are equal, so \(X\) and \(1-X\) have the same distribution. Then $$ P(X>0.7)=P(1-X<0.3)=P(X<0.3). $$ The inequalities reverse because subtracting from one reverses their order. Since the Beta distribution is continuous, using \(<\) or \(\le\) at \(0.3\) gives the same probability. Thus an upper-tail probability above \(0.7\) equals the lower-tail probability below \(0.3\); no numerical evaluation of either probability is required to establish the equality.

Transforming CDFs and Probabilities

Write \(F_X(x)=P(X\le x)\) for the CDF of \(X\), and \(F_Y(y)=P(Y\le y)\) for \(Y=1-X\). A Beta distribution has a density and hence no point masses. For \(0\le y\le1\),

$$ \begin{aligned} F_Y(y) &=P(1-X\le y)\\ &=P(X\ge 1-y)\\ &=1-F_X(1-y). \end{aligned} $$

The last equality uses continuity: \(P(X\ge c)=1-P(X<c)=1-F_X(c)\) when \(P(X=c)=0\). Since \(Y\sim\operatorname{Beta}(b,a)\), the same identity can be written $$ F_{b,a}(y)=1-F_{a,b}(1-y),\qquad 0\le y\le1, $$ where \(F_{a,b}\) denotes the CDF of a \(\operatorname{Beta}(a,b)\) variable.

The same order reversal converts events involving intervals and tails. For \(0\le c\le1\), $$ P(X>c)=P(Y<1-c)=F_Y(1-c), $$ where continuity again makes the strict or non-strict inequality immaterial. More generally, if \(0\le r<s\le1\), then $$ r<X<s\quad\Longleftrightarrow\quad 1-s<Y<1-r. $$ Both endpoints change, and their order reverses.

Worked Example: Convert an Upper Tail to a Lower Tail

Let \(X\sim\operatorname{Beta}(2,5)\). Find \(P(X>0.8)\) by using the complement.

Set \(Y=1-X\), so \(Y\sim\operatorname{Beta}(5,2)\). The event transforms as $$ X>0.8\quad\Longleftrightarrow\quad Y<0.2. $$ The \(\operatorname{Beta}(5,2)\) density is \(30y^4(1-y)\). Its CDF on \([0,1]\) is obtained by integrating: $$ F_Y(y)=\int_0^y 30t^4(1-t)\,dt =6y^5-5y^6. $$ Consequently, $$ \begin{aligned} P(X>0.8) &=P(Y<0.2)\\ &=6(0.2)^5-5(0.2)^6\\ &=\frac{6}{3125}-\frac{5}{15625}\\ &=\frac{30-5}{15625} =\frac{1}{625}. \end{aligned} $$ The result is \(0.0016\). The small value is consistent with the \(\operatorname{Beta}(2,5)\) density concentrating toward zero.

Worked Example: Transform an Interval Probability

Suppose \(X\sim\operatorname{Beta}(3,2)\). Express \(P(0.25<X<0.7)\) as a probability for the complement, and evaluate it.

For \(Y=1-X\), the distribution is \(\operatorname{Beta}(2,3)\). The interval endpoints reverse: $$ 0.25<X<0.7\quad\Longleftrightarrow\quad 0.3<Y<0.75. $$ The density of \(Y\) is \(12y(1-y)^2\). Integrating it gives $$ F_Y(y)=\int_0^y12t(1-t)^2\,dt=6y^2-8y^3+3y^4. $$ Therefore, $$ \begin{aligned} P(0.25<X<0.7) &=F_Y(0.75)-F_Y(0.3)\\ &=\left(6(0.75)^2-8(0.75)^3+3(0.75)^4\right)\\ &\quad-\left(6(0.3)^2-8(0.3)^3+3(0.3)^4\right)\\ &=0.94921875-0.3483\\ &=0.60091875. \end{aligned} $$ This calculation illustrates why both interval endpoints must be complemented: the interval \((0.25,0.7)\) becomes \((0.3,0.75)\), not \((0.25,0.3)\) or \((0.7,0.75)\).

Moments of the Complement

The complement theorem identifies the entire distribution of \(1-X\), so moments can be obtained from the Beta moments with the parameters exchanged. In particular, for a nonnegative integer \(k\), the raw \(k\)th moment of \(Y=1-X\) is $$ E[Y^k]=E[(1-X)^k]=\frac{(b)_k}{(a+b)_k}, $$ where \((c)_k=c(c+1)\cdots(c+k-1)\) for \(k\ge1\), and \((c)_0=1\). This formula also follows directly by integrating the density: $$ E[(1-X)^k] =\frac{1}{B(a,b)}\int_0^1 x^{a-1}(1-x)^{b+k-1}\,dx =\frac{B(a,b+k)}{B(a,b)}. $$ Repeated use of the beta-function recurrence \(B(u,v+1)=\frac{v}{u+v}B(u,v)\) gives the stated product. Here \(a,b>0\) and \(k\) is a nonnegative integer.

For the first two moments, the consequences are especially useful: $$ E[1-X]=\frac{b}{a+b},\qquad \operatorname{Var}(1-X)=\frac{ab}{(a+b)^2(a+b+1)}. $$ The mean changes from \(a/(a+b)\) to \(b/(a+b)\), while the variance stays the same. More generally, because \(1-X\) is an affine function of \(X\), $$ \operatorname{Var}(1-X)=\operatorname{Var}(X),\qquad \operatorname{Cov}(X,1-X)=-\operatorname{Var}(X). $$ The variance identity follows from \(\operatorname{Var}(c+X)=\operatorname{Var}(X)\) and \(\operatorname{Var}(-X)=\operatorname{Var}(X)\); the covariance identity follows from \(\operatorname{Cov}(X,1-X)=\operatorname{Cov}(X,1)-\operatorname{Cov}(X,X)\).

Worked Example: Compare the First Two Moments

Let \(X\sim\operatorname{Beta}(2,3)\), and let \(Y=1-X\). Find the means and variances of both variables, then find \(E[Y^2]\).

The complement theorem gives \(Y\sim\operatorname{Beta}(3,2)\). The means are $$ E[X]=\frac{2}{2+3}=\frac25,\qquad E[Y]=\frac{3}{3+2}=\frac35. $$ For either variable, the product of the shape parameters is \(6\), and the sum is \(5\). Hence $$ \operatorname{Var}(X)=\operatorname{Var}(Y) =\frac{6}{5^2(5+1)} =\frac{6}{150} =\frac1{25}. $$ Finally, for \(Y\sim\operatorname{Beta}(3,2)\), $$ E[Y^2]=\frac{3(3+1)}{(3+2)(3+2+1)} =\frac{12}{30} =\frac25. $$ Checking against the mean and variance gives the same value: $$ E[Y^2]=\operatorname{Var}(Y)+(E[Y])^2 =\frac1{25}+\frac9{25} =\frac{10}{25} =\frac25. $$

Common Pitfalls and Why the Transformation Helps

The complement transformation is a compact way to reuse Beta distribution results, but it is easy to apply it incompletely. Keep the event transformation separate from the parameter transformation: the parameters swap because the density changes, while the event endpoints reverse because the map \(x\mapsto1-x\) is decreasing.

  • Leaving the parameters in the original order. If \(X\sim\operatorname{Beta}(a,b)\), its complement is \(\operatorname{Beta}(b,a)\), not \(\operatorname{Beta}(a,b)\) in general.
  • Changing only one interval endpoint. The interval \(r<X<s\) becomes \(1-s<1-X<1-r\); both endpoints are complemented and their order reverses.
  • Assuming every Beta distribution is symmetric. Symmetry about \(1/2\) requires \(a=b\). The fact that a variable lies between zero and one does not imply that its density is symmetric.
  • Equating symmetry with a centered mean. A mean of \(1/2\) is not, by itself, a proof of symmetry. For Beta distributions, symmetry follows from equal shape parameters and the reflected density.

In applications, a probability about a proportion near one can often be recast as a probability about its complement near zero. A moment of the remaining proportion can likewise be obtained by swapping the Beta parameters rather than expanding \((1-X)^k\) and combining several moments. These are two uses of the same distributional identity.

Check Your Understanding

Try these questions using the complement theorem and event transformations.

  1. If \(X\sim\operatorname{Beta}(4,7)\), what is the distribution of \(1-X\)?
  2. For which positive values of \(a\) and \(b\) is \(\operatorname{Beta}(a,b)\) symmetric about \(1/2\)? Give a reason, not just a condition on its mean.
  3. If \(X\sim\operatorname{Beta}(2,5)\), rewrite \(P(0.4<X<0.9)\) as an interval probability for \(Y=1-X\), and state the distribution of \(Y\).
  4. For \(X\sim\operatorname{Beta}(a,b)\), what are \(E[1-X]\) and \(\operatorname{Var}(1-X)\)?
  5. Explain why \(P(X>c)=P(1-X<1-c)\), and why the strict inequality does not affect the probability for a Beta random variable.