PDF of an exponential distribution

In summary, The problem is to find the PDF of W = abs(X-λ), where X is an exponential R.V. with rate parameter λ>0. The PDF for an exponential distribution is ∫λe^(-λx)dx, and taking the derivative of a CDF will yield the PDF for that function. To solve this problem, we first note that the function V=abs(X-λ) is 2 to 1 from the range 0 to 2λ. Therefore, the CDF can be split into two parts, one for 0<W<2λ and the second for W<2λ. Next, we simplify Pr{abs(x-λ)≤w} into Pr{-w
  • #1
SallyY
3
0

Homework Statement


Hi! I'm trying to find the PDF of W = abs(X-λ), where X is an exponential R.V. with rate parameter λ>0.


Homework Equations


The PDF for an exponential distribution is ∫λe^(-λx)dx.
Taking the derivative of a CDF will yield the PDF for that function (I'm aware there are other methods, but I've not yet learned them so I'd like to stick to this one).


The Attempt at a Solution


First, it should be noted that the function V=abs(X-λ) is 2 to 1 from the range 0 to 2λ, so i think we split the CDF into two parts, one for 0<W<2λ, the second for W<2λ? I'm not entirely sure on this though!
Second, simplify Pr{abs(x-λ)≤w} into Pr{-w+λ≤x≤w+λ}. This should give us the bounds to integrate on for 0≤w≤2λ, I believe?
So we get ∫λe^(-λx)dx from {-w+λ} to {w+λ}, or
-e^(-λx) from {-w+λ} to {w+λ}.
This is where I run into trouble:
First, substituting in those numbers gives me a not-very-pretty equation for the CDF of w=abs(x-λ) {0<w<2λ}. Am I doing something wrong there?
Second, I'm not sure what to do with the rest of the CDF - do I just integrate the exponential distribution from 2λ to infinity?
Thanks so much for your help!
Sally
 
Physics news on Phys.org
  • #2
So, I agree that ##\mbox{Pr}(W \leq w) = \mbox{Pr}(|X-\lambda| \leq w) \Rightarrow \mbox{Pr}(\lambda-w \leq X \leq w+\lambda)##.

I want to make some comments on calculating the pdf from the CDF before I go further. First, it seems like you intend on evaluating the integral and then taking the derivative. You don't need to do this! You can differentiate the integral directly. Are you aware of the rule

$$\frac{d}{dx} \left[ \int_{a(x)}^{b(x)} dt~f(t)\right] = f(b(x)) \frac{db}{dx} - f(a(x))\frac{da}{dx}?$$

Using this rule will save you from having to evaluate the integral and then differentiate! (This rule - or rather a slight generalization of it which allows f(t) to also depend on x - is called the Leibniz rule. It also follows quite simply from the fundamental theorem of calculus: if the antiderivative of f(t) is F(t), then the integral is F(b(x))-F(a(x)). Taking the derivative of this and applying the chain rule gives the result I gave you).

The second thing I want to point out is that you have to be careful when taking the derivative because x cannot be negative. To take care of this issue, it would be easiest if you define your pdf for X not simply as ##\lambda e^{-\lambda x}## on ##x \in [0,\infty)## but as ##\lambda e^{-\lambda x}\Theta(x)## on ##x \in (-\infty,\infty)##, where ##\Theta(x)## is the Heaviside step function (=0 for x negative, 1 for x positive). Although these two forms are effectively the same, the second will be more convenient for calculating the pdf of w because it will automatically enforce the condition that x cannot be negative, so you won't have to worry about splitting the integral up into different cases.

Think you can take it from here?
 
  • #3
Mute said:
Think you can take it from here?
Thanks for your help! Unfortunately, I'm still pretty confused. The leibniz rule makes sense (probably learned it at some point:) ) but I'm a bit confused about the rest still!
First, I don't see how the heaviside step function helps in anything but a fairly trivial sense; is including it any different from adding a "0 if 0>w" to the PDF?
Second, for 0<w<2λ, do I use the leibniz rule with the exponential distribution PDF?
(I came up with λe(-λ^2-λw) - λe(-λ^2+λw))
Third, what do I do about the case where 2λ<w? I don't even know where to start there :(
Thanks so much for your help! I really appreciate it
 
  • #4
SallyY said:
Thanks for your help! Unfortunately, I'm still pretty confused. The leibniz rule makes sense (probably learned it at some point:) ) but I'm a bit confused about the rest still!
First, I don't see how the heaviside step function helps in anything but a fairly trivial sense; is including it any different from adding a "0 if 0>w" to the PDF?
Second, for 0<w<2λ, do I use the leibniz rule with the exponential distribution PDF?
(I came up with λe(-λ^2-λw) - λe(-λ^2+λw))
Third, what do I do about the case where 2λ<w? I don't even know where to start there :(
Thanks so much for your help! I really appreciate it

First, I should point out that the range for w is not 0 to ##2\lambda##. If ##W = |X-\lambda|##, what is the maximum possible value of that if ##X \in [0,\infty)##? I think you were maybe trying to find where the kink in the pdf will be and made a typo; the kink is not at ##2\lambda##.

The reason I put the Heaviside step function in explicitly is that the integral would otherwise look like

$$\int_{\lambda-w}^{\lambda+w}dx~\lambda e^{-\lambda x},$$
and because x must be greater than zero you'll have to split that up into a few different cases depending on the value of w.

However, if we put the step function in the definition of the integral, then when we apply the Leibniz rule we are basically setting ##x = \lambda+w## in the first term and ##x = \lambda - w## in second term, so the Heaviside step function will help us keep track of the allowed regions of w. This way keeps track of the separate cases for the different regions of w for you, although you can do it by splitting it up into cases if that's easier for you. I find the step functions generally help me.

However, if you do it with the step functions, I did forget that because your allowed range for w is w > 0, you will need to restrict w to that range by adding an additional overall ##\Theta(w)## that doesn't come from the ##\Theta(x)## in the integral as I wrote it. I'm afraid this isn't clearing things up for you at the moment, so perhaps try it again your way (show us your steps, please), and once you've found the solution perhaps I can show you how I did it.
 
Last edited:
  • #5
Hey, think I finished up here!
I know its not the fastest way, but I stuck with what i knew how to do and actually made the CDF before finding the PDF.
I found there to be three cases: w<0, 0<w<λ and λ<w. The first is trivially 0, the second one i integrated over (-w-λ to w-λ) and the third i integrated over (0 to w-λ), since X will always take on a positive value and λ<w. After that it was just fairly straight-forward integration/derivation, the CDF approached one as w->infinity and when I fixed a value for λ the ∫[my pdf] from 0 to infinity equaled one as well :) Thanks for your help!
 
  • #6
SallyY said:
Hey, think I finished up here!
I know its not the fastest way, but I stuck with what i knew how to do and actually made the CDF before finding the PDF.
I found there to be three cases: w<0, 0<w<λ and λ<w. The first is trivially 0, the second one i integrated over (-w-λ to w-λ) and the third i integrated over (0 to w-λ), since X will always take on a positive value and λ<w. After that it was just fairly straight-forward integration/derivation, the CDF approached one as w->infinity and when I fixed a value for λ the ∫[my pdf] from 0 to infinity equaled one as well :) Thanks for your help!

That is correct. Generally I would recommend your method whenever you have non-smooth functions such as | | involved, but that's just me: I like to go back to basics.

RGV
 
  • #7
SallyY said:
Hey, think I finished up here!
I know its not the fastest way, but I stuck with what i knew how to do and actually made the CDF before finding the PDF.
I found there to be three cases: w<0, 0<w<λ and λ<w. The first is trivially 0, the second one i integrated over (-w-λ to w-λ) and the third i integrated over (0 to w-λ), since X will always take on a positive value and λ<w. After that it was just fairly straight-forward integration/derivation, the CDF approached one as w->infinity and when I fixed a value for λ the ∫[my pdf] from 0 to infinity equaled one as well :) Thanks for your help!

Do you want to share your answer with us so we can double check it against what we got?

In this case, working with the Heaviside functions turns out to be somewhat cumbersome and it's easier to split the integral up into cases. Sorry for suggesting the Heaviside method.

However, I do advise you to learn to use the Liebniz rule rather than actually performing the integrals in the future. Suppose that in this problem X had been drawn from a half-normal distribution instead of exponential,

$$\rho_X(x) = \frac{\lambda}{\sqrt{\pi}}\exp(-\lambda^2 x^2/2)~\mbox{for}~x\in[0,\infty).$$

This doesn't have an elementary anti-derivative, so you can't actually perform the integrals, and you would have to use the Liebniz rule to differentiate the integrals to get the pdf for w. (If you were to try to use WolframAlpha or mathematica to evaluate the integrals, it may give you a result in terms of "error functions", but the error functions are defined as certain integrals over Gaussians, so to understand the derivative of the error function you need to understand differentiating with respect to integral limits).
 
  • #8
Mute said:
Do you want to share your answer with us so we can double check it against what we got?

In this case, working with the Heaviside functions turns out to be somewhat cumbersome and it's easier to split the integral up into cases. Sorry for suggesting the Heaviside method.

However, I do advise you to learn to use the Liebniz rule rather than actually performing the integrals in the future. Suppose that in this problem X had been drawn from a half-normal distribution instead of exponential,

$$\rho_X(x) = \frac{\lambda}{\sqrt{\pi}}\exp(-\lambda^2 x^2/2)~\mbox{for}~x\in[0,\infty).$$

This doesn't have an elementary anti-derivative, so you can't actually perform the integrals, and you would have to use the Liebniz rule to differentiate the integrals to get the pdf for w. (If you were to try to use WolframAlpha or mathematica to evaluate the integrals, it may give you a result in terms of "error functions", but the error functions are defined as certain integrals over Gaussians, so to understand the derivative of the error function you need to understand differentiating with respect to integral limits).

Re "..I do advise you to learn to use the Liebniz rule ..": I agree completely. What I was referring to was the virtue of first expressing P{W <= w} in terms of an integral (or several integrals in some cases, for different w-ranges) and then somehow dealing with those to get the density, and Leibnitz will certainly be an important tool in this regard. What I really meant was that I prefer to avoid canned formulas for f_W(w) in terms of Jacobians, etc., when we have absolute value functions involved.
 
  • #9
SallyY said:
Hey, think I finished up here!
I know its not the fastest way, but I stuck with what i knew how to do and actually made the CDF before finding the PDF.
I found there to be three cases: w<0, 0<w<λ and λ<w. The first is trivially 0, the second one i integrated over (-w-λ to w-λ) and the third i integrated over (0 to w-λ), since X will always take on a positive value and λ<w. After that it was just fairly straight-forward integration/derivation, the CDF approached one as w->infinity and when I fixed a value for λ the ∫[my pdf] from 0 to infinity equaled one as well :) Thanks for your help!

I'm actually not clear on where your bounds are coming from here...I see that when w=λ, 0<x<2λ, so I agree with setting your three cases to w<0, 0<w<λ, and λ<w. However, I'm at a bit of a loss as to where your other bounds for the second and third cases came from. Can someone explain that to me please?
 
  • #10
Aria1 said:
I'm actually not clear on where your bounds are coming from here...I see that when w=λ, 0<x<2λ, so I agree with setting your three cases to w<0, 0<w<λ, and λ<w. However, I'm at a bit of a loss as to where your other bounds for the second and third cases came from. Can someone explain that to me please?

Just to clarify where my confusion is: I integrated from (-w+λ) to (w+λ) for 0<w<λ, and from 0 to (w+λ) for λ<w. The only difference in answer is that for interval 0<w<λ, my cdf was [e^(-λ^2)][e^(λw)-e^(-λw)] and for Sally's bounds, the e^(-λ^2) at the beginning was e^(λ^2).
Similarly, for λ<w, my cdf was 1-e^(-λw-λ^2), and Sally's was 1-e^(-λw+λ^2). As w=>∞, cdf also approaches 1, so I'm not sure what the difference is/why one is incorrect. Any insight?
 
  • #11
Aria1 said:
Just to clarify where my confusion is: I integrated from (-w+λ) to (w+λ) for 0<w<λ, and from 0 to (w+λ) for λ<w.

That looks right.

The only difference in answer is that for interval 0<w<λ, my cdf was [e^(-λ^2)][e^(λw)-e^(-λw)] and for Sally's bounds, the e^(-λ^2) at the beginning was e^(λ^2). Similarly, for λ<w, my cdf was 1-e^(-λw-λ^2), and Sally's was 1-e^(-λw+λ^2). As w=>∞, cdf also approaches 1, so I'm not sure what the difference is/why one is incorrect. Any insight?

It looks like Sally (hopefully) made a typo in her post. The x integration should be from ##\lambda-w## to ##\lambda+w## for ##0 < w < \lambda## and 0 to ##w+\lambda## when ##\lambda < w##, giving the cdfs you have written.
 

1. What is a PDF of an exponential distribution?

A PDF, or probability density function, of an exponential distribution is a mathematical function that describes the probability of a continuous random variable taking on a specific value. In the case of an exponential distribution, the PDF represents the probability of a random variable having a certain amount of time between two events occurring.

2. How is the PDF of an exponential distribution calculated?

The PDF of an exponential distribution is calculated using the formula f(x) = λe-λx, where λ is the rate parameter and x is the value of the random variable. This formula is used to calculate the probability of a specific value occurring within the distribution.

3. What is the relationship between the rate parameter and the shape of the exponential distribution?

The rate parameter, λ, is directly related to the shape of the exponential distribution. A larger λ value results in a steeper curve, indicating a higher probability of shorter time intervals between events. Conversely, a smaller λ value results in a flatter curve, indicating a higher probability of longer time intervals between events.

4. What is the mean and standard deviation of an exponential distribution?

The mean of an exponential distribution is given by μ = 1/λ, while the standard deviation is given by σ = 1/λ. This means that the average time between events occurring is equal to the inverse of the rate parameter, and the variability in these times is also determined by the rate parameter.

5. What are some real-world applications of the exponential distribution?

The exponential distribution is commonly used to model events that occur randomly and independently over time, such as the time between earthquakes or the time between customer arrivals at a store. It is also used in survival analysis to model the time until an event, such as the failure of a machine or the death of a living organism. Additionally, it is used in financial mathematics to model the distribution of stock prices and interest rates.

Similar threads

  • Calculus and Beyond Homework Help
Replies
7
Views
813
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Precalculus Mathematics Homework Help
2
Replies
40
Views
2K
  • Calculus and Beyond Homework Help
Replies
11
Views
1K
  • Calculus and Beyond Homework Help
Replies
6
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
749
  • Calculus and Beyond Homework Help
Replies
8
Views
2K
  • Calculus and Beyond Homework Help
Replies
4
Views
820
  • Calculus and Beyond Homework Help
Replies
2
Views
241
  • Calculus and Beyond Homework Help
Replies
10
Views
1K
Back
Top