Sometimes we are interested in a function of a random variable , say . For example, we have already discussed interest in the linear transformation
Other applied examples include
Diameter of imperfection in material | Area of imperfection |
Speed of vehicle | Time to complete journey |
Level of liquid in a vessel | Volume of liquid |
Length of phone call | Cost of phone call |
It is easy to show that in general the expectation of a function is not equal to the function of the expectation, i.e.
For example unless is constant, i.e. unless . Therefore what can we say about the new random variable ?
First consider the case of a discrete random variable and let for some real-valued function, . Then
In the discrete case finding the distribution of the transformed random variable is a simple matter of adding up the corresponding probabilities for .
Let have the following pmf
Value of | 0 | 1 | 2 |
---|---|---|---|
1/6 | 1/3 | 1/2 |
What are the pmfs of and ?
Solution.
Value of | 0 | 1 | 2 |
---|---|---|---|
1/6 | 1/3 | 1/2 | |
Value of | 0 | 1 | 4 |
Value of | 1 | 0 | 1 |
Hence the mass functions are:
Value of | 0 | 1 | 4 |
---|---|---|---|
1/6 | 1/3 | 1/2 |
Value of | 0 | 1 |
---|---|---|
1/3 | 2/3 |
For continuous random variables, we have for all and we cannot find the density of at by adding up the densities of all values of for which .
This is illustrated in the figure. The left panel shows the histogram of a independent samples from a random variable with a distribution. The right histogram is of . Just as in the first part of Example 4.1.1, the transformation is 1-1, so for each there is exactly one corresponding ; hence if we could map densities in the same way that we map mass functions the second histogram would also be approximately flat.
Unnumbered Figure: First link, Second Link
In the following we will see different methods of obtaining the cdf and pdf of the transformed random variable when is a continuous random variable with cdf and pdf .