-- cumulative distribution function, probability density

In summary: As I posted, you can treat the function as defining relative probabilities. I.e. the relative likelihoods at two points correspond to the ratio of the values of the function at those points. Given that, what can you think of to do to the function to make its total integral equal... 1?
  • #1
saulwizard1
32
0

Homework Statement


For the next probability function: f(x)=x/4 for 0<x<2

Homework Equations


a) Get the probability function
b) Get the cumulative distribution function

The Attempt at a Solution


I don´t know if the problem is well written, and for that I'm lost with the first question.
f(0)=? f(1)=? f(2)=
 
Physics news on Phys.org
  • #2
The probability function is what you gave in part 1, isn't it? Or do you need to scale it so that the function sums to one to be a probability density function?
The CDF is just the integral of the PDF.
 
  • #3
RUber said:
The probability function is what you gave in part 1, isn't it? Or do you need to scale it so that the function sums to one to be a probability density function?
The CDF is just the integral of the PDF.

I suppose that the probability function is given in the exercise, and for the CDF, do I only need to solve the integral? Then, which is the next step?
 
  • #4
saulwizard1 said:
I suppose that the probability function is given in the exercise, and for the CDF, do I only need to solve the integral? Then, which is the next step?
Except that f as given is not a valid probability density function. Do you see why?
 
  • #5
haruspex said:
Except that f as given is not a valid probability density function. Do you see why?
I don´t know how to explain the reason, but the function is like it were incomplete, so the first step is to find the correct function, right? How can I do that? Or what are the steps?
 
  • #6
saulwizard1 said:
I don´t know how to explain the reason, but the function is like it were incomplete, so the first step is to find the correct function, right? How can I do that? Or what are the steps?
The reason is that the total probability should be 1.
 
  • #7
haruspex said:
The reason is that the total probability should be 1.
Yes, the probability is less than one, so how can I do to make the probabability be 1?
 
  • #8
saulwizard1 said:
Yes, the probability is less than one, so how can I do to make the probabability be 1?
Think of f as specifying the relative probabilities.
 
  • #9
I am pretty sure you need to assume that p(x not in [0,2]) = 0.
So, to solve this problem, you need to focus on the goal of total probability being 1.
What is ##\int_0^2 x/4 dx ##? Is there a C such that ##\int_0^2 Cx/4 dx = 1 ##? If there is, then your PDF is ##f(x) = Cx/4## and your CDF is ##F(x) = \int_0^x Cy/4 dy##.
 
  • #10
RUber said:
I am pretty sure you need to assume that p(x not in [0,2]) = 0.
So, to solve this problem, you need to focus on the goal of total probability being 1.
What is ##\int_0^2 x/4 dx ##? Is there a C such that ##\int_0^2 Cx/4 dx = 1 ##? If there is, then your PDF is ##f(x) = Cx/4## and your CDF is ##F(x) = \int_0^x Cy/4 dy##.
Ok please, can you explain me in more detail? I'm a little confused about the topic and for your information I'm 17 y/o, so please take this into consideration.
 
  • #11
saulwizard1 said:
Ok please, can you explain me in more detail? I'm a little confused about the topic and for your information I'm 17 y/o, so please take this into consideration.

We cannot help you without having more information about your background. Do you know basic calculus? Do you know what integration is, and how to do some elementary examples of it? Are you working with a textbook (even if you are not officially registered in a course)?
 
  • #12
Ray Vickson said:
We cannot help you without having more information about your background. Do you know basic calculus? Do you know what integration is, and how to do some elementary examples of it? Are you working with a textbook (even if you are not officially registered in a course)?
My background is that I know a little about integral calculus, I can do some indefinite integrals, I am working with the notes of my older brother and I only have the exercise but not the answer or procedure. About probability, these are my first steps on the subject and I´m doing this because I want to learn what my brother learned.
 
  • #13
saulwizard1 said:
My background is that I know a little about integral calculus, I can do some indefinite integrals, I am working with the notes of my older brother and I only have the exercise but not the answer or procedure. About probability, these are my first steps on the subject and I´m doing this because I want to learn what my brother learned.
As I posted, you can treat the function as defining relative probabilities. I.e. the relative likelihoods at two points correspond to the ratio of the values of the function at those points. Given that, what can you think of to do to the function to make its total integral equal 1?
 
  • #14
First things first, do you know how to integrate x/4? To get the integral from 0 to 2 you evaluate the indefinite integral at 2 and subtract from that the evaluation at 0.
 
  • #15
Another useful tidbit when dealing with integrals is that multiplication by a constant can pass through the integral.
i.e. ## \int_0^2 x/4 dx = \frac 14 \int_0^2 x dx ## this should help you with the scaling problem to make it equal 1.
 
  • #16
RUber said:
Another useful tidbit when dealing with integrals is that multiplication by a constant can pass through the integral.
i.e. ## \int_0^2 x/4 dx = \frac 14 \int_0^2 x dx ## this should help you with the scaling problem to make it equal 1.
I think that the result of integrate x/4 is equal to x^2/8 +c, right?
And then , the result of evaluate is equal to 1/2-0=1/2
 
  • #17
That's correct. So what should you multiply the function by in order for the integral to be 1?
 
  • #18
RUber said:
That's correct. So what should you multiply the function by in order for the integral to be 1?
I should multiply by 2, and if then I evaluate I get 2(2^2)/8-0=1-0=1, right?
 
  • #19
saulwizard1 said:
I should multiply by 2, and if then I evaluate I get 2(2^2)/8-0=1-0=1, right?

Right. So, what is the formula you get for the probability density function ##p(x)## (the one that integrates to 1)? From that, what would be the formula for the cumulative distribution function ##F(x) = \int_0^x p(t) \, dt##?
 
  • #20
Ray Vickson said:
Right. So, what is the formula you get for the probability density function ##p(x)## (the one that integrates to 1)? From that, what would be the formula for the cumulative distribution function ##F(x) = \int_0^x p(t) \, dt##?
The formula for probability function is ##f(x) = Cx/4## ##f(x)=2x/4##
F(x) would be ##x^2/4## and for evaluate do I need to substitute x vith the values (0,1 and 2)?
Am I correct?
 
  • #21
saulwizard1 said:
F(x) would be ##x^2/4## and for evaluate do I need to substitute x vith the values (0,1 and 2)?
Am I correct?
Evaluate? The question as initially posted only asked that you find F, which you have done.
 
  • #22
haruspex said:
Evaluate? The question as initially posted only asked that you find F, which you have done.
Ok, so now I have the answer for the two questions. And for example, if I want to make a chart with the probability of the values of x, in that case, do I need to evaluate, or what I have to do?
 
  • #23
saulwizard1 said:
Ok, so now I have the answer for the two questions. And for example, if I want to make a chart with the probability of the values of x, in that case, do I need to evaluate, or what I have to do?
It depends what you mean by 'probability values'. This is a continuous distribution, so P[X=x] = 0. You can chart probability density values, or CDF values (P[X<x]).
 
  • #24
haruspex said:
It depends what you mean by 'probability values'. This is a continuous distribution, so P[X=x] = 0. You can chart probability density values, or CDF values (P[X<x]).
I'd be interested in doing a chart of CDF values. How can I get the values?
 
  • #25
saulwizard1 said:
I'd be interested in doing a chart of CDF values. How can I get the values?
Just plug the x values into your F(x) formula.
 
  • #26
saulwizard1 said:
The formula for probability function is ##f(x) = Cx/4## ##f(x)=2x/4##
F(x) would be ##x^2/4## and for evaluate do I need to substitute x vith the values (0,1 and 2)?
Am I correct?

Your formula for ##f(x)## can be simplified from##f(x) = 2x/4## to ##f(x) = x/2##.

Strictly speaking, we really ought to write it as ##f(x) = I_{(0,2)}(x) \cdot x/2##, where the "indicator" function ##I_{(a,b)}## is 1 for ##x## in the interval ##(a,b)## and is 0 otherwise. In other words,
[tex] f(x) = I_{(0,2)}(x)\cdot x/2 = \begin{cases} 0& x \leq 2 \\x/2 & 0 < x < 2 \\ 0 & x \geq 2 \end{cases} [/tex]
Also, if we are being picky we ought to write the cdf in a similar way:
[tex] F(x) = \begin{cases} 0 & x \leq 0 \\ x^2/4 & 0 < x < 2 \\ 1 & x \geq 2 \end{cases} [/tex]
However, as long as you remember to use your formulas only for ##0 < x < 2## you can just use the simpler form.
 
  • #27
Another question, this method only applies in cases similar to this one, cases in which the probability is less than one? In a case when I already have the probability equal to one, do I only need to evaluate the function in the intervale (a,b) or I have to do another procedure?
 
  • #28
As a rule, total probability of all possible outcomes is always 1. So, in order to determine odds, you will always need it scaled. Other than that, note what Ray said in #26.
 
  • #29
Thank you so much, I really appreciate your help and that you shared your knowledge with me!
 

1. What is a cumulative distribution function (CDF)?

A cumulative distribution function (CDF) is a mathematical function that maps the probability of a random variable being less than or equal to a certain value. In other words, it gives the probability of a certain outcome or event occurring.

2. How is a CDF different from a probability density function (PDF)?

A CDF gives the cumulative probability of a random variable being less than or equal to a certain value, while a PDF gives the probability of a specific outcome occurring. In other words, a CDF represents the overall distribution of a random variable, while a PDF represents the likelihood of a specific outcome within that distribution.

3. How is a CDF used in statistics?

A CDF is used to calculate the probability of a random variable being within a certain range or having a certain value. It is also used to compare the distributions of two or more random variables. Additionally, it can be used to find the median and quartiles of a distribution.

4. What is the relationship between a CDF and a survival function?

A survival function is the complement of a CDF, meaning it gives the probability of a random variable being greater than a certain value. In other words, it represents the probability of surviving beyond a certain time or value. The two functions are related in that they both provide information about the probability of a random variable's outcome.

5. How is a CDF graphically represented?

A CDF is typically graphed as a step function, with the x-axis representing the possible values of the random variable and the y-axis representing the cumulative probability. It starts at 0 on the y-axis and ends at 1, as the probability of a random variable being less than or equal to infinity is 1.

Similar threads

Replies
3
Views
194
  • Precalculus Mathematics Homework Help
Replies
6
Views
1K
  • Precalculus Mathematics Homework Help
Replies
4
Views
497
  • Precalculus Mathematics Homework Help
Replies
10
Views
827
  • Materials and Chemical Engineering
Replies
14
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
2K
  • Precalculus Mathematics Homework Help
Replies
7
Views
372
Replies
7
Views
1K
  • Precalculus Mathematics Homework Help
Replies
11
Views
491
  • Precalculus Mathematics Homework Help
Replies
6
Views
1K
Back
Top