# Simple Question regarding Random Variables

1. Apr 6, 2013

### Tamis

Oke this is a simple question but it has me a bit stumped.

Given a random variable $X$ with a uniform probability distribution between [0,2].

What is the probability distribution function (pdf) of $X^2$ ?

Last edited: Apr 6, 2013
2. Apr 6, 2013

### Stephen Tashi

Caclulate the cumulative distribution of $X^2$ by integration. Then find it's pdf by differentiating its cumulative.

3. Apr 6, 2013

### Mandelbroth

Well, let's think through it logically. According to what you have said, the probability distribution function for $X$ is $P(X=k)=\left\{\begin{matrix} 1/2 & k\in [0,2] \\ 0 & k\not\in [0,2] \end{matrix}\right.$

If $X$ is between 0 and 2, then $X^2$ is between 0 and 4. Since we square the stochastic variable, we square its pdf to attain the probability distribution.

Thus, our new pdf is given by $P(X^2=k)=\left\{\begin{matrix} 1/4 & k\in [0,4] \\ 0 & k\not\in [0,4] \end{matrix}\right.$.

4. Apr 6, 2013

### Stephen Tashi

That isn't correct. Do the integration instead.

$P(X^2 \le x) = P( 0 \le X \le \sqrt{x})$ since, in this particular problem, $X$ has zero probability of being in $[-\sqrt{x},0]$.
For $0 \le x \le 4$ , the cumulative is given by:
$P(X^2 \le x) = \int_0^{\sqrt{x}} \frac{1}{2} dx$

5. Apr 6, 2013

### Tamis

Thnx Stephen! that was exactly what i was looking for!

6. Apr 6, 2013

### Mandelbroth

That makes sense...but why doesn't my answer work? I'm off by a factor of $\frac{1}{\sqrt{x}}$.

Edit: Derp. The square root of a positive real number greater than 1 is a smaller positive real number. Thus, there is a skew. Sorry. Ignore me while I sit in the corner of shame.:tongue:

Last edited: Apr 6, 2013
7. Apr 6, 2013

### Stephen Tashi

This problem is an example of the fact that the pdf f(x) of a continuous random variable X doesn't really have the interpretation "f(x) is the probability that X = x".

If it did have that interpretation then we could claim "the probability that X^2 = x) = the probability that X = sqrt(x) or x = - sqrt(x)), which in this problem is the probability that X = sqrt(x), which is the constant 1/2 for x in [0,4]".

Even though thinking about a pdf in such a manner gives the wrong answer in this problem, there are many other situations in probability theory where thinking about the pdf in that wrong way does suggest the correct formula.

8. Apr 10, 2013

### NegativeDept

Another way to solve this type of problem is the change-of-variables rule for PDFs.

The method Stephen Tashi described is also useful. IMO it is a very good idea to do some simple practice problems (like this one) with both methods.