Let have density . As you have seen, the random variable comes up frequently in calculations. Thus far, all we have needed is which can be found by the formula for the expectation of a non-linear function of . To find the density of , we can’t directly use the change of variable formula of the previous section because the function is not monotone. It is two-to-one because both and have the same square.
In this section we will find the density of by developing a modification of the change of variable formula for the density of a monotone function of . The modification extends in a straightforward manner to other two-to-one functions and also to many-to-one functions.
16.4.1Density of ¶
If can take both positive and negative values, we have to account for the fact that there can be two mutually exclusive ways in which the event can happen: either has to be near the positive square root of or near the negative square root of .

So the density of at has two components, as follows. For ,
where
and
We have used when .
For a more formal approach, start with the cdf of :
Differentiate both sides to get our formula for ; keep an eye on the two minus signs in the second term and make sure you combine them correctly.
This approach can be extended to any many-to-one function . For every , there will be one component for each value of such that .
Answer
No, the square is one-to-one on . For , .
Answer
for . Yes, the square is two-to-one on . For , .
16.4.2Square of the Standard Normal¶
Let be standard normal and let . The possible values of are non-negative. For a possible value , the formula we have derived says that the density of is given by:
By algebra, the density can be written in an equivalent form that we will use more frequently.
This is a member of the family of gamma densities that we will study later in the course. In statistics, it is called the chi squared density with one degree of freedom.