1
00:00:00,000 --> 00:00:04,548
Now something else that we care about.
In, in a distribution.

2
00:00:04,769 --> 00:00:09,097
Is known as a quantile.
And quantiles are related to the.

3
00:00:09,097 --> 00:00:14,160
Cumulative distribution function.
So, let's consider a random variable.

4
00:00:14,380 --> 00:00:19,810
That's a continuous random variable.
That has a, a continuous cumulative

5
00:00:19,810 --> 00:00:22,231
distribution function.
So we have.

6
00:00:22,451 --> 00:00:28,247
Capital F of X is the probability that,
that big X is less or equal to little X.

7
00:00:28,247 --> 00:00:30,668
Alright?
So the definition of the.

8
00:00:30,668 --> 00:00:38,047
Quantile of a distribution so we take some
probability level aplha and so the alpha,

9
00:00:38,047 --> 00:00:45,064
an alpha sum number between zero and one
so the alpha times a 100 percent quantile

10
00:00:45,064 --> 00:00:52,350
distribution is the value Q of alpha such
that the CDF evaluated the quantile is

11
00:00:52,350 --> 00:00:56,902
equal to alpha.
Now the best way of thinking about this is

12
00:00:56,902 --> 00:01:03,932
to draw a picture.
So the idea here, if this is the

13
00:01:03,932 --> 00:01:09,145
probability curve.
Say F of X and let's specify some

14
00:01:09,145 --> 00:01:13,600
probability here, alpha.
Say alpha is equal five%.

15
00:01:14,060 --> 00:01:23,067
Then, the five percent quantile.
Is the value of x such that the

16
00:01:23,067 --> 00:01:29,036
probability to the left of the quantile is
equal to this, probability value, okay.

17
00:01:29,036 --> 00:01:35,005
So quantiles are the value in the sample
space such that the probability to the

18
00:01:35,005 --> 00:01:38,960
left of quantile is equal to your
specified alpha.

19
00:01:39,420 --> 00:01:46,319
Okay, so, so, that's again, the definition
of a quanta, we think we look at through

20
00:01:46,319 --> 00:01:50,200
here.
Now with the continuous random variable.

21
00:01:51,860 --> 00:02:01,620
So go back and Let's think of, X(f) of X,
for a continuous random variable.

22
00:02:08,080 --> 00:02:16,333
The, cube of distribution function.
Looks like this.

23
00:02:16,333 --> 00:02:20,818
And so X is over here, so here's minus
infinity.

24
00:02:20,818 --> 00:02:27,212
Here's infinity over here.
And if we have some value X, then the CDF,

25
00:02:27,212 --> 00:02:35,514
here, and if we is this height, so if this
is we put a ax scale on this, this is

26
00:02:35,514 --> 00:02:40,645
zero, this is one, then This is FX of
little x.

27
00:02:40,645 --> 00:02:45,842
That's the probability that big X is less
or equal to little x.

28
00:02:45,842 --> 00:02:52,855
So when we have a continuous distribution
the area under the probability curve we

29
00:02:52,855 --> 00:02:56,732
can write the cumulative distribution
function.

30
00:02:56,732 --> 00:03:03,250
It looks like this s-shape function.
And so, for any value of X we can figure

31
00:03:03,250 --> 00:03:09,932
out by going to the distribution function
what, what this probability is.

32
00:03:09,932 --> 00:03:16,186
Then we think of quantiles.
We can think of some probability value,

33
00:03:16,186 --> 00:03:21,470
like.05, and then we can say, given the
distribution function, given my

34
00:03:21,470 --> 00:03:26,064
probability value, what value of X gives
me this probability?

35
00:03:26,064 --> 00:03:29,740
So that, again, that defines what the
quantile is.

36
00:03:30,200 --> 00:03:36,016
So, when we are working with a CDF we
take'X' and then we get a probability

37
00:03:36,016 --> 00:03:41,213
value, and when we work with quantiles we
go in the other direction.

38
00:03:41,213 --> 00:03:46,797
We take a probability value and then we
figure out what the quantile is.

39
00:03:46,797 --> 00:03:52,381
So in this way we got f of x.
And then this way so we end up we do whats

40
00:03:52,381 --> 00:03:57,578
called the inverse function.
So we start from here and go down then

41
00:03:57,578 --> 00:04:03,240
were inverting this CDF function given the
probability to get a quantile.

42
00:04:06,600 --> 00:04:14,579
So, the picture that I just described.
So, if this, if we have a continuous,

43
00:04:14,886 --> 00:04:22,967
cumulative distribution function, then the
inverse of the distribution function

44
00:04:22,967 --> 00:04:27,980
exists.
And then we can solve for the quantile by

45
00:04:27,980 --> 00:04:33,709
applying the inverse function to, the
random variable.

46
00:04:33,709 --> 00:04:39,540
Now, the inverse function satisfies FX
inverse of FX of Q.

47
00:04:39,540 --> 00:04:44,780
Is equal to Q alpha.
This is equal to Q alpha.

48
00:04:45,620 --> 00:04:51,626
So we apply the inverse function to the,
the CDF at, at a point and that negates

49
00:04:51,626 --> 00:04:54,002
it.
So think of like, the exponential

50
00:04:54,002 --> 00:04:57,896
logarithmic function.
The exponential is the inverse of the

51
00:04:57,896 --> 00:05:02,846
logarithmic function and vice versa.
So either logarithm of x is equal to x.

52
00:05:02,846 --> 00:05:07,730
So the same thing is going on here, we
think of this is as the CDF and the

53
00:05:07,730 --> 00:05:12,020
inverse CDF is the function such that it
satisfies this property.

54
00:05:13,840 --> 00:05:19,584
So, if we can mathematically compute the
inverse function, then we can get the

55
00:05:19,584 --> 00:05:23,103
quantile.
So, that's why this inverse CDF is often

56
00:05:23,103 --> 00:05:27,340
referred to as the quantile function for,
a distribution.

57
00:05:28,580 --> 00:05:33,067
Now, particular quantiles that we're
interested in.

58
00:05:33,067 --> 00:05:38,093
So the one percent quantile is QO1, the
five percent quantile and the 50 percent

59
00:05:38,093 --> 00:05:43,927
quantile is known as the median.
So again, if we think of the, of a

60
00:05:43,927 --> 00:05:47,876
distribution.
We plot it's probability curve.

61
00:05:47,876 --> 00:05:52,184
And if this area's one%.
This is the one percent quantile.

62
00:05:52,184 --> 00:05:56,720
The area's five%.
This is the five percent quantile.

63
00:05:57,720 --> 00:06:03,835
And then the median is the 50 percent
quantile, that's such that the area is to

64
00:06:03,835 --> 00:06:07,820
the left of that.
Now we're gonna find in finance that

65
00:06:07,820 --> 00:06:12,331
quantiles are particularly interesting
things because they, they tell us about.

66
00:06:12,331 --> 00:06:14,760
The probability of loss.
So if we think of.

67
00:06:14,760 --> 00:06:18,346
The random variable.
Associated with this probability curve as

68
00:06:18,346 --> 00:06:22,275
a rate of return.
So then, and values over here would be

69
00:06:22,275 --> 00:06:26,873
negative rates of return.
And values over here would be positive

70
00:06:26,873 --> 00:06:30,321
rates of return.
So this low, this lower quantile

71
00:06:30,321 --> 00:06:35,853
represents a small negative number that
happens with a, you know, a particular

72
00:06:35,853 --> 00:06:39,589
probability.
So when we talk about, you know, with one

73
00:06:39,589 --> 00:06:42,103
percent probability, how much could we
lose?

74
00:06:42,103 --> 00:06:46,630
Well, it's equal to the one percent
quantile of the return distribution.

75
00:06:46,630 --> 00:06:50,394
And, we can say with five percent
probability, how much could we lose.

76
00:06:50,394 --> 00:06:54,409
Then, we're concerned with the five
percent quantile of the distribution.

77
00:06:54,409 --> 00:06:59,804
So, these quantiles, particularly when we
have distributions that represent rates of

78
00:06:59,804 --> 00:07:04,259
return, tell us about, the probabilities
associated with losing money.

79
00:07:04,259 --> 00:07:08,525
And, so those are, that's a very
important, very interesting way of

80
00:07:08,525 --> 00:07:16,324
thinking about risk.
Now, sometimes we can figure out the

81
00:07:16,324 --> 00:07:21,371
quantile function, for a particular random
variable.

82
00:07:21,371 --> 00:07:28,380
So for example, if we have the uniform
distribution, we know that the, CDF.

83
00:07:28,920 --> 00:07:30,302
Looks like this.
So.

84
00:07:30,302 --> 00:07:34,448
The inverse distribution function.
Is exactly the same.

85
00:07:34,448 --> 00:07:39,612
So for a, uniform random variable if I
tell you the probability I get X.

86
00:07:39,612 --> 00:07:44,122
Or if I take, take X I give you.
Get the same probability value.

87
00:07:44,122 --> 00:07:47,396
So the inverse function.
Quantile function.

88
00:07:47,614 --> 00:07:49,360
Satisfies this property.
