Tutorials › Statistical Theory I - Probability and Distribution Theory › Truncation Versus Censoring in Uniform Examples

Mixtures, Compounding, and Truncation · Tutorial 668 of 994

Truncation Versus Censoring in Uniform Examples

Learn how truncation and clipping produce different distributions from the same uniform variable, and how to calculate each law correctly.

Advanced 10 min read

What You'll Learn

  • Derive the conditional density and CDF for a uniform variable retained in an interval.
  • Find the endpoint atoms and interior density created by clipping.
  • Write the CDF of a clipped uniform variable, including its values at both endpoints.
  • Compare probabilities and moments under truncation and clipping.
  • Avoid confusing renormalized retained data with probability accumulated at clipping thresholds.

One Interval, Two Different Operations

Suppose a measurement \(X\) is uniformly distributed over a range, and only values in an interval \([c,d]\) are of interest. There are two distinct ways to produce a value in that interval. Truncation keeps only observations that fall in \([c,d]\), so the resulting law is conditional on being retained. Censoring by clipping keeps every observation but replaces values below \(c\) by \(c\), and values above \(d\) by \(d\).

These operations have different consequences. Conditioning changes the relative density of retained interior values by renormalizing it. Clipping leaves the original density unchanged in the interior and places the probabilities of observations outside the interval at its endpoints. The difference is particularly transparent for a uniform distribution.

Setup and definitions: Let \(X\sim\operatorname{Unif}(a,b)\), where \(a<c<d<b\). Its density is \(f_X(x)=1/(b-a)\) for \(a<x<b\), and zero otherwise. The truncated variable has the conditional law of \(X\) given \(c\leq X\leq d\). The clipped variable is \(Y=\min(\max(X,c),d)\). Thus \(Y=c\) when \(X\leq c\), \(Y=X\) when \(c<X<d\), and \(Y=d\) when \(X\geq d\).

Because \(X\) is continuous, \(P(X=c)=P(X=d)=0\). Including or excluding those two boundary values in the conditioning event does not change its probability or the resulting conditional distribution. For clipping, however, the events \(X\leq c\) and \(X\geq d\) each have positive probability because they include intervals of possible input values.

Truncation: Condition and Renormalize

Write \(T\) for a variable with the conditional distribution of \(X\) given \(c\leq X\leq d\). The probability of being retained is \(P(c\leq X\leq d)=(d-c)/(b-a)\). For a measurable set \(A\), conditioning gives \(P(T\in A)=P(X\in A,\ c\leq X\leq d)/P(c\leq X\leq d)\). The uniform density is constant in the retained interval, and division by the retention probability changes that constant from \(1/(b-a)\) to \(1/(d-c)\).

Theorem: The truncated law has density
$$ f_T(t)= \begin{cases} \dfrac{1}{d-c},&c<t<d,\\[4pt] 0,&\text{otherwise}, \end{cases} $$
and CDF
$$ F_T(t)= \begin{cases} 0,&t<c,\\[2pt] \dfrac{t-c}{d-c},&c\leq t<d,\\[4pt] 1,&t\geq d. \end{cases} $$
There is no point mass at either endpoint.

To verify the density, for any measurable \(A\),

$$ P(T\in A) =\frac{\int_{A\cap[c,d]} \frac{1}{b-a}\,dx} {\frac{d-c}{b-a}} =\int_{A\cap[c,d]}\frac{1}{d-c}\,dx. $$

This identifies the stated density. Integrating it from \(c\) to \(t\) gives \((t-c)/(d-c)\) when \(c\leq t<d\); below \(c\) the probability is zero, and from \(d\) onward it is one. The endpoint values are consistent with a continuous CDF, so neither endpoint carries an atom. The density integrates to \((d-c)/(d-c)=1\), as required. \(\square\)

Clipping: Keep the Interior and Accumulate Tails

For the clipped variable \(Y\), values originally below \(c\) all become exactly \(c\); values in the open interval remain unchanged; and values originally above \(d\) all become exactly \(d\). Consequently, the two endpoint probabilities are \(P(Y=c)=P(X\leq c)\) and \(P(Y=d)=P(X\geq d)\). On the interior, the probability of a small interval is still its length divided by \(b-a\), not by \(d-c\).

Theorem: The clipped law has endpoint masses and interior density
$$ P(Y=c)=\frac{c-a}{b-a},\qquad f_Y(y)=\frac{1}{b-a}\ \ (c<y<d),\qquad P(Y=d)=\frac{b-d}{b-a}. $$
Its CDF is
$$ F_Y(y)= \begin{cases} 0,&y<c,\\[2pt] \dfrac{y-a}{b-a},&c\leq y<d,\\[4pt] 1,&y\geq d. \end{cases} $$

For a direct derivation, first consider a threshold \(y\) with \(c\leq y<d\). From the definition of clipping, \(Y\leq y\) holds exactly when \(X\leq y\): every value below \(c\) is mapped to \(c\leq y\), and values above \(y\) cannot be mapped to a value at most \(y\). Thus \(P(Y\leq y)=P(X\leq y)=(y-a)/(b-a)\). If \(y<c\), \(Y\leq y\) is impossible; if \(y\geq d\), it is certain. These cases give the CDF, including its right-continuous endpoint values.

At \(c\), the CDF jumps from zero to \((c-a)/(b-a)\), giving the atom at \(c\). At \(d\), the left limit is \((d-a)/(b-a)\), and the CDF reaches one, so the jump is \((b-d)/(b-a)\). For \(c<y<d\), differentiating the CDF gives density \(1/(b-a)\). The total probability is

$$ \frac{c-a}{b-a}+\frac{d-c}{b-a}+\frac{b-d}{b-a} =\frac{b-a}{b-a}=1. $$

The middle term is the probability in the interior; it has not been renormalized. This establishes the complete law, including its endpoint masses. \(\square\)

Worked Comparisons

Worked Example: Truncate or Clip a Uniform Distribution

Let \(X\sim\operatorname{Unif}(0,10)\), and use the interval \([2,7]\). Find the laws obtained by truncation and clipping.

Truncation. The retention probability is \((7-2)/10=1/2\). Conditional on retention, the density is \(1/(7-2)=1/5\) on \((2,7)\), with CDF \((t-2)/5\) for \(2\leq t<7\). Its CDF is zero below 2 and one at and above 7. There are no endpoint atoms.

Clipping. The lower endpoint mass is \(P(X\leq2)=2/10=1/5\), and the upper endpoint mass is \(P(X\geq7)=3/10\). The interior density remains \(1/10\) on \((2,7)\). Its CDF is zero below 2, \(y/10\) for \(2\leq y<7\), and one at and above 7. In particular, \(F_Y(2)=0.2\), while \(F_Y(7-)=0.7\) and \(F_Y(7)=1\).

Check. The clipped probabilities sum to \(0.2+0.5+0.3=1\), since the interior probability is \(5(1/10)=0.5\). The conditional density instead has total mass \(5(1/5)=1\). These are different distributions even though both take values in \([2,7]\).

Worked Example: Compare Threshold Probabilities

Let \(X\sim\operatorname{Unif}(-2,8)\), and compare truncating and clipping to \([1,5]\). Find the probability of a value at most 4 under each law, and the probability that a clipped value equals 1.

Truncated law. Conditional on \(1\leq X\leq5\), the variable is uniform on an interval of length 4. The portion from 1 to 4 has length 3, so \(P(T\leq4)=3/4=0.75\).

Clipped law. Since \(1\leq4<5\), the clipping CDF formula gives \(P(Y\leq4)=P(X\leq4)=(4-(-2))/(8-(-2))=6/10=0.6\). Also, \(Y=1\) precisely when \(X\leq1\), so \(P(Y=1)=(1-(-2))/10=3/10=0.3\).

The two probabilities of being at most 4 differ because truncation discards values outside \([1,5]\) and renormalizes the retained interval. Clipping retains those observations, including all observations below 1 as a mass at 1.

Worked Example: Means and Variances After the Two Operations

Let \(X\sim\operatorname{Unif}(0,10)\), with clipping interval \([2,6]\). Find the means and variances of the truncated and clipped laws.

Truncation. The conditional distribution is uniform on \([2,6]\). Its mean is \((2+6)/2=4\), and its variance is \((6-2)^2/12=16/12=4/3\).

Clipping. The endpoint masses are \(P(Y=2)=0.2\) and \(P(Y=6)=0.4\), and the interior density is \(0.1\). Therefore

$$ E[Y]=2(0.2)+6(0.4)+\int_2^6 0.1y\,dy =0.4+2.4+0.1\frac{6^2-2^2}{2} =0.4+2.4+1.6=4.4. $$

For the second moment, include both atoms and integrate over the interior:

$$ E[Y^2]=2^2(0.2)+6^2(0.4)+\int_2^6 0.1y^2\,dy =0.8+14.4+0.1\frac{6^3-2^3}{3} =\frac{332}{15}. $$

Thus \(\operatorname{Var}(Y)=E[Y^2]-E[Y]^2=332/15-(22/5)^2=208/75\). The clipped mean is 4.4 rather than 4, and its variance \(208/75\) is not the truncated variance \(4/3\). The endpoint accumulation changes both.

Why the Distinction Matters

A truncated data set represents a selection rule: only observations satisfying the interval condition enter the retained sample. Its density must therefore be conditional, with total probability one on that interval. A clipped data set represents a transformation applied to every observation. The original interior observations remain at their original values, while out-of-range observations are reported at a boundary. Its law is generally mixed: it has point masses at the thresholds as well as a continuous density between them.

This distinction determines how probabilities should be calculated. For truncation, a probability within the retained interval is divided by the probability of retention. For clipping, an event involving an endpoint must include all original values mapped to that endpoint. The CDF is often the easiest way to check the latter, because its jumps reveal the endpoint masses.

Common Mistake

  • Wrong reasoning: “Clipping removes probability from the interior and transfers it to the endpoints, so its interior density should be renormalized.” This treats clipping as though it first changed the interior distribution.
  • Correction: Clipping does not remove probability from the interior. Every original value strictly between \(c\) and \(d\) remains unchanged, so for \(X\sim\operatorname{Unif}(a,b)\) the interior density stays \(1/(b-a)\). The endpoint atoms come from observations originally outside \([c,d]\): the lower tail is concentrated at \(c\), and the upper tail at \(d\).
  • Related check: The truncated density is \(1/(d-c)\), because it is normalized after conditioning. The clipped interior density is \(1/(b-a)\), because it is the original density on the unchanged interior.
Key takeaway: Truncation conditions on being inside an interval and renormalizes the retained density. Clipping transforms every observation, preserving the original interior density and accumulating the two outside tails as endpoint masses.

Check Your Understanding

For each question, distinguish conditioning from clipping and pay attention to endpoint probabilities.

  1. If \(X\sim\operatorname{Unif}(0,12)\) is truncated to \([3,9]\), what are the conditional density and the probability of a value at most 6?
  2. For the same \(X\) clipped to \([3,9]\), find both endpoint masses and the density on the interior.
  3. Why does the clipped CDF at the lower threshold equal the lower endpoint mass?
  4. For a uniform distribution on \((a,b)\) and \(a<c<d<b\), verify that the two clipped endpoint masses plus the interior probability sum to one.
  5. Explain why the interior density of a clipped uniform variable is not \(1/(d-c)\).