So next thing we need is
the exponential distribution.
We've been talking about
continuous distributions.
We talked about the uniform and
the normal.
So we have two famous
continuous distributions.
We've already done all the discrete
distributions we need for
the entire semester.
But we only have two
continuous distributions, so
we kinda have to catch up on
the continuous stuff, okay?
So the next most important one is
called the exponential distribution.
And that's one of the biggest topics for
the next homework, and
it's one of the most important
distributions in general.
Now we've already seen the exponential
distribution, A couple of times, it's
just like as part on the previous homework
with waiting for the book to be released.
And I used it to illustrate
Universality of the Uniform, but
we haven't formally introduced it yet.
So this will be our formal introduction
of exponential distribution.
So Stat110,
this the exponential distribution,
exponential distribution this is Stat110.
Now you're friends with the exponential
distribution, it has one parameter
lambda usually called lambda, but
you could call it whatever you want.
That's the traditional and
I'm gonna call this a rate parameter.
Because you don't have to call it lambda,
it's just lambda's the usual terminology.
I'm gonna call it a rate parameter,
because intuitively we can
think of it as the rate at which
some type of event occurs, okay?
So let's just write down the PDF and
the CDF and so on.
And then we can start to see why
is this important compared with of
course there's infinitely many PDFs,
so we could write down.
But what special about this one?
Okay, so we say X is exponential lambda,
That's our notation.
And it has a PDF, that's given
by lambda e-lambda x for
x positive and 0 otherwise.
So it's always positive, so
continuous positive random variable,
that's the PDF.
You can see why it's called
the exponential distribution,
cuz there's an exponential function
with a couple constants stuck in there,
exponential decay.
This is a valid PDF,
because if we integrate lambda
e-lambda xdx from 0 to infinity
that's a very easy integral.
And I get one just integrating
exponential, so that means it's valid.
Okay, let's get the CDF and then let's
figure out the mean and the variants,
stuff like that.
Then we can talk more about what are the
special properties of this distribution.
So let's get the CDF,
since we have the PDF,
it's easy to get the CDF
just by integrating.
So f(x) = the integral, so
I will start the integral at 0 because
this is a positive random variable.
0 up to x of lambda e-lambda t dt,
again that's a very easy integral.
And I will just get 1-e-lambda x,
for x greater than 0.
It's easy to check that this is correct,
cuz if you take the derivative of this,
lambda comes down and you get this.
And also notice that this is a CDF,
because just check that this is
an increasing function, right?
And as you let x go to infinity,
then this part's gone and goes to 1.
If you let x go to, but
you can't let x go to minus infinity, but
if you let x go to 0, then you get 0 and
then it just stays 0.
If you go that way, right?
And approaches 1, if you go that way.
Okay, so that's a valid CDF,
it's continuous as well.
Okay, well that's easy enough,
let's get the mean and the variance.
Actually an easier way to get the mean,
of course we can just write
down the integral and do it.
But before we do that it's
useful to try to standardize it.
So remember what the normal, we can
reduce any normal to a standard normal.
In this case, the normal has two
parameters, mu and sigma squared.
Here, there's only one parameter,
lambda, okay?
And we're gonna show right
now that if we let Y =,
Lambda times X, Then we're gonna
show that Y is exponential of 1.
So that's kind of analagous to
standardization of the standard normal.
And that we're multiplying,
I mean it's not exactly the same cuz for
the normal we subtracted
the mean by a standard deviation.
Here, we're just saying multiply by
something to make it exponential of 1.
Because if I can get exponential of 1,
it's gonna be a lot easier, right?
Then if the lambda's are not there,
so how do we do that?
So since,
let's just do a quick calculation
to show that that's true, okay?
Cuz once we have this relationship,
than a lot of the times we can just work
with exponential of 1, and
then stick in the lambda when we need it.
So let's just compute the CDF of Y.
Y less than or equal to little y, right?
It's just this is an very easy
calculation if you understand CDFs,
that the CDF of Y, a Y is lambda X.
So that's X less than or
equal to Y over lambda.
But that's just the same as the CDF
of X evaluated at Y over lambda.
So if we take the CDF and
plug in Y over lambda,
then we just get 1-e-lambda, right?
X, that's Y there.
That's the CDF of an exponential of 1,
right?
I just plugged in Y over lambda here,
and lambdas cancel, okay?
So it's just that one short equation
proves that his statement is true.
Okay, so let's first concentrate on
the case where it has parameters 1.
And find the mean and variance, and
then we can get the general case, okay?
So let's do that case now, so
we're letting Y be exponential of 1,
And we wanna find the mean and
variance, Okay?
So let's get the mean first.
Just by definition, Expect the value Y,
so it's just the integral of Y
times the PDFF e-y dy, right?
Okay, now this is a very
standard integration by parts.
This is the kind of interval you'd
see in AP calculus when you're
learning integration by parts, right?
So all we have to do is let u = y and
let dv = this part.
Remember your integration by parts,
uv minus the integral vdu, so that's u.
du = dy and
v = just integrate this thing, right?
So -e-y, okay?
So now I'm just gonna do
a uv- integral of vdu.
So it's -y e-y evaluated from 0
ero to infinity minus a negative.
So it's gonna be plus
the integral of e-y dy.
So now we've made it
into an easy integral.
This first part is 0, because if
we plug in y = 0, we just get 0.
If we let y go to infinity, y is going
to infinity, but e-y is going to 0,
exponentially fast, and
this part's only growing linearly.
So the exponential part's dominant.
So this part is just 0, and this part,
it's just 1, cuz that's an easy integral.
Or an even cuter way to do it is to say,
we're integrating the exponential 1 PDF it
has to be 1,
otherwise that wasn't a valid PDF.
So in this course, there are actually
a lot of integrals, we can do not using
calculus directly, but by recognizing
that's a PDF or that kind of thing.
Of course that's an easy integral anyway.
Okay, therefore the mean is 1.
Now for the variance,
For the variance,
we can just do E of y squared -e of
y squared the other way as usual.
So here is the LOTUS,
E of y squared while by LOTUS,
it's immediate of that
integral of y squared e to
the -y dy- this thing we
just computed as 1, okay?
Now this integer, well then we have
to use integration by parts again.
And I'm not gonna write out
the integration by parts again,
probably because we're gonna learn
better ways to do this later.
Or we're gonna actually avoid doing this,
and get them movements a different way.
So this is called the second moment by the
way, E of Y is called the first movement,
that is called the second movement.
Okay, but
this is an easy integration by parts
in the sense that if let u = y squared.
Basically it's gonna reduce reduce
it back down in to an integral
that looks like this, right?
It's gonna lower the power from 2 to 1, so
this is like when you're doing
integration by parts twice.
You don't actually have to do it twice,
cuz you do it once and
then you reduce it to the one we just did.
So you're actually doing
integration by parts once.
And wwe do that we also get 1 and
that's pretty easy to remember, okay?
So now coming back to
this general exponential,
So just continuing the notation here,
y = lambda X,
so x = y over lambda and
that's gonna have,
The mean,
just take expected value of this.
Lambda is a constant that comes out.
So it has mean 1 over lambda,
and it has variance.
Well for the variance,
take the variance of this.
Remember the variance
constant comes out squared.
So it's 1 over lambda squared times the
variance of y, but the variance of y is 1.
So the variance is 1 over lambda squared.
Okay, so now we know the mean and
the variance.
We do not yet know why
the exponential is important, okay?
And there's different
reasons why it's important.
But what I consider the most important
reason is what's called the memory
list property.
And you've already seen the memory
list property in the discrete case,
if you did that practice
mid-term question.
But we haven't talked about
it in the continuous case.
So memoryless property, So
exponential distribution is memoryless.
I have to tell you what that means,
and then check that is true, okay?
So memoryless property means that,
See if we can remember that
midterm practice problem.
What is said something about
memorylessness, it said no matter how long
you've waited then it's like you're
starting over from fresh, okay?
I think that's what it said, right?
So it says that if you have
a random variable that,
intuitively it's a random variable
that we interpret as a waiting time.
So you're waiting for
something to happen, right?
No, just have a concrete example in mind.
Suppose you're just waiting for
a phone call, right?
So now is time zero, okay?
And you're waiting to get a call, okay?
Which could come at any time
in continuous time, right?
The geometric is discrete like flipping
coins waiting for success, right?
Bernoulli trials wait for
success in discrete times cuz
they have discrete trials.
This is in continuous time,
you're waiting for the phone call.
And suppose that this waiting
time has the property that no
matter how long you waited,
just like that time is gone.
It's not giving you progress
towards getting your phone call.
It's like starting from fresh every time,
okay?
That's what the memoryless property means.
So as an equation, what it says is
the probability that X is greater than or
equal to s + t given that X is
greater than or equal to s.
Imagine that s is measured in minutes or
whatever unit you want.
This says you've already
waited at least s minutes.
You've already waited s minutes, and
you haven't gotten your phone call.
So you know X is greater than or
equal to s, okay?
And then what's the probability you would
have to wait at least an additional t
minutes?
Is just the same as the probability
X is greater than or equal to t.
Because you've started over with the fresh
exponential distribution with the same
parameter.
That's the definition of the memoryless
property, but I hope that this equation
kind of intuitively make sense to capture
that intuition of memorylessness.
Okay, so
now let's prove that in fact that this
equation is satisfied by the exponential.
So for the exponential lambda,
this is the general definition.
But now we're assuming X
is exponential lambda and
let's check that the equation holds.
So let's find the probability
that X is greater than or
equal to s, that's 1 minus the CDF.
We don't have to worry about whether
it's strict inequality here,
cuz it's a continuous random variable.
So this is just 1 minus the CDF,
and this is the one,
this is called the survival
survival function.
Because what'ss the probability that,
if you think of X rather than
thinking of a waiting time thinking of it
as like how long someone is gonna live?
And then that's the probability that they
will live more than at least s seconds, so
that's a survival thing.
So this is actually extremely important
in what's called survival analysis in bio
statistics, as well as in engineering.
You wanna figure out how long is a certain
piece of electronic's gonna last,
things like that, then you need
to look at survival functions.
Well anyway that's just 1-CDF,
But the CDF was 1-e-lambda x, so
that's just e-lambda s.
So it's a very easy
looking survival function.
So now the probability
that X is greater than or
equal to s + t, given that X
is greater than or equal to s.
Let's just use the definition
of conditional probability.
So this is the probability that X
is greater than or equal to s + t.
And X is greater than or
equal s divided by the probability
that X is greater than or equal to s.
Just definition of
conditional probability, but
notice that the numerator
is slightly redundant.
Cuz if we say it's greater than or
equal to s + t, I'm assuming s and
t are non negative real numbers.
But if it's at least s + t,
obviously, it's at least s.
So this part is redundant,
so in other words,
it's just a ratio of the survival function
here over the survival function here.
And this is true for
all s greater than or equal to 0.
So that's just e-lambda s
+ t divided by e-lambda s.
And that just simplifies to e-lambda t,
which is the probability that X
is greater than or equal to t.
So that shows that its memoryless.
Now you might imagine that there
is millions of other memoryless
distributions.
But it turns out that
the exponential is the only one.
This completely characterize is it?
And just one more quick,
we'll prove that next time.
But one more quick restatement
of the memoryless or
consequence of memoryless property.
Here's a core area of this memoryless
property that's often useful.
Again, we're letting X be exponential
lambda, and suppose we wanted to
know the expected value of X given
that X is greater than some number a.
This is our first time actually using
this notation, conditional expectation.
But you should already know
what this means, right?
Because this just says
take the expectation, but
instead of using probability,
use conditional probability.
So it's defined in the same way
except use conditional probability,
that gives us conditional expectation.
So intuitively is just like given
the information that you've waited at
least a minutes.
What's the expected value of
X given that information?
Well, we could think of
that as a + E (x- a,
just linearity, pull out an a).
The cool thing about the memoryless
property is, given that X is greater than
a, this thing X-a just becomes
a fresh exponential, right?
Because this is the additional
waiting time, that you waited a,
but it's started over again, right?
So it's immediate that this is just a + 1
over lambda by the memoryless property.
Otherwise, you have to do some calculus,
do integration and stuff.
But we can avoid that just by
understanding, in this case and
in some other interesting problems
just by using this property.
