# Functions of Continuous random variables

I have been working on this problem and can't seem to get the answer.

Problem:
X is a continuous random variable with a proabaility density function:

f(x) = 1/4 if -2<=x<=2
0 other wise

Let Y=1/X. Then P(Y<=1/2) = ?

This is how I approached the problem:

P(Y<=1/2)=P(1/x=1/2)
=P(X>=2)

Taking the intergral of f(x) with limits of integration -2,2.

However the answer given is 1/2.

Any ideas.

Hmm.. Since it is given in the question that x runs from -2 to 2 only, how can $$P(X\geq2)$$ be 1? Shouldn't it be 0?

Well, your working $$P(Y\leq \frac{1}{2}) = P(\frac{1}{X}\leq \frac{1}{2})$$ is correct. The error lies in your subsequent statement "which is in turn equal to $$P(X\geq2)$$"

You see, since x runs from -2 to 2, it can take both positive and negative values. So, should we treat x as positive or negative, knowing that the subsequent working will be affected by our decision? (i.e. If x is negative, then we will need to change the inequality sign when cross-multiplying)

To solve this problem, we multiply the inequality by $$x^2$$, since we know for sure that this expression is positive (x cannot be equal to zero if y is to be real)

The resulting inequality will be quadratic in nature, and some algebraic manipulation should get you the desired probability of 0.5.

All the best!

Last edited: