Results 1 to 4 of 4

Thread: c.d.f. of a random variable, given pdf

  1. #1
    Member
    Joined
    Feb 2011
    Posts
    83
    Thanks
    2

    c.d.f. of a random variable, given pdf

    pdf is given by

    $\displaystyle f(x) = 2-4|x| if -1/2 < x < 1/2$ and $\displaystyle 0$ otherwise

    I cant do the integral of $\displaystyle 2-4|x|$ so I am going to make 2 cases, $\displaystyle x < 0$ and $\displaystyle x > 0.$

    $\displaystyle If x < 0 , f(x) = 2+4x$ for $\displaystyle -1/2 < x < 0$

    So we look at $\displaystyle \int_{x}^{0} 2+4t \text{d}t = -2x(x+1)$

    $\displaystyle If x > 0 , f(x) = 2x-4x $for $\displaystyle 0 < x < 1/2$

    So we look at $\displaystyle \int_{0}^{x} 2-4t \text{d}t = -2x(x-1)$

    So I figure the cdf should be

    $\displaystyle F_X(x) = $

    $\displaystyle 0 $ if $\displaystyle x \leq -1/2$

    $\displaystyle -2x(x+1) $ if $\displaystyle -1/2 < x < 0$

    $\displaystyle -2x(x-1) + \int_{-1/2}^{0} 2+4t \text{d}t = -2x(x-1) + 1/2 $
    if $\displaystyle 0 \leq x < 1/2$

    $\displaystyle 1$ if $\displaystyle x \geq 1/2$

    So i think is make sense to put $\displaystyle 0$ with the positive case. Since the adding of the $\displaystyle 1/2$ captures all the probabilities for negative values. However I think the function for $\displaystyle -1/2 < x < 0$ is wrong. Lower numbers are giving me higher probabilities than numbers close to $\displaystyle 0$. So something must be wrong.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Flow Master
    mr fantastic's Avatar
    Joined
    Dec 2007
    From
    Zeitgeist
    Posts
    16,948
    Thanks
    9
    Quote Originally Posted by Jame View Post
    pdf is given by

    $\displaystyle f(x) = 2-4|x| if -1/2 < x < 1/2$ and $\displaystyle 0$ otherwise

    I cant do the integral of $\displaystyle 2-4|x|$ so I am going to make 2 cases, $\displaystyle x < 0$ and $\displaystyle x > 0.$

    $\displaystyle If x < 0 , f(x) = 2+4x$ for $\displaystyle -1/2 < x < 0$

    So we look at $\displaystyle \int_{x}^{0} 2+4t \text{d}t = -2x(x+1)$

    $\displaystyle If x > 0 , f(x) = 2x-4x $for $\displaystyle 0 < x < 1/2$

    So we look at $\displaystyle \int_{0}^{x} 2-4t \text{d}t = -2x(x-1)$

    So I figure the cdf should be

    $\displaystyle F_X(x) = $

    $\displaystyle 0 $ if $\displaystyle x \leq -1/2$

    $\displaystyle -2x(x+1) $ if $\displaystyle -1/2 < x < 0$

    $\displaystyle -2x(x-1) + \int_{-1/2}^{0} 2+4t \text{d}t = -2x(x-1) + 1/2 $
    if $\displaystyle 0 \leq x < 1/2$

    $\displaystyle 1$ if $\displaystyle x \geq 1/2$

    So i think is make sense to put $\displaystyle 0$ with the positive case. Since the adding of the $\displaystyle 1/2$ captures all the probabilities for negative values. However I think the function for $\displaystyle -1/2 < x < 0$ is wrong. Lower numbers are giving me higher probabilities than numbers close to $\displaystyle 0$. So something must be wrong.
    It should be apparent that:

    Case 1: $\displaystyle x < -\frac{1}{2}$. $\displaystyle \displaystyle F(x) = 0$.

    Case 2: $\displaystyle -\frac{1}{2} \leq x \leq 0$. $\displaystyle \displaystyle F(x) = \int_{-1/2}^{x} (2 + 4t) \, dt$.

    Case 3: $\displaystyle 0 < x \leq \frac{1}{2}$. $\displaystyle \displaystyle F(x) = \frac{1}{2} + \int_{0}^{x} (2 - 4t) \, dt$.

    Case 4: $\displaystyle x > \frac{1}{2}$. $\displaystyle \displaystyle F(x) = 1$.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Member
    Joined
    Feb 2011
    Posts
    83
    Thanks
    2
    I have another question about this random variable.

    I got that the expected value,

    $\displaystyle E[X] = \int_{-1/2}^{0} x(2+4x) \; \text{d}x + \int_{0}^{1/2} x(2-4x) \; \text{d}x = 0$

    Can I not break up the function to calculate the expected value?
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Flow Master
    mr fantastic's Avatar
    Joined
    Dec 2007
    From
    Zeitgeist
    Posts
    16,948
    Thanks
    9
    Quote Originally Posted by Jame View Post
    I have another question about this random variable.

    I got that the expected value,

    $\displaystyle E[X] = \int_{-1/2}^{0} x(2+4x) \; \text{d}x + \int_{0}^{1/2} x(2-4x) \; \text{d}x = 0$

    Can I not break up the function to calculate the expected value?
    Yes you can, which is what you appear to have done. But I would have used the fact that f(x) is even and hence xf(x) is odd to get $\displaystyle \displaystyle \int_{-1/2}^{1/2} x f(x) \, dx = 0$.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 1
    Last Post: Oct 15th 2012, 10:37 PM
  2. exponential random variable with a random mean?
    Posted in the Advanced Statistics Forum
    Replies: 2
    Last Post: Mar 21st 2010, 02:05 PM
  3. Replies: 9
    Last Post: Jan 28th 2010, 07:26 AM
  4. Replies: 3
    Last Post: Jan 13th 2010, 10:44 AM
  5. Mean of random variable
    Posted in the Advanced Statistics Forum
    Replies: 4
    Last Post: Mar 31st 2008, 08:42 PM

Search Tags


/mathhelpforum @mathhelpforum