1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Finding CDF of a Continuous R.V.

  1. Jan 30, 2013 #1
    1. The problem statement, all variables and given/known data

    Let
    f(x) = (1 + cx)/2 for x between -1 and 1 and f(x)=0 otherwise, where c is between -1 and 1. Show that f is a density and find the corresponding cdf. Find the quartiles and the median of the distribution in terms c.

    2. Relevant equations

    NA

    3. The attempt at a solution

    I simply showed that this was a density by integrating f(x) from -1 to 1 and showing that this is 1.

    For the second part of the problem, I found the CDF to be F(x) = 1/2(x+(cx^2)/2) for -1≤x≤1.
    Clearly, F(x) = 0 for -1<x. However, is F(x) = 1 for x>1?

    In addition, I am having trouble properly interpreting the directions for finding the quartiles and median. Should my answer be a function of c? If so, how do I go about getting there? Thank you!
     
    Last edited: Jan 30, 2013
  2. jcsd
  3. Jan 30, 2013 #2

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    Your CDF is wrong. For ##x<-1, F(x) = \int_{-\infty}^x 0\, dx = 0##. For ##x## bewteen -1 and 1, you should be calculating$$
    F(x) = \int_{-\infty}^x f(x)\, dx =\int_{-\infty}^{-1} 0\, dx +
    \int_{-1}^x \frac {1+cx} 2\, dx$$Now do you see what to do for ##x>1##?
     
    Last edited: Jan 30, 2013
  4. Jan 30, 2013 #3
    Thanks for your response! Why would I be taking the integral of 1/2(x+(cx^2)/2) to find the CDF, and not the integral of (1+cx)/2, which is my density function?
     
  5. Jan 30, 2013 #4

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    You shouldn't, of course. My eyes fell on the wrong function while typing. I will correct it.
     
  6. Jan 31, 2013 #5
    Got it. Thanks!

    Do you have any suggestions on the quartiles and medians?
     
  7. Jan 31, 2013 #6

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Despite that observation, your cdf is still wrong.
    [tex]F(x) = \frac{1}{2} \int_{-1}^x 1 \, dt + \frac{1}{2} \int_{-1}^x c t \, dt, \:
    -1 \leq x \leq 1.[/tex] This will = 0 at x = -1 and = 1 at x = 1, no matter what is the value of c.

    To get a 100p percentile, solve the quadratic equation F(x) = p.
     
  8. Jan 31, 2013 #7
    I am not entirely sure where my CDF is wrong or what you mean about c.
    Currently my CDF is as follows:

    P(X≤x) = 1/2(x+(cx^2)/2) if -1≤x≤1
    0 if x < -1
    1 if x > 1

    1/2(x+(cx^2)/2) was found by taking exactly the integral that you described.

    Do you mean instead that it should be:

    P(X≤x) = 1/2(x+(cx^2)/2) if -1<x<1
    0 if x ≤ -1
    1 if x ≥ 1

    Thank you!
     
  9. Jan 31, 2013 #8

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Do either of the above formulas give ##\lim_{x \downarrow -1} P(X \leq x) = 0## and ##\lim_{x \uparrow 1} P(X \leq x) = 1?## Since X is continuous, these must happen.
     
  10. Jan 31, 2013 #9
    gajohnson: don't confuse integral and antiderivate. For instance, try to compute the value of your CDF


    [itex]F\left ( x \right ) = \frac{1}{2}\left ( x + \frac{cx^2}{2} \right )[/itex]

    for [itex]x=-1[/itex]. Is it what you expected?

    The parameter [itex]c[/itex] will govern "how fast" your CDF climbs. Here is a graph of it between [itex]-1[/itex] and [itex]1[/itex], for various values of [itex]c[/itex].
     

    Attached Files:

    • cdf.png
      cdf.png
      File size:
      31.3 KB
      Views:
      148
  11. Jan 31, 2013 #10
    Ahhhh, yes. Not sure what I was thinking there.

    So, I ought to get F(x) = (x+1)/2 + c/4(x^2 -1) for -1≤x≤1
    =1 for x>1
    =0 for x<-1

    I believe I see what you were getting it (should not have taken so long). How does that look?
     
  12. Jan 31, 2013 #11
    Looks better to me :-)
     
  13. Jan 31, 2013 #12
    Great, thanks for the help, everyone!
     
    Last edited: Jan 31, 2013
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook