Probability density of a new variable

In summary: I'm sorry, I don't understand what you're trying to say. Can you please clarify?In summary, Ray explains that the probability density of a variable, in this case X, is F(x) where F is the cumulative distribution function. He then goes on to say that the mean and variance of a variable, Y, can be found using the following equation: fY(y) = dFY(y)/dy. This equation can be solved for y, but he says that different fX's, all with the same mean and variance, can give different values for EY and Var(Y). However, he says that EY and Var(Y) can be found using integrals involving y and fX(
  • #1
fluidistic
Gold Member
3,924
261

Homework Statement


Let X be a continuous random variable with parameters [itex]\langle x \rangle[/itex] and [itex]\sigma[/itex].
Calculate the probability density of the variable Y=exp(X). Calculate the mean and the variance of Y.


Homework Equations


Reichl's 2nd edition book page 180:
[itex]P_Y(y)=\sum _{-\infty}^{\infty} \delta (y-H(x))P_X(x)dx[/itex] where H(x)=Y, so I guess, H(x)=exp (x).


The Attempt at a Solution


I used the given formula and reached [itex]P_Y(y)=P_X (\ln y)[/itex]. Is this the correct answer?
I don't really know how to calculate the mean, [itex]\langle y \rangle[/itex]. I guess they want it in function of the mean of X, namely [itex]\langle x \rangle[/itex].
I know that [itex]\langle x \rangle=\int _{-\infty}^{\infty} xP_X(x)dx[/itex] and that [itex]\langle y \rangle=\int _{0}^{\infty} yP_Y(y)dy[/itex]. But this does not help me much. Any idea on how to continue further?
 
Physics news on Phys.org
  • #2
fluidistic said:

Homework Statement


Let X be a continuous random variable with parameters [itex]\langle x \rangle[/itex] and [itex]\sigma[/itex].
Calculate the probability density of the variable Y=exp(X). Calculate the mean and the variance of Y.


Homework Equations


Reichl's 2nd edition book page 180:
[itex]P_Y(y)=\sum _{-\infty}^{\infty} \delta (y-H(x))P_X(x)dx[/itex] where H(x)=Y, so I guess, H(x)=exp (x).


The Attempt at a Solution


I used the given formula and reached [itex]P_Y(y)=P_X (\ln y)[/itex]. Is this the correct answer?
I don't really know how to calculate the mean, [itex]\langle y \rangle[/itex]. I guess they want it in function of the mean of X, namely [itex]\langle x \rangle[/itex].
I know that [itex]\langle x \rangle=\int _{-\infty}^{\infty} xP_X(x)dx[/itex] and that [itex]\langle y \rangle=\int _{0}^{\infty} yP_Y(y)dy[/itex]. But this does not help me much. Any idea on how to continue further?

I hate using canned formulas without thoroughly understanding them, so I prefer to proceed from first principles. In this case, Y > 0 because exp(X) is never negative or zero. So, given a value y > 0 we have P{Y <= y} = P{exp(X) <= y} = P{X <= ln(y)} = F(ln(y)), where F is the cumulative distaribution of X. That is, FY(y) = FX(ln(y)). Now get the density of Y as fY(y) = d FY(y) /dy, which you can express in terms of fX. Now, even if we know m = EX and σ^2 = Var(X) that does not help: different fX, all having the same mean and variance, can give different values for EY and Var(Y). However, we can express EY and Var(Y) in terms of integrations involving y and fX(ln y).

RGV
 
  • #3
First let me thank you very much Ray for all the help so far.
Ray Vickson said:
I hate using canned formulas without thoroughly understanding them, so I prefer to proceed from first principles. In this case, Y > 0 because exp(X) is never negative or zero. So, given a value y > 0 we have P{Y <= y} = P{exp(X) <= y} = P{X <= ln(y)} = F(ln(y)), where F is the cumulative distaribution of X. That is, FY(y) = FX(ln(y)).
Ok this is what I've got, namely that [itex]P_Y(y)=P_X (\ln y)[/itex], using Dirac's delta.
Now get the density of Y as fY(y) = d FY(y) /dy, which you can express in terms of fX.
I am a bit lost here. Why do you take the derivative?
Now, even if we know m = EX and σ^2 = Var(X) that does not help: different fX, all having the same mean and variance, can give different values for EY and Var(Y). However, we can express EY and Var(Y) in terms of integrations involving y and fX(ln y).

RGV

Okay I'll try once I understand the previous point!
 
  • #4
fluidistic said:
First let me thank you very much Ray for all the help so far.Ok this is what I've got, namely that [itex]P_Y(y)=P_X (\ln y)[/itex], using Dirac's delta.

I am a bit lost here. Why do you take the derivative?


Okay I'll try once I understand the previous point!

Why the derivative? Well, F is the cumulative distribution, so to get the density you need to differentiate it! Surely you must know this.

RGV
 
  • #5
Ray Vickson said:
Why the derivative? Well, F is the cumulative distribution, so to get the density you need to differentiate it! Surely you must know this.

RGV
I had never read the term "cumulative distribution" before, nor does it appear in my textbook. But apparently it's "just" the distribution function and I had never seen the relationship between it and the probability density!
So it means that what I've done using the definition in the book is wrong. I'll work on this tomorrow as I must wake up in a few hours.
Thanks for the lesson.
 
  • #6
fluidistic said:
I had never read the term "cumulative distribution" before, nor does it appear in my textbook. But apparently it's "just" the distribution function and I had never seen the relationship between it and the probability density!
So it means that what I've done using the definition in the book is wrong. I'll work on this tomorrow as I must wake up in a few hours.
Thanks for the lesson.

It is true that the modifier 'cumulative' is often dropped nowadays, and we just say 'distribution function', but I was not sure what convention you or your book were following. However, I am shocked that you have not been exposed to the relation between the distribution function F and the density function f; that is absolutely one of the basic probability relations.

What you did might not have been wrong; maybe your book uses a different notation or terminology from everyone else. Rather than relying on words and names, you need to look instead at ideas and concepts.

RGV
 
  • #7
Ok I have more time for the next days for these problems.
I've checked my textbook, now I see the difference between the distribution function and the probability function, I also realize that the latter is the derivative of the former.
However, even though the book uses that same terminology, it still clearly says
Often we wish to find the probability density, not for the stochastic variable, X, but for some new stochastic variable, Y=H(x), where H(x) is a known function of X. The probability density, [itex]P_Y(y)[/itex], for the stochastic variable, Y, is defined as [itex]P_Y(y)=\int _{-\infty}^{\infty} \delta (y-H(x))P_X(x)dx[/itex]
And a few pages before,
Note that the probability density function is just the derivative of the distribution function, [itex]P_X(x)=dF_X(x)/dx[/itex]
So the book uses the same notation as yours. Yet I found out (using the cookbook formula), [itex]P_Y(y)=P_X (\ln y)[/itex] while you found out [itex]F_Y(y) = F_X(ln(y))[/itex] which are two different things.
I guess I haven't applied well the Dirac's delta then? Is the textbook wrong on that formula? Since my professor gave it in the course that seems rather strange, though possible of course.
 
  • #8
fluidistic said:
Ok I have more time for the next days for these problems.
I've checked my textbook, now I see the difference between the distribution function and the probability function, I also realize that the latter is the derivative of the former.
However, even though the book uses that same terminology, it still clearly says
And a few pages before,
So the book uses the same notation as yours. Yet I found out (using the cookbook formula), [itex]P_Y(y)=P_X (\ln y)[/itex] while you found out [itex]F_Y(y) = F_X(ln(y))[/itex] which are two different things.
I guess I haven't applied well the Dirac's delta then? Is the textbook wrong on that formula? Since my professor gave it in the course that seems rather strange, though possible of course.

You need to be very, very careful about using things like ##\delta(y - H(x))## in an x-integral; that is why you obtained the wrong answer. Essentially, you need to change variables to z = H(x), with $$dz = H'(x) dx \longrightarrow
dx = \frac{dz}{H'(H^{-1}(z))}.$$ For H(x) = exp(x), this implies
$$ dz = z dx, \longrightarrow dx = dz/z.$$ We thus get
$$ \int \delta(y - H(x)) f_X(x) \, dx = \int \delta(y - z) f_X(\ln z) \frac{dz}{z}
= \frac{1}{y} f_X(\ln y).$$ This is exactly what you get if you apply the method I suggested before. It disagrees with your computation.

Because use of the δ is so tricky, I prefer to avoid it like the plague. However, use it if you want, but be careful.

RGV
 
  • #9
Ray Vickson said:
You need to be very, very careful about using things like ##\delta(y - H(x))## in an x-integral; that is why you obtained the wrong answer. Essentially, you need to change variables to z = H(x), with $$dz = H'(x) dx \longrightarrow
dx = \frac{dz}{H'(H^{-1}(z))}.$$ For H(x) = exp(x), this implies
$$ dz = z dx, \longrightarrow dx = dz/z.$$ We thus get
$$ \int \delta(y - H(x)) f_X(x) \, dx = \int \delta(y - z) f_X(\ln z) \frac{dz}{z}
= \frac{1}{y} f_X(\ln y).$$ This is exactly what you get if you apply the method I suggested before. It disagrees with your computation.

Because use of the δ is so tricky, I prefer to avoid it like the plague. However, use it if you want, but be careful.

RGV
Ok thank you infinitely for this. I've just played around with Dirac's delta and found an "intuitive way" (for me at least) not to fall into the trap I've fell over.
If you're interested here is how I think about it: [itex]\int _{-\infty} ^{\infty} \delta (y-e^{x})P_X(x)dx[/itex]. Now I need to get the argument of the Dirac's delta equal to 0. This implies [itex]x=\ln y[/itex]. If I replace x by ln y in the expression, the dx becomes [itex]d \ln y = \frac{dy}{y}[/itex]. So that the integral is simply worth [itex]\frac{1}{y}P_X(\ln y)=P_Y(y)[/itex].
Edit: Ok this would answer the first question.
For the mean value, I get that [itex]\langle Y \rangle =\int _{-\infty} ^{\infty} y P_Y(y)dy= \int _0 ^{\infty} P_X (\ln y ) dy[/itex]. If I'm not wrong this is worth 1??! Because the distribution is supposed to be normalized. (details: [itex]\int _0 ^{\infty} P_X (\ln y ) dy=\int _{-\infty}^{\infty}P_X(y)dy[/itex] but since y is a dummy variable, this is equal to [itex]\int _{-\infty}^{\infty}P_X(x)dx[/itex] and I'm sure this is worth 1.)
 
Last edited:
  • #10
fluidistic said:
Ok thank you infinitely for this. I've just played around with Dirac's delta and found an "intuitive way" (for me at least) not to fall into the trap I've fell over.
If you're interested here is how I think about it: [itex]\int _{-\infty} ^{\infty} \delta (y-e^{x})P_X(x)dx[/itex]. Now I need to get the argument of the Dirac's delta equal to 0. This implies [itex]x=\ln y[/itex]. If I replace x by ln y in the expression, the dx becomes [itex]d \ln y = \frac{dy}{y}[/itex]. So that the integral is simply worth [itex]\frac{1}{y}P_X(\ln y)=P_Y(y)[/itex].
Edit: Ok this would answer the first question.
For the mean value, I get that [itex]\langle Y \rangle =\int _{-\infty} ^{\infty} y P_Y(y)dy= \int _0 ^{\infty} P_X (\ln y ) dy[/itex]. If I'm not wrong this is worth 1??! Because the distribution is supposed to be normalized. (details: [itex]\int _0 ^{\infty} P_X (\ln y ) dy=\int _{-\infty}^{\infty}P_X(y)dy[/itex] but since y is a dummy variable, this is equal to [itex]\int _{-\infty}^{\infty}P_X(x)dx[/itex] and I'm sure this is worth 1.)

That is exactlywhat I did above.

RGV
 
  • #11
Ray Vickson said:
That is exactlywhat I did above.

RGV
Yes I know :) I kind of reformulated what you wrote into my own "words".
What do you think about the mean value I found?
 

Related to Probability density of a new variable

What is probability density function (PDF)?

A probability density function (PDF) is a mathematical function that describes the relative likelihood for a random variable to take on a given value. It is used to represent the probability distribution of a continuous random variable.

How is probability density function (PDF) different from probability mass function (PMF)?

The main difference between PDF and PMF is that PDF is used for continuous random variables while PMF is used for discrete random variables. PDF gives the probability of a variable taking on a specific value, while PMF gives the probability of a variable taking on a range of values.

What is the relationship between probability density function (PDF) and cumulative distribution function (CDF)?

The cumulative distribution function (CDF) is the integral of the probability density function (PDF) and represents the probability that a random variable takes on a value less than or equal to a given value. In other words, the CDF is the area under the PDF curve up to a specific value.

What is the importance of probability density function (PDF) in statistics?

PDF is an essential concept in statistics as it allows us to understand the behavior of a continuous random variable and make predictions about the likelihood of certain outcomes. It is used in various statistical analyses, such as hypothesis testing and confidence interval calculations.

How is probability density function (PDF) used in real-world applications?

PDF is used in a wide range of real-world applications, including finance, physics, engineering, and machine learning. In finance, PDF is used to model stock prices and market trends. In physics, it is used to model the behavior of particles. In engineering, it is used to analyze the reliability of systems. In machine learning, it is used to model the probability of different outcomes in a dataset.

Similar threads

  • Calculus and Beyond Homework Help
Replies
2
Views
283
  • Calculus and Beyond Homework Help
Replies
19
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
877
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
619
  • Advanced Physics Homework Help
Replies
1
Views
867
  • Advanced Physics Homework Help
Replies
10
Views
691
  • Calculus and Beyond Homework Help
Replies
11
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
Back
Top