Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a probability issue that i am dealing with now. Maybe you could help me a bit :-) .

I have to calculate the density function of the random variable $Y= 1-X^2$, given that: $f(x) = \frac{1}{9}(x+1)^2$, where $-1 < x < 2$.

So I found that the domain of Y is $-3 < Y < 0$.

I found that distribution of $Y$ is: $0$ when $y < -3$ and $1$ when $y >0$.

At $-3<Y<0$ is :

$$\int_{-\sqrt{1-y}}^{\sqrt{1-y}}f(x) dx = \cdots = [2(1-y)^{\frac{3}{2}} + 6(1-y)^{\frac{1}{2}}]27$$

So, finally the density function of $Y$ is the derivative of $[2(1-y)^{\frac{3}{2}} + 6(1-y)^{\frac{1}{2}}]27 = \cdots = \frac{x-2}{9\sqrt{1-x}}$ at $-3<y<0$, $0$ else.

I think that the general idea is correct, but I am not sure at all for the results, for example maybe my domain is wrong or I might miss a calculation.

share|cite|improve this question
>So I found that the domain of $Y$ is $−3<Y<0$. Check your work. First, the range of $Y$ (i.e., the set of values of $Y$ that can be observed) is what you want, not the domain of $Y$. But even after correcting the nomenclature, consider what is the value of $Y$ when $X = 0$? Shouldn't that be included in the range of $Y$? – Dilip Sarwate May 23 '12 at 13:11
For starters, $F_X(x)=\frac{1}{9}(x+1)^2$ would be the CDF, not the PDF, of $X$ on the interval $(-1,2)$, since it is strictly increasing from $0$ to $1$ on this interval. $Y$ would fall in the interval $(-3,1]$. Try graphing $Y$ versus $X$, as will as their CDFs and PDFs. – bgins May 23 '12 at 13:13
@bgins Curiously enough, $\frac{1}{9}(x+1)^2\mathbf 1_{[-1,2]}$ is also a valid probability density function. – Dilip Sarwate May 23 '12 at 13:25
@DilipSarwate: Ahh, of course (not so curious really), since the average height under a parabola from its vertex out to some extent is one third the maximum height, and the extent is three. – bgins May 23 '12 at 13:46

From looking at the graph of $Y$ versus $X$ on the given $X$-domain, the open interval $(-1,2)$,

enter image description here

you can see that $Y\in(-3,1]$ (note that the interval is open at $-3$ but closed at $Y=1$ where $X=0$). The CDF of $Y$ can then be calculated from the CDF of $X$, after calculating that from the integral, as follows: $$ \eqalign{ F_X(x) &=P(X\le x)= \int_{-1}^{x}\tfrac19(1+t)^2\,dt =\tfrac1{27}\left[(1+t)^3\right]_{-1}^{x} =\tfrac1{27}(1+x)^3 \\\\ F_Y(y) &= P(Y\le y)=P(1-X^2\le y)=P(X^2\ge1-y)=P(|X|\ge\sqrt{1-y}) \\\\ &=\left\{\array{ 0&y\le-3\\ P\left(X\ge\sqrt{1-y}\right)\qquad&-3\lt y\le0\\ 1-P\left(|X|\le\sqrt{1-y}\right)\qquad&0\lt y\le1 \\1&y\ge1 }\right. \\\\ &= \left\{\array{ 0&y\le-3\\ 1-F_X\left(\sqrt{1-y}\right)\qquad&y\in(-3,0]\\ 1-F_X\left(\sqrt{1-y}\right)+F_X\left(-\sqrt{1-y}\right)\qquad&y\in(0,1] \\1&y\ge1 }\right. \\\\ &= \left\{\array{ 0&y\le-3\\ 1-\tfrac1{27}\left(1+\sqrt{1-y}\right)^3\qquad&y\in(-3,0]\\ 1-\tfrac1{27}\left[ \left(1+\sqrt{1-y}\right)^3- \left(1-\sqrt{1-y}\right)^3 \right]\qquad&y\in(0,1] \\1&y\ge1 }\right. } $$ which for $y\in(0,1]$ can also be simplified a bit further using $(1\pm r)^3=1\pm3r+3r^2\pm r^3$ thus: $$ (1+r)^3-(1-r)^3=2\,(3r+r^3)=2r\,(3+r^2)\qquad\implies $$ $$ F_Y(y)=1-\tfrac1{27}2\sqrt{1-y}~(3~+~1-y)=1-\frac{2\sqrt{1-y}\,(4-y)}{27} \quad\text{for}\quad y\in(0,1] $$ or differentiated to get the PDF: $$ \eqalign{ f_Y(y) &=\left\{\array{ 0 & \qquad y\le-3\quad\text{or}\quad y\gt1\\\\ \frac19+\frac{2-y}{18\sqrt{1-y}} & \qquad y\in(-3,0]\\\\ \frac{2-y}{9\sqrt{1-y}} & \qquad y\in(0,1] }\right. } $$ Here is the PDF $f_X(x)$, in red, and CDF $F_X(x)$, in blue, of $X$:

PDF (red) and CDF (blue) of X

and likewise for $Y$ (the PDF $f_Y(y)$ has a vertical asymptote at $1$):

PDF (red) and CDF (blue) of Y

Note that both CDFs are in fact (not only right- but also left-) continuous, so that it doesn't matter to which case we assign the transition points $-3$, $0$ and $1$; as @Dilip has pointed out, it could be considered better pedagogy to use left-closed, right-open intervals to emphasize that (CDF) distributions must be right-continuous.

The key step in my method is being able to replace the probabilities with differences of the (cumulative) distribution function for $X$ in the middle bracketed RHS above during the derivation of $F_Y$. This technique is known as the distribution function method or method of distribution functions. Alternate methods exist, for example integrating the product of $f_X$ with the derivative of the transformation function (or for multivariate transformations, the Jacobian). There is also a method using moment generating functions.

Again starting with the graph $Y=1-X^2$ above, if we approach it from an integral involving the PDF, as you do, we can still start as I did above, up to the first bracketed RHS involving probabilities:

$$ \eqalign{ F_Y(y)&=P\left(X\ge\sqrt{1-y}\right) \qquad\text{for}\qquad-3\lt y\le0\\ &=\int_{\sqrt{1-y}}^2f_X(x)\,dx =\int_{\sqrt{1-y}}^2\tfrac19(1+x)^2\,dx\\ &=\tfrac1{27}\left[(1+x)^3\right]_{\sqrt{1-y}}^2 =1-\tfrac1{27}\left(1+\sqrt{1-y}\right)^3 } $$ as above, and similarly for $y\in(-3,0]$. The key insight is still that $$ Y=1-X^2 \le y \iff X^2 \ge 1-y \iff |X| \ge \sqrt{1-y}, $$ which then must be handled seperately, depending on the sign of $x$.

share|cite|improve this answer
You need some additional lines in your answer. The CDF must have value $0$ for $y \leq -3$ and value $1$ for $y > 1$ and your expressions don't meet this requirement. – Dilip Sarwate May 23 '12 at 13:56
@DilipSarwate: thanks, although hopefully that is obvious once we know that the support of $Y$ is $(-3,1]$! – bgins May 23 '12 at 14:11
Isn't your revised final answer for the CDF complex-valued for $y > 1$ since it works out to be $$\frac{1}{27}\left[ 1 -\left(1+\sqrt{1-y}\right)^3 \right]$$ for $y > 1$ and so $1-y < 0$, $\sqrt{1-y} = i\sqrt{y-1}$? – Dilip Sarwate May 23 '12 at 14:54
Hey guys, alright, i got the domain part... obviously i forgot the case where X=0 therefore -3 < Y < 1 . But seriously i cant understand the poseter above. My answer is very simple. I will find first the distribution of Y using the the PDF of X. in this way: Integral -root(1-y) to root(1-y) f(x) dx. And what i find ill differate it to get the PDF of Y. I cant understand the above poster , to be honest. – Jane Fon. May 23 '12 at 16:06
Bah, another question, this one's solution is part on Complex numbers ? – Jane Fon. May 23 '12 at 16:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.