What is the probability density function of $g(S) =S/2$ for a triangle pdf

127 Views Asked by At

Say we have the following "triangle" probability density function:

$ p_{S}(s) = \left\{ \begin{array}{lr} s & : s \in[0,1]\\ 2-s & : s \in [1,2]\\ 0 & o.w. \end{array} \right. $

I want to sketch or write down a piece-wise probability density function of a new random variable $g(S) = S/2$. i.e. I am trying to find $p_{S/2}(k)$.

I know this is suppose to be a very easy question but I am having some difficulties doing it.

This is what I have so far:

$p_{S/2}(k) = P[\frac{S}{2} = k]= P[S = 2k] = p_S(2k)$

Thus, the answer I have is:

$ p_{\frac{S}{2}}(k) = \left\{ \begin{array}{lr} 2k & : k \in[0,0.5]\\ 2-2k & : k \in [0.5,1] \\ 0 & o.w. \end{array} \right. $

Which is obviously wrong because it doesn't integrate to 1.

My reasoning is the following. Whatever value of k we put to $p_{S/2}(k)$ it will be the same as $P_{S}(2k)$. For example, say that we had $k = 0.1$. Then $p_{S/2}(0.1) = p_{S}(0.2) = 0.2$. Which means $P_{S/2}(k) = 2k$ for k \in 0.5. But at $0.5+\epsilon$ (small $\epsilon$) we have for the first time a "switch" to the other side of $p_S(k)$. So any value in that range maps to $2-2k$. For other values the pdf is zero. I know this reasoning must be wrong because it gives me a pdf that doesn't integrate to 1.

Where did I go wrong? The ideal answer can explain what the answer is or why I am wrong, not only what the answer is, since I have solutions anyway.

2

There are 2 best solutions below

0
On BEST ANSWER

The reason your approach didn't work is that for a continuous r.v., $\Pr[S = k] = 0$, not $p_S(k)$.

For continuous random variables, we define the CDF (cumulative distribution function) by $F_{S}(k) = \Pr[S \le k]$. Then, the PDF (probability density function) is defined as $p_S(k) = F_S'(k)$.

So, instead of first calculating the PDF of $S/2$, let's calculate the CDF as follows:

$F_{S/2}(k) = \Pr[\frac{S}{2} \le k] = \Pr[S \le 2k] = F_{S}(2k)$.

Then, differentiate both sides to get the pdf. Don't forget the chain rule:

$p_{S/2}(k) = 2p_S(2k)$.

Now, you have the correct relationship. Also, this pdf integrates to one:

$\displaystyle\int_{0}^{1}p_{S/2}(k)\,dk = \int_{0}^{1}2p_{S}(2k)\,dk \overset{u = 2k \\ du = 2dk}{=} \int_{0}^{2}p_{S}(u)\,du = 1$.

Using the same line of reasoning, you can show that if $g(S)$ is a one-to-one function, then the pdf of $g(S)$ is given by $p_{g(S)}(k) = \dfrac{p_{S}(g^{-1}(k))}{|g'(k)|}$.

0
On

Hint: Your original pdf was a triangle with an area 1 under it (for normalization). Now you want a pdf for a variable that has half the range but should still be normalized. What should this pdf look like?