Finding CDF of a Continuous R.V.

  • Thread starter Thread starter gajohnson
  • Start date Start date
  • Tags Tags
    Cdf Continuous
Click For Summary

Homework Help Overview

The discussion revolves around finding the cumulative distribution function (CDF) of a continuous random variable defined by a piecewise function f(x) = (1 + cx)/2 for x in the interval [-1, 1], where c is a parameter between -1 and 1. Participants are tasked with verifying that f is a probability density function and subsequently determining the CDF, quartiles, and median in terms of c.

Discussion Character

  • Exploratory, Conceptual clarification, Mathematical reasoning, Problem interpretation

Approaches and Questions Raised

  • Participants discuss the integration of the density function to find the CDF and question the correctness of their derived expressions. There is confusion regarding the limits and behavior of the CDF at the boundaries of the defined intervals. Some participants express uncertainty about how to express the quartiles and median in terms of the parameter c.

Discussion Status

The conversation is active, with participants providing feedback on each other's CDF formulations and clarifying misunderstandings. Some have offered corrections regarding the integration process and the expected limits of the CDF. There is an ongoing exploration of how the parameter c influences the CDF's behavior.

Contextual Notes

Participants are working within the constraints of the problem statement, which requires them to express the CDF and related statistics in terms of the parameter c. There is an emphasis on ensuring that the CDF behaves correctly at the boundaries of the defined intervals.

gajohnson
Messages
70
Reaction score
0

Homework Statement



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.

Homework Equations



NA

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:
Physics news on Phys.org
gajohnson said:

Homework Statement



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.

Homework Equations



NA

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!

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:
LCKurtz said:
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 2 (x + \frac{cx^2}{2})\, dx$$Now do you see what to do for ##x>1##?

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?
 
gajohnson said:
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?

You shouldn't, of course. My eyes fell on the wrong function while typing. I will correct it.
 
LCKurtz said:
You shouldn't, of course. My eyes fell on the wrong function while typing. I will correct it.

Got it. Thanks!

Do you have any suggestions on the quartiles and medians?
 
gajohnson said:
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?

Despite that observation, your cdf is still wrong.
F(x) = \frac{1}{2} \int_{-1}^x 1 \, dt + \frac{1}{2} \int_{-1}^x c t \, dt, \:<br /> -1 \leq x \leq 1. 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.
 
Ray Vickson said:
Despite that observation, your cdf is still wrong.
F(x) = \frac{1}{2} \int_{-1}^x 1 \, dt + \frac{1}{2} \int_{-1}^x c t \, dt, \:<br /> -1 \leq x \leq 1. 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.

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!
 
gajohnson said:
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!

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.
 
gajohnson: don't confuse integral and antiderivate. For instance, try to compute the value of your CDF


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

for x=-1. Is it what you expected?

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

Attachments

  • cdf.png
    cdf.png
    22.7 KB · Views: 772
  • #10
jfgobin said:
gajohnson: don't confuse integral and antiderivate. For instance, try to compute the value of your CDF


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

for x=-1. Is it what you expected?

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

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?
 
  • #11
Looks better to me :-)
 
  • #12
jfgobin said:
Looks better to me :-)

Great, thanks for the help, everyone!
 
Last edited:

Similar threads

Replies
8
Views
1K
Replies
4
Views
2K
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
7
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 40 ·
2
Replies
40
Views
5K