The Student Room Group

Exponential distribution - small problem

Hi, I am a bit stuck on this maths question on the exponential distribution in further stats. I have an online lecture on it, but we didn't have enough to cover it and I am lost with this textbook question.
The question:

My working:


X is the time till the next person is seen in mins. The average wait is 5/3.

Therefore, X ~ exp ( 5/3 )

P (X>2) = 1 - F(2) = 1 - ( 1 - exp (-5/3 *2 )) = exp (-10/3)

However, the textbook says exp ( - 6 / 5 )? I am thinking that I fell at the first hurdle, getting lambda, but I don't get why! Many thanks :smile:
(edited 3 years ago)
Original post by tande33
X is the time till the next person is seen in mins. The average wait is 5/3.

Therefore, X ~ exp ( 5/3 )

This isn't right (even after fixing the sign error). Why do you think it's 5/3?
Reply 2
Original post by tande33
Hi, I am a bit stuck on this maths question on the exponential distribution in further stats. I have an online lecture on it, but we didn't have enough to cover it and I am lost with this textbook question.
The question:

My working:


X is the time till the next person is seen in mins. The average wait is 5/3.

Therefore, X ~ exp ( 5/3 )

P (X>2) = 1 - F(2) = 1 - ( 1 - exp (-5/3 *2 )) = exp (-10/3)

However, the textbook says exp ( - 6 / 5 )? I am thinking that I fell at the first hurdle, getting lambda, but I don't get why! Many thanks :smile:

Lambda = 1/mean
So use
.... exp(-3/5*2)
Reply 3
Original post by DFranklin
This isn't right (even after fixing the sign error). Why do you think it's 5/3?

Sign error?
Reply 4
Original post by mqb2766
Lambda = 1/mean
So use
.... exp(-3/5*2)

Oh yeah, that makes sense, thanks again.
Reply 5
Original post by tande33
Oh yeah, that makes sense, thanks again.

No problem. A key thing with understanding the distributions is to understand how the random variable is scaled.

For an exponential, the scaling parameter is the mean, so the distribution goes "down" as e^(-1), e^(-2), e(-3) ... when the random variable x = mean, 2*mean, 3*mean ... So the exponent must be of the form
-x/mean
And when x->x+mean, the distribution decreases by 1/e ~ 1/3 of the previous value. Hence the geometric/exponential decay.

For a normal distribution, the standard deviation is the scaling parameter. So you divide (x-mean) by standard deviation, which is your z.
(edited 3 years ago)
Original post by tande33
Sign error?


Even if lambda was 5/3 you'd still want exp(-5/3), not exp(5/3) as you posted.
Reply 7
Original post by DFranklin
Even if lambda was 5/3 you'd still want exp(-5/3), not exp(5/3) as you posted.

In the bit where I say X ~ exp ( 5/3) I am writing this to state how X is distributed, my teacher says you must always write what the variable is and the how its distributed at the beginning. For the exponential distribution I am told to put it in the form, X ~ exp (lambda) where lambda is (incorrectly 5/3 as I used the expected value, the reciprocal). So I am not quite sure what you mean.
Original post by tande33
In the bit where I say X ~ exp ( 5/3) I am writing this to state how X is distributed, my teacher says you must always write what the variable is and the how its distributed at the beginning. For the exponential distribution I am told to put it in the form, X ~ exp (lambda) where lambda is (incorrectly 5/3 as I used the expected value, the reciprocal). So I am not quite sure what you mean.

If you're using exp to indicate "the exponential distribution" that I guess that's "OK". But on the other hand, it's also incredibly likely to cause confusion, because exp(x) is completely standard notation for exe^{-x} - you actually used in this way yourself in your posts.

But I'm already discovering that there's no "bottom floor" to how the new A-level is making a mess of things, so I guess I should just shut up and soldier.
Reply 9
Original post by mqb2766
No problem. A key thing with understanding the distributions is to understand how the random variable is scaled.

For an exponential, the scaling parameter is the mean, so the distribution goes "down" as e^(-1), e^(-2), e(-3) ... when the random variable x = mean, 2*mean, 3*mean ... So the exponent must be of the form
-x/mean
And when x->x+mean, the distribution decreases by 1/e ~ 1/3 of the previous value. Hence the geometric/exponential decay.

For a normal distribution, the standard deviation is the scaling parameter. So you divide (x-mean) by standard deviation, which is your z.

Hi again,
I am interested in what you are saying here, but unfortunately I am not familiar with some of the lingo you are using. Not sure if I need it for a level, but I am interested regardless.

Why you refer to scaling, is this like when we took a discrete random variable X and then called another variable Y to be 3X when we would use "coding" to find the new mean or variance or standard deviation, for example.

Scaling parameter... Honestly I am not sure what this is but I get the pattern that you are saying:

x 0 1/L 1/L^2
f(x) lambda (L) L/e L/e^2

and so on, Is this what you are referring to, or is there more to it. And then finally its the standard deviation is the spread of the data so is this related to the scaling parameter.... Sorry for the essay.
Reply 10
Original post by DFranklin
Even if lambda was 5/3 you'd still want exp(-5/3), not exp(5/3) as you posted.

Oh ok, my teacher and textbook say use just lambda instead of - Lambda. But I imagine both are acceptable.
Reply 11
Original post by DFranklin
If you're using exp to indicate "the exponential distribution" that I guess that's "OK". But on the other hand, it's also incredibly likely to cause confusion, because exp(x) is completely standard notation for exe^{-x} - you actually used in this way yourself in your posts.

But I'm already discovering that there's no "bottom floor" to how the new A-level is making a mess of things, so I guess I should just shut up and soldier.

Ok yeah, I agree with you really. Its a tad strange. Mind you I get that in all subjects, physics and chemistry included :/
Original post by tande33
Ok yeah, I agree with you really. Its a tad strange. Mind you I get that in all subjects, physics and chemistry included :/

Sorry if my frustration showed: it's just that I've never seen someone use that notation - I just googled to check, and the major references (Wiki, Wolfram, et. al.) plus every other result I checked don't use it either. In fact, it's pretty clear that they consciously avoid it (e.g. math programming languages typically either use Exponential or ExponentialDistribution because they know using exp is a bad idea). And yet, if the A-level courses are saying "X ~ exp" is valid notation, I can't do anything that throw my hands in the air in disgust.

(I would say that I would check carefully *exactly* what notation they use, because even "X ~ Exp" (capital E) is significantly better than "X ~ exp" in terms of avoiding confusion with exp).

As far as your scaling question goes, I don't want to put words into mqb's mouth, but I know for me, what's important is at least a rough idea of how the distribution changes as you change the parameters. So an exponential distribution (λeλx\lambda e^{-\lambda x}) is going to "squash up" towards 0 as you increase λ\lambda, so you know the mean is going to decrease as you increase lambda rather than increase (and you can probably guess that it's inversely proportional to lambda, although that would basically be a guess).

But then conversely, for a Poisson distribution, the mean does equal μ\mu, which is basically completely the opposite behaviour. So there's no general rule - it's a matter of remembering enough about each distribution to get it right.
(edited 3 years ago)
Original post by DFranklin

As far as your scaling question goes, I don't want to put words into mqb's mouth, but I know for me, what's important is at least a rough idea of how the distribution changes as you change the parameters. So an exponential distribution (λeλx\lambda e^{-\lambda x}) is going to "squash up" towards 0 as you increase λ\lambda, so you know the mean is going to decrease as you increase lambda rather than increase (and you can probably guess that it's inversely proportional to lambda, although that would basically be a guess).

That sounds good to me and was leaving things until you were sorted.
I'll reply properly in the morning about the scaling as I'm still knackered, but they main thing, as you say, is to be able to sketch/get a rough idea of the distributions for different values of the parameter(s). Exponential and normal distributions are obviously related as they transform/standardise/scale the random variable then chuck it through a negative exponential. If you (OP) get your head round that, they become boringly "easy".

Edit ... I'll just try and highlight a few things, I'm not necessarily being mathematically precise, just describing a few things to reflect on.

Things like the exponential and normal pdfs for continuous random variables are obviously parameterized by things like the mean, variance, ... and an obvious thing to understanding the distributions is to understand how that works. I'm not interested in the exponential multiplier which just ensures the pdf integrates to 1, rather what the (negative) exponential exponent is. For the normal distribution, you can write it as
p(x) ~ exp(-z^2/2)
Where
z = (x-mean)/sigma.
Subtracting the mean translates the origin to be centred on the mean, and dividing by the standard deviation scales this difference, x-mean, so you can talk about being 1 stddev, 2 stddevs, ... from the mean. The standard deviation determines the effective width of the distribution as when the difference is 1 std dev from the mean
p(mean+stddev) ~ exp(-1/2) ~ 0.6
Similarly
p(mean+2*stddev) ~ exp(-4/2) ~ 0.13
p(mean+3*stddev) ~ exp(-9/2) ~ 0.01
p(mean+4*stddev) ~ exp(-16/2) ~ 0.0003
...
The pdf has decayed to ~0.01 of the centre value when you move 3 stddevs from the mean. Every further stddev you move away, the pdf decays at a faster than exponential rate, because of the squared exponent. The stddev is a scaling parameter which controls the width of the distribution.

For the exponential distribution you (OP) mentioned,
p(x) ~ exp(-x/mean)
It's an important distribution as it is memoryless and generalises the geometric distribution to continuous random variables. The mean value is the scaling parameter for the random variable x:
p(0) ~ exp(-0) = 1
p(mean) ~ exp(-1) ~ 1/3
p(2*mean) ~ exp(-2) ~ 1/9
p(3*mean) ~ exp(-3) ~ 1/27
...
Incrementing x by mean has the effect of reducing the pdf to 1/e ~ 1/3 of the previous value. It's a geometric decay. As p(5*mean) < 0.01, the effective or visible width of the pdf is [0,5*stddevs]. If couse, if you zoom in, you see the same exponential decay, as that's the geometric/memoryless property. The mean scales (determines the scale associated with) the exponential distribution.

Coming back to the original (small) error, you used
p(x) = exp(-mean*x)
Obviously this could just be a slip because of the extra parameter lambda, but such a function would basically be just wrong. Consider when the mean was large and the mean should be located near the "centre" of the distribution
p(mean) ~ exp(-mean^2) ~ 0
Which is far in the tail. The correct (one sided) exponential distribution scales the random variable so that p(mean) ~ exp(-1) and there are similar pdf areas on either side of the mean.

A bit long winded, but hopefully gets you thinking a bit about how to visualize/sketch/understand the role of the parameters for these two continuous distributions.
@tande33
(edited 3 years ago)
Reply 14
Original post by mqb2766
That sounds good to me and was leaving things until you were sorted.
I'll reply properly in the morning about the scaling as I'm still knackered, but they main thing, as you say, is to be able to sketch/get a rough idea of the distributions for different values of the parameter(s). Exponential and normal distributions are obviously related as they transform/standardise/scale the random variable then chuck it through a negative exponential. If you (OP) get your head round that, they become boringly "easy".

Edit ... I'll just try and highlight a few things, I'm not necessarily being mathematically precise, just describing a few things to reflect on.

Things like the exponential and normal pdfs for continuous random variables are obviously parameterized by things like the mean, variance, ... and an obvious thing to understanding the distributions is to understand how that works. I'm not interested in the exponential multiplier which just ensures the pdf integrates to 1, rather what the (negative) exponential exponent is. For the normal distribution, you can write it as
p(x) ~ exp(-z^2/2)
Where
z = (x-mean)/sigma.
Subtracting the mean translates the origin to be centred on the mean, and dividing by the standard deviation scales this difference, x-mean, so you can talk about being 1 stddev, 2 stddevs, ... from the mean. The standard deviation determines the effective width of the distribution as when the difference is 1 std dev from the mean
p(mean+stddev) ~ exp(-1/2) ~ 0.6
Similarly
p(mean+2*stddev) ~ exp(-4/2) ~ 0.13
p(mean+3*stddev) ~ exp(-9/2) ~ 0.01
p(mean+4*stddev) ~ exp(-16/2) ~ 0.0003
...
The pdf has decayed to ~0.01 of the centre value when you move 3 stddevs from the mean. Every further stddev you move away, the pdf decays at a faster than exponential rate, because of the squared exponent. The stddev is a scaling parameter which controls the width of the distribution.

For the exponential distribution you (OP) mentioned,
p(x) ~ exp(-x/mean)
It's an important distribution as it is memoryless and generalises the geometric distribution to continuous random variables. The mean value is the scaling parameter for the random variable x:
p(0) ~ exp(-0) = 1
p(mean) ~ exp(-1) ~ 1/3
p(2*mean) ~ exp(-2) ~ 1/9
p(3*mean) ~ exp(-3) ~ 1/27
...
Incrementing x by mean has the effect of reducing the pdf to 1/e ~ 1/3 of the previous value. It's a geometric decay. As p(5*mean) < 0.01, the effective or visible width of the pdf is [0,5*stddevs]. If couse, if you zoom in, you see the same exponential decay, as that's the geometric/memoryless property. The mean scales (determines the scale associated with) the exponential distribution.

Coming back to the original (small) error, you used
p(x) = exp(-mean*x)
Obviously this could just be a slip because of the extra parameter lambda, but such a function would basically be just wrong. Consider when the mean was large and the mean should be located near the "centre" of the distribution
p(mean) ~ exp(-mean^2) ~ 0
Which is far in the tail. The correct (one sided) exponential distribution scales the random variable so that p(mean) ~ exp(-1) and there are similar pdf areas on either side of the mean.

A bit long winded, but hopefully gets you thinking a bit about how to visualize/sketch/understand the role of the parameters for these two continuous distributions.
@tande33


Oh sorry, no clue why but I have only just seen this, the notification never came through! I am in a lesson rn but will look at this once I am done. Thanks in advance!!!

Quick Reply

Latest