1
$\begingroup$

Consider a random variable $X$. We want to compute $Z = 5X$.

Now, you could say that

$$f_Z(z)= P(Z=z) = P(5X=z) = P(X=\frac{z}{5})= f_X(z/5)$$

All of those operations seem legal to me, but obviously the result is wrong. In the proper answer the density distribution should be replaced by the cumulative distribution. So which operation here is now allowed and why?

  • 3
    Well, $f_Z(z)$ isn't the probability of $Z=z$, which is $0$. It's the derivative of the cdf. So you can't write that.2017-02-06
  • 0
    @Blaza, good point! Would it then work with a discrete variable, where that is not an issue?2017-02-06
  • 3
    Taking $f$ to be the probability mass function a discrete variable (it doesn't have a density), that result obviously works, as you derived it.2017-02-06
  • 0
    There is some confusion here. I suppose it's because you didn't say whether $X$ has a discrete or a continuous distribution. My Answer below looks at both cases. Please leave a Comment if you don't understand it.2017-02-06

1 Answers 1

2

The mechanics of doing a transformation differ, depending on whether the distribution is discrete or continuous.

Continuous Distribution. Suppose $X \sim \mathsf{Exp}(rate = \lambda = 2),$ so that the PDF is $f_X(x) = \lambda e^{-\lambda x},$ for $x > 0;$ and the CDF is $F_X(x) = 1 - e^{\lambda x},$ for $x > 0.$

Method 1: The CDF of $Z = 5X$ can be found as

$$F_Z(z) = P(Z \leq z) = P(5X \leq z) = P(X \leq .2z) = 1 - e^{\lambda(.2x)} = 1 - e^{-.2\lambda z},$$ for $z > 0.$ Thus $Z \sim \mathsf{Exp}(rate = .2\lambda = \lambda/5).$

Notice that $E(X) = 1/2 = 1/\lambda$ and $E(Z) = E(5X) = 5E(X) = 5/\lambda = 2.5.$

Method 2: Denote the transformation as $z = h(x) = 5x,$ so that the inverse transformation is $x = h^{-1}(z) = 0.2z$ and $dx/dz = 0.2.$

Then for single-valued increasing transformations such as this one, there is a theorem that states:

$$f_Z(z) = f_X(h^{-1}(z))\times \frac{dh^{-1}}{dz} = f_X(0.2z)\times 0.2 = \lambda e^{-\lambda(0.2z)}\times 0.2 = .4 e^{0.4 z},$$ for $z > 0.$ This is the density function of $\mathsf{Exp}(2/5).$ I suppose you can find this theorem in your text.

Intuitively, the reason for the factor $dh^{-1}/dz = .2$ is that the PDF of $Z$ is 'five times as wide' as the PDF of $X,$ so it needs to be 'one-fifth as tall' in order to maintain the mandatory unit area under the PDF curve. (Under each curve, 95% of the area is to the left of the vertical red line.)

enter image description here

Discrete Distribution. Suppose that $Y$ is the number of spots showing when a fair die is rolled, and that the payout in a game is \$5 per spot. Then the payout from a roll of the die is $W = 5Y$ dollars. The possible values of $Y$ are the integers from 1 through 6. The possible values of $W$ are 5, 10, 15, 20, 25, 30.

For $i = 1, 2, 3, 4, 5,$ we have $p_Y(i) = P(Y = i) = 1/6.$ And $p_W(5i) = P(W = 5i) = 1/6.$

Here, $E(Y) = 3.5$ and $E(W) = E(5Y) = 5E(Y) = 5(3.5) = 17.5$ dollars.