# basic problem computing pdf

#### stephanie

##### New Member
If I have a pdf, say X~Uniform[-3,3] and Y= -X, would the pdf of Y be 1/6 [-3,3] ? How would I get the pdf using P(-X < - y) = P(X > y) = 1 - P( X < y) = 1- integral 1/6 from -3,3 so differentiating to get pdf we get -1/6 for [-3,3] but the pdf is negative so I assume my assumption Y is 1/6 is right. Where did I make my mistake?

#### BGM

##### TS Contributor
Ok suppose you are first computing the CDF:

For $$y \in [-3, 3]$$,

$$F_Y(y) = \Pr\{Y \leq y\} = \Pr\{-X \leq y\} = \Pr\{X \geq -y\}$$

(Note that $$-y \in [-3, 3]$$ so the following integral hold)

$$= \int_{-y}^3 \frac {1} {6} dx = \frac {y + 3} {6}$$

Therefore by differentiation you obtain the desired answer.

Outside this range the CDF of $$Y$$ is constant (0 or 1) so $$[-3, 3]$$ is the support of $$Y$$