We're not going to talk about standard deviation.
Uh, it's a very important concept.
You'll hear about it in statistics and probably other courses as well.
Um, very closely related to the ideas we've been looking at.
Uh, we will look at it in the context of, uh,
vectors and considering vectors collections of numbers.
Okay. So. If I have a vector x, it's an n vector,
the average of the vector,
uh, is the average of the entry.
So it's the, uh- it's 1 transpose x- sorry,
inner product of 1 and x,
which you now recognize as the sum of the entries in x,
and then divided by n. So that's the average.
Yeah, so it tells you what the average value- what the average of the co-efficients is.
Okay. Now, de-meaned vector, oh,
and I should say that this is not,
uh- that's not standard- that's not universally accepted standard notation.
So- I mean, um, someone would probably figure out what it means if you wrote this down.
But just to let you know. Um, okay.
And then the idea of a de-meaned vector is very interesting.
It says you take the vector x,
and you subtract the mean value from each entry of it.
That's called the de-meaned vector.
Uh, we're going to denote that as x Tilde,
and it's x minus the average of x.
That's a number, which is the average value of the entries, times one.
So that's the vector of all ones- uh, all entries one.
So the average of- the average value of x Tilde is 0, right?
Because you've subtracted the average and so on.
Um, this allows us to talk about what the standard deviation is.
The standard deviation is lit- is nothing more
than the RMS value of the de-meaned vector.
And if you want to write it out in all its glory, it looks like this.
It's x minus inner product of 1 and x divided by n. You'll recognize this part.
This part here has the average value times 1.
So that's- when you multiply a vector times 1,
you get a vector with all en- entries equal to this number, the average.
And it says subtract that from x and then take the norm,
then divide by square root n,
which gives you the RMS value.
That's the so-called standard deviation.
And what it is,
it's a measure of the typical amount by which xi varies from its average.
So if I have these x's,
um, and, you know,
the standard deviation is 2.6,
it says that whatever the mean is,
let's suppose the mean is 7, it says we would
expect the- the entries to range between,
lets- you know, uh, between, let's see,
from- if- if the mean is- is 5,
it would go up to, uh, 7,
8, 9, you know,
and down to 2 or 3.
But it- it would- you- you wouldn't have numbers that were crazy.
It would be around that average value, okay?
And the typical deviation would be this standard deviation.
Um, now, uh, a- a vector has standard deviation 0.
Let's see what that means.
What it means is that this is 0,
this quantity up here.
That only happens if x is equal to its average times 1s,
and that means x is constant.
So a constant vector means that it's some multiple of the 1s vector.
That means all the entries are always the same,
and that has standard deviation of 0.
And that's perfectly interpretable because if I gave you a vector,
all of whose entries are the same and I say,
how much do they typically vary from the mean value?
The answer is, they're identical to all of them,
they're identical to the mean value,
so the- they don't vary at all.
So that- that kind of makes sense.
That's what it means to be stan- to have standard deviation of 0.
Um, now, just as a side note, um, you know,
very common ways to denote the mean and the standard deviation are,
uh, the Greek letters, uh,
Mu and Sigma, and I guess they stand for mean.
Mu and Sigma stands for standard deviation.
Okay. So that's, um- the- and
these are, these are also very widely used across applied mathematics,
probability, statistics, and other areas.
Okay. Now, there's a basic formula
relating these con- these- the different quantities we have, and that's this,
it's that the RMS value of a vector squared is equal to
the average of the vector squared plus the standard deviation squared.
Now, I'm not gonna show that formula,
although it's a pretty quick derivation.
But I- you know, I don't know.
You probably don't want to see me doing some algebra on my little, uh, pad here.
Uh, but it- it's actually a good thing for you to try to show yourself.
Um, it's a- it's a great exercise.
Um, and you'll use a couple of the properties of the in- inner product there,
uh, to- to- to show that. Um, okay.
Now, this comes up, um, well,
it's at the heart of a lot of quantitative finance.
So, um, let's see what that is.
Let's suppose that x is a time series of returns.
Um, and it means in each period, you know,
did- did a dollar of investment go up in which,
you know- or did it go down, and that kind of thing.
And so it's just a time series of returns, um,
on some investment, um,
over some period, right?
So, uh- well over n periods,
I should say, uh,
because each- each entry is going to be,
uh- is going to be a- a- a return at- in a certain time period.
Okay. So, uh, that's- that's what it is.
Uh, and so, you know,
let's suppose it's- it's- I mean,
it doesn't matter, but it's going to look like- let's- it's going to look like this.
Let's- let's say it looks like this.
It's, uh, you know, 0.05,
minus 0.03, uh, 0.11,
and, uh, minus, uh, 0.2.
That's a lot. Okay. Well, too bad.
I already wrote it. All right. Here it is.
So this is what it says.
This has in the first period,
you made 5%.
Well, that's okay. That's decent.
In the next period, you lost 3%.
In the next period, you made 11%.
That's like great.
That's awesome. And then unfortunately on the next step, you lost 20%.
Okay. So this is an example of a- of- of a- of a time series of returns.
Okay. Now, if I take the average, um,
then what I get is the mean return of- of that,
uh- of- of- of that asset or investment.
That's the mean return. Um, and it- it's the mean return per period, right?
So usually, those are converted to annual,
but just- it's per p- it's just what it means,
it's the mean return per period.
Okay. Um, and that's usually often just called the return, right?
So I'd say, what was the return of that, you know,
over the last year and somebody would tell me, you know, daily.
Okay. Now, standard deviation of a return time series, super interesting.
It tells you basically, typically,
how much did the return deviate from the average, right?
So, uh, for example,
if it looked like this, 0.01, you know,
0.01, uh, then all the entries are 0.01.
It's awesome. You'd say, what was the mean return?
You go 1%.
Then you go, what was the standard deviation?
And the answer is 0.
And what that- so we- we interpret that as sort of risk.
It means that you are guaranteed to make,
you know, whatever it was, 1% in each time period.
Period. That it was never higher.
It was never lower. So that- this one- this is actually referred to as just the risk,
the standard deviation of the return time series.
And- and what you do is you'll usually compare these.
Um, this is how you compare, uh,
different, uh- different time series.
Um, I mean, they have to be a- yeah, it's how you compare different time series.
So you would say, oh, uh,
my portfolio made, you know,
uh- over that time period,
it had an average return of 12%,
you know, let's say per year,
um, and I had a standard deviation of 10%.
Okay. So- and we can interpret that.
That- that means that we should not be surprised if the return in
any one period would be certainly plus or minus,
uh- we- here- here,
the people would say it is 1 sigma, that would be the slang.
So you'd say, so we should hardly be surprised.
So we might have a year in there where we did 25%.
We might also have one where we did- where we lost money.
That's a negative number. So okay.
Um, and then these are often plotted on a risk return plot.
Okay? So- which gives you the two- the two attributes of a return,
uh- of a return, uh, time series.
Okay. So here's an example.
Um, I guess I've got like,
I don't know, 10 I guess this is 10 periods.
Yeah, this is 10 periods.
And here- here are my returns.
Okay, so this one,
you know, that's- what is that?
That's like the tortoise or something.
Okay, so here's the tortoise and it just, it's boring.
It just you get, you know,
you get a return of 1.
I don't know what it is, 1%.
It doesn't- then the units don't matter.
It's just a steady return.
It's, you know, the average is 1 and the standard deviation is 0.
So in fact, uh,
what people would then say is it's something like it's riskless.
That there is no- it just every year it's the same.
There's- there's no question of what- what is gonna be.
Um, now this one.
That's kind of interesting, uh,
let's look at that return time series.
It says that, you know,
in the first, you know,
in the first time period, let's say you made 5%.
You're laughing at the person who had this- this other, uh,
th- this other investment because you said,
I just- I just- I just made a return five times what you made.
Okay. Um, on the next period,
you make about 1, right?
That's-this one.
And then on the third period,
you'll lose money, right?
So, um, the- then I guess at that point this one's laughing and saying,
ha, I'm always making 1%,
but I've never lost money.
I'm not going to lose money. Anyway, okay.
Here's another one over here, another one.
And, you know, your eyeball sees that some of these c's are even larger, more extreme.
So your eyeball at least tells you that maybe the- the-
the risk or standard deviation is higher.
And here's a- here's a final one,
d. And we can almost see that d is bad visually, right?
Because for example, in the first four periods, you lose money.
The return is negative, you lose, okay?
Then all of a sudden you make a bunch,
then you lose again twice,
then you make a bunch more.
Okay, so, um, if you work out what the-
what the mean of these are and the standard deviation which we return,
it refers to risk, ah,
return and risk respectively.
Now we scattered, now we plot them, right?
And so that would look like this.
This is a- this is a very famous plot in finance, um, so, ah,
this is the- that's the mean return there,
um, and that is the risk.
And just to give you the rough idea,
ah, although this is not part of that now.
It's just to show you that the concepts we have like
standard deviation come up in real things,
in this case in finance.
Um, so, I mean,
it should be kind of obvious that we like high return, right?
I'd rather make 5% than 2%.
And I would prefer that to losing 2%.
So, okay, so- so up the- the mean axis is good, right?
For risk, people generally prefer it to be smaller.
In other words, it's- it- it- if you could do something like that,
that would be perfect, right?
That- that would be, that- that- that's one measure of risk.
There's actually a lot of, a lot of measures of risk, but the truth is,
this is the one that's actually used most often,
okay, so that's the risk and there, small is good.
So here, right?
So here's where you wanna be on a risk return plot.
You wanna be in the upper left quarter.
Upper means high return,uh,
left means- it was on a quarter.
You wanna be in the upper left side.
Left means you did it with low risk, so that's what you want.
You want high return, low risk, okay?
And those are just these- these two attributes.
And so for these four, um,
return sequences, we can see a couple of things.
a comes out over here.
It's got zero risk because it just doesn't- it
doesn't- it doesn't- It's- it's constant- It's a constant all the time.
Um, here's b sure enough, look at that.
It's got a higher, uh,
it's got a higher return like, you know,
two and a bit times as much as the first investment a,
um, but its risk is higher too, and that's here.
c has a higher return and higher risk still.
And d over here is,
uh, well, it's kind of a sad thing, right?
It's got about, ah, that- that investment has only a little tiny bit more return than a.
But a has zero risk and d has,
you know, four units of risk.
So, okay, so by this thing,
you know, we don't like d, um.
Oh, interesting question, will come to it later by the way.
Is this, um, which- which of these is best?
Um, it's an interesting question.
Um, and the answer is we can't say.
Actually there is something we can say,
if we like return to be high and risk to be small,
this is- this is correct.
Then it turns out, you can't say if a or b or c is better.
You can't say which one is better.
It depends on what people would say is your risk appetite.
Ah, if someone said,
yeah, I- I- yes,
I'll take two and half times the return,
um, for a risk of two, I can do that.
Um, and so, you know,
that- that- that's completely subjective.
It depends on the actual investor.
Um, but we can say something.
We can say that d is a- simply a bad, that's a bad one.
Why? Because look, here's a which gets about the same return but
has zero risk as opposed to whatever four units of risk, right?
So that's- so the name for something like that is, uh,
let's see, the name for that is,
you would say it is dominated by the others, right?
So it is dominated by the investments, you know, a, b,
and c. Um, but basically it's just, it's crappy.
That's the technical term for- for what the investment d is.
Ah, okay. So this is just to tell you the standard deviation
mean these are kind of the staples of quantitative finance.
So the Chebyshev inequality can be
transposed to handle- to talk about standard deviation.
And there it's very interesting.
And this is something you should just remember, like period,
this is- this is the right way to remember the Chebyshev inequality in my opinion.
So suppose you had an n- n-vector x,
it's got- it's got an average, uh,
which is just average of x and standard deviation which is standard of x.
Okay. Now the, ah,
rough idea is that the entries,
you know, average of x is sort of like the middle point or whatever.
It's some- it's a typical value, right?
Um, the standard deviation tells you how much the entries,
you know, are above and below the- the average.
So, um, what this says is,
if you would like to know, um,
this is what fraction of the entries
are away from the average by Alphas standard deviations.
That's how people would say this.
That is no more than 1 over Alpha squared.
That's- that's what it means. That's where Alpha is bigger than 1.
I mean, it holds for Alpha less than 1, but it's not interesting.
Um, okay.
Um, now here's a very specific example,
is for any return time series with a mean of
8% and a standard deviation of 3%, a loss.
And that- that responds to x_i being less than or equal to 0,
that can occur no more than three eight squared,
which is about 14% percent of the periods. That's it.
So, uh, that tells you that.
By the way, it- it uses- it's just the Chebyshev inequality,
but you kind of get the idea.
And so the way people think of that in their head is roughly something like this.
You know, most entries of the vector are between plus and minus,
you know, um, one standard devi- on
-and-half standard- two standard deviations that- that's kind of.
Now, by the way, don't- if you have had a course on probability,
don't confuse this with like
a normal approximation or something
which gives you something- something different, right?
This is the Chebyshev it holds for- this inequality
holds has nothing to do with probability or distributions or anything.