Sometimes it occurs that one must find a probability density function (pdf) that should be “like” another one but should also be **confined to a given interval** of the support of the variable. However, maybe one is not entirely confident about whether the intuitive solution is mathematically justified. For example: does it preserve the moments? If not, does it preserve, at least, some properties of the “behaviour” of the original pdf?

Well, it is straightforward that **there seems to be 2 ways of preserving (as much as we can imagine) the shape **that the original pdf, let it be , has over the interval, let it be ^{(1)}. That interval is a subset of the support of the r.v., with and .

And what could we expect from “preserving the shape” but only good things!

Both of these solutions imply **to treat different points of the support the same way**:

**a)** to sum a constant to within the interval and set the final pdf, let it be , as equal to zero outside it, i.e.:

The value of is chosen for to integrate to 1 within , i.e.:

**b)** to scale by a constant within the interval and to set the final pdf, let it be , as zero outside it:

Again, is chosen for to integrate to 1 in the interval:

Both solutions are illustrated in the figure below with , where the interval is, again, (the other elements in the figure will enter the discussion soon).

It can be observed in the figure, without much effort, that it is really difficult for the moments (expectation, variance…) to be preserved in any of these two solutions (the **mode** is indeed preserved, but that is not a moment!). Therefore we have to look for other probabilistic guarantees that and/or may offer.

The key here is to understand that the following property is the most important thing to preserve in many applications: that** the probability of any random event in relation to the probability of any other random event (being both exclusive) should be unchanged** from to and/or . If that guarantee exists, then the truncated pdf **will have a (probabilistic) behaviour that is really similar** to the original pdf when looking at different places (=values of the variable) within the interval.

Let examine this assert with more detail.

A **random event** is, informally speaking^{(2)}, a set of possible outcomes of the variable; for our purposes, we will refer only to random events that are intervals on the support of the variable (the most common ones). In the previous figure, and are random events.

Two (or more) random events are **exclusive** if they cannot occur simultaneously^{(3)}. In the previous examples, both and are exclusive: the variable will take either a value within the first interval, a value within the second interval, or a value outside both, but never a value that belongs to the two intervals at the same time. If would have intersected , then both would have been non-exclusive events (but would have been still valid). and , for instance, are non-exclusive.

Finally, the **probability** of a random event (i.e., of the random variable to take a value within the interval of that event) is exactly the area of the pdf along that interval.

Therefore, the probability of an event in relation to the probability of another one (technically called **the odds** of both events when one is the complement of the other) can be expressed mathematically as the ratio between the former and the latter probabilities. For the two random events defined in the figure, the relation in probability under is:

In summary, our goal is that **the final, truncated pdf preserves the relation in probability of exclusive random events that lie within with respect to the original pdf, **.

**a)** Does solution preserve the relation in probability?

Since , we have that the probability of any random event is:

Therefore, the relation in probability of two exclusive random events and is:

As it is easily seen, there is no way that this equals the same relation in probability under unless , which is impossible if we want to integrate to 1.

Therefore ** does not preserve the relation in probability nor, consequently, the probabilistic behaviour of in .**

**b)** Does solution preserve the relation in probability?

Using the same reasoning, the probability of any random event under is:

Therefore, the relation in probability of two random events and is:

which is exactly the relation in probability under .

Therefore ** does preserve the relation in probability and, consequently, the probabilistic behaviour of in .**

**Summary**

We can create a new pdf from a given one by truncating the latter to an interval, and that preserves most^{(4)} of the probabilistic behaviour of the former if we set the new pdf as a **scaled version** of the original pdf within the interval and zero outside it, being the scaling factor the one suitable for the new pdf to integrate to 1.

Alas, in general this solution **will not preserve the moments** of the original pdf, not even the first one (expectation)!

But the **mode** *is* preserved!

^{(1)} *For the sake of simplicity we only deal with univariate pdfs in this post. By the way: the author recommends not to read any more footnotes until you have read the entire text.
*

^{(2)} *Formally speaking, a random event is an element of the σ-algebra of the sample space of a probability space of a given stochastic process, sample space that is mapped by the random variable into a subset of the real numbers (in most cases). [ . . . ] Oook. You can forget about that stuff. You are getting it right at this moment if you think that, for practical uses, a random event is equivalent to a set of values that can be taken by the r.v., just like I say in the main text. Especially if you are an engineer and not a mathematician.
*

^{(3)} *It amuses me how the exact meaning of “simultaneous” is actually left to the user of the theory of probability ^{(3.1)}. In engineering, simultaneity becomes “when outcomes of the stochastic process, which correspond to something that occurs in the physical world, occur in times that are indistinguishable from one another -you cannot order them-“. For being even more rigorous, random events do not occur; what occur are the mentioned outcomes, i.e., elements of the sample space of the probability space of the underlying stochastic process, sample space that I mentioned in the previous footnote. However, since it is difficult to think of more than one outcome occurring “simultaneously” in reality (stochastic processes usually only provide some result at a given time), the language is slightly stretched by assuming that if an outcome occurs, any random event that contains the outcome occurs too.
*

^{(3.1)} *I’m amused all the time by these tiny, apparently-no-one-caring-about details; they provide so much fun!*

^{(4)} *Recall that, after all, we have only reasoned with random events that are intervals (ook! random events *__that are mapped to__* intervals . . . ^{(4.1)} ), not with any random event. Not to mention all other simplifications we have made for the sake of writing a minimally educationally efficient text. Extending this modest post to cover all these especial cases and refinements ignored here is left to the reader that still has enough sanity points.
*

^{(4.1)} *Hey! You really understood the second footnote, didn’t you?*