Class 3, Nov 25, 2025
Completion requirements
Examples of cdf. Absolutely continuous random variables, density function. Examples. Standard random variables: exponentials, gaussian, Gamma, Cauchy, log-normal. Change of density.
AI Assistant
Transcript
00:05:510Paolo Guiotto: Okay, on Inga.
00:08:130Paolo Guiotto: And welcome back to the Sabrada Familia.
00:13:920Paolo Guiotto: Okay, yesterday, we introduced the, the, cumulative distribution function.
00:26:620Paolo Guiotto: as well as the norm of probability of a random variable, but today we will focus mostly on the CDF, because differently from the law, which is a measure, so a tool which is,
00:42:600Paolo Guiotto: not easy to define. If you want to define directly a random variable, defining its law is not easy, because it's never easy to define a measure unless you base your measure on something which is already
00:57:100Paolo Guiotto: given.
00:58:610Paolo Guiotto: Whereas, as we will see, the CDF, it's a good point, because it's a function, the function of, real variable for a Scala random variable.
01:10:360Paolo Guiotto: With a certain number of properties that it will… that will turn out to be characteristic property, as we will see.
01:17:220Paolo Guiotto: So the function is defined this way, F of capital X of X is the probability that capital X is less or equal than
01:26:480Paolo Guiotto: axon, or if you want, in terms of law, is the new X, the law of x, of the interval minus infinity toxic included.
01:35:870Paolo Guiotto: Now… This function, fulfills this,
01:40:490Paolo Guiotto: fundamental properties. It is increasing in a large sensor, so not necessarily strictly increasing. We will see that it can be also flat, constant.
01:51:900Paolo Guiotto: For some intervals.
01:54:330Paolo Guiotto: At minus infinity, the value is 0. At plus infinity, the value is 1, the limit.
02:00:920Paolo Guiotto: It is continuous from the right at any point.
02:05:560Paolo Guiotto: It is not necessarily continuous from the left, but it has always the limit, because it is a monotonic function, so the limit always exists.
02:14:630Paolo Guiotto: And being increasing, also, the limit is less or equal to the value of the function at the point. So, in general, we may imagine a function made like this, with a piecewise increasing function.
02:28:340Paolo Guiotto: Okay, now let's start to take a bit confident, a bit more confidence with this by doing some examples.
02:36:370Paolo Guiotto: So, example one, let's start with a simple example, which is the random variable X constantly equal to certain value, X0.
02:47:670Paolo Guiotto: In this case, The cumulative distribution function.
02:52:730Paolo Guiotto: F, capital X of X, so we can say it's the probability that capital X is less or equal than X0.
03:01:980Paolo Guiotto: Now, sorry, let's equal to the next. Now, it depends, of course, where X is with respect to X0, because we understand that if X
03:15:490Paolo Guiotto: is left than at zero.
03:19:430Paolo Guiotto: So, we can help with the figure here. So, let's say that there is, like, zero somewhere.
03:25:460Paolo Guiotto: So we are here, we are computing the probability that capital X is less or equal than this value, little X. But capital X is constantly equal to X0, so it cannot be less than x. So this means that we are doing the probability of nothing, of empty set, so we get 0.
03:45:350Paolo Guiotto: While for X greater, or also equal to X0, so if X is here, or even here, we say, what is the probability that the variable, capital X, is less than that, less or equal than that value?
04:01:670Paolo Guiotto: Well, in this case, you see that it can be also equal. Now, because the variable capital X is constantly equal to X0, and X0, in this case would be equal to X0, so for every omega, this would be true. But even here, because X is greater than X0, the variable X is less than the… the variable capital X is less than the variable
04:26:00Paolo Guiotto: little X. So we may say that, in any case, we get the full sample space, and the probability is 1.
04:33:970Paolo Guiotto: So, this is the CDF. It means that, the plot of this CDF,
04:42:460Paolo Guiotto: the plot of a CDF is always between 0-1.
04:46:80Paolo Guiotto: So we plot here on the y-axis the values.
04:49:370Paolo Guiotto: So if this is X0, the function is 0,
04:53:360Paolo Guiotto: for X less than X0, and it is equal to 1 for X greater than X0. So this is the CDF for this. You see that it can be flat, no? There is a jump at the point where the mass is concentrated.
05:13:570Paolo Guiotto: Example 2, let's take the simplest example of a non-constant random variable. So, let's say that XB Bernoulli
05:25:480Paolo Guiotto: let's say a standard, then we leave with the probability P. So this means that probability that X is 1 is P,
05:35:300Paolo Guiotto: And probability detects is 0.
05:38:700Paolo Guiotto: is 1 minus B. You can, of course, extend this to the variable X, takes any two values, X1 and X2. This is the standard Bernoulli variable. So, also here we see that the CDF
05:58:10Paolo Guiotto: So the probability that X is capital X is less or equal than little x. Now, this capital X takes two values, 0 and 1.
06:09:810Paolo Guiotto: Okay, these are the two values achieved by the capital X. So, if you say, I want to know when capital X is below this X,
06:21:130Paolo Guiotto: So there is no omega, because X of omega is either 0 or 1. So we can say that if X is less than 0, we will have probability of empty, so 0.
06:36:430Paolo Guiotto: Then there is a case when X, let's say in green, is above or equal to 0, but below 1.
06:45:810Paolo Guiotto: So, when X is, great or equal than zero, and strictly less than 1.
06:52:450Paolo Guiotto: So, now you have the probability that capital X falls in the green segment.
06:59:600Paolo Guiotto: So this corresponds to the omega for which X of omega is equal to 0, no? So it is the probability for which X is equal to 0. And this is 1 minus P.
07:13:310Paolo Guiotto: And finally, for X greater or equal than 1, we have a third case, say, this one.
07:22:690Paolo Guiotto: So this is the case x greater or equal than 1.
07:26:90Paolo Guiotto: The set, where, the set of omegas where capital X of omega is less than that X, yellow X,
07:35:380Paolo Guiotto: As you can see, since both values, 0, 1, are less than this X, or equal even, you have that all the omegas are such that X of omega is less than that X. So in this case, the probability is the probability of omega, which is equal to 1.
07:54:480Paolo Guiotto: So the out… the output for the CDF is the following. So, we have something happens at zero at 1.
08:06:250Paolo Guiotto: the value 1 is here, then there is a remarkable value here, 1 minus P.
08:12:660Paolo Guiotto: And so the function is 0,
08:15:960Paolo Guiotto: up to X equals 0. Between 0, 1, the value is 1 minus P.
08:22:300Paolo Guiotto: At 1 takes the value 1.
08:25:820Paolo Guiotto: A plus included.
08:27:840Paolo Guiotto: So this is the CDF of a Bernoulli random variable.
08:39:299Paolo Guiotto: Well, we introduced another example, an important random variable.
08:47:60Paolo Guiotto: We have not yet defined, which is the so-called uniform
08:55:620Paolo Guiotto: Uniform random variable.
09:02:860Paolo Guiotto: So, the, random variable X is, let's say, uniformly
09:14:630Paolo Guiotto: distributed.
09:20:340Paolo Guiotto: on some interval, AVE, or we write notation X,
09:28:220Paolo Guiotto: This, tilde is as the distribution as uniform distribution on the interval AB.
09:38:640Paolo Guiotto: Now, what is this? Basically, the values of X are between A and B, and the distribution is uniform. What does it mean, this? Let's say that
09:54:700Paolo Guiotto: Well, we may say in two ways, I can give directly the shape of the law, or let's say we want that the probability that X belongs to AB is 1, so the variable is concentrated… the values of the variable are concentrated all in the interval.
10:13:570Paolo Guiotto: AB.
10:14:900Paolo Guiotto: And we want that the probability that X belongs to some interval I
10:22:20Paolo Guiotto: which is contained in the interval AB,
10:26:120Paolo Guiotto: So, this feature is in the range of the variable.
10:30:960Paolo Guiotto: So we know that the range is between A and B, so the variable, the values of the variable, falls into the interval AB, and if I now take a sub-interval I,
10:43:60Paolo Guiotto: of the interval ABE.
10:45:960Paolo Guiotto: I want that the probability to be into i is somehow proportional to how much is the size of I with respect to the size of the interval AB. So, the idea is just, we say, this is…
11:00:820Paolo Guiotto: the ratio between the measure of i, so the length of I, and the length of the interval, which is V minus A.
11:10:830Paolo Guiotto: Or, in other words, it is, this, this is the Levesque measure, lambda 1 of I.
11:17:970Paolo Guiotto: So, let's say, probability that X belongs, since this is an interval, we can also write into CDE.
11:26:100Paolo Guiotto: If this is CD, this is C minus D over B minus A.
11:34:150Paolo Guiotto: In such a way, you get 1 when the interval CD is exactly the interval AB, no? I want to say, so if the interval I is one half of the length of the interval AB, I get one half as the value of this probability.
11:49:230Paolo Guiotto: Now, in this shape, this says that the mu X of i is equal to lambda 1.
11:58:740Paolo Guiotto: I divided B minus A if I… if I is an interval, interval contained in AB.
12:10:820Paolo Guiotto: So now, in general, since,
12:17:620Paolo Guiotto: UX is a bore and measure, so it's defined on any bore and set in general.
12:24:720Paolo Guiotto: we say that X is uniformly distributed in AB, If the low of X So, muaxa…
12:35:320Paolo Guiotto: on the set E is equal to the measure of E. Now, here, I'm not saying that E is necessarily contained into the interval AB, so I intersect with the interval AB, so I take the part of E which is in AB. If E is out of AB, this section is empty, and this number is 0.
13:00:600Paolo Guiotto: divided by the length of the interval for every borer set
13:08:750Paolo Guiotto: This is the definition of the law for a uniform distribution.
13:14:740Paolo Guiotto: Okay.
13:15:850Paolo Guiotto: Now, once we have the law, we cannot determine the CDR firm.
13:20:290Paolo Guiotto: In this case.
13:24:960Paolo Guiotto: the CDF, FX of X.
13:28:500Paolo Guiotto: Well, now, since here, in this case, we have defined the variable, assigning its low, let's use the low, to determine the values of the CDF. So we have to compute mu X of the offline minus infinity to X.
13:47:30Paolo Guiotto: Now, if you look at the formula, you get 1 over B minus A, the lambda 1, the LeBague measure, of minus infinity 2x.
13:56:840Paolo Guiotto: intersection, the interval AD.
14:01:760Paolo Guiotto: Now, here we have a… few cases, because this is the interval AB.
14:08:300Paolo Guiotto: Now, suppose that you pick an X here, at the left of A.
14:13:440Paolo Guiotto: Now, the intersection between the offline from minus infinity to X, which is this one in blue.
14:21:720Paolo Guiotto: And the interval AB, which is this one in yellow.
14:26:340Paolo Guiotto: It's clearly empty. So we gather that the measure would be zero.
14:31:30Paolo Guiotto: So we have a case one, if X is less
14:35:770Paolo Guiotto: Then A, we get 0.
14:39:430Paolo Guiotto: When X is greater or equal than A, and less than V, what happens? Now, this is the case when
14:47:180Paolo Guiotto: I have my interval AB,
14:53:810Paolo Guiotto: and I'm picking an X which is between A and B. So, as you can see, the intersection between the offline minus infinity to X
15:03:350Paolo Guiotto: And the interval AB is this one, the intersection, no? So, this little interval from A to X
15:12:440Paolo Guiotto: So the measure of that interval, that's the Rebec measure, so it's the length of the interval, will be X minus A that must be divided by P minus A.
15:24:550Paolo Guiotto: And when X is greater than B, we are in the third case, so still we have AB.
15:32:360Paolo Guiotto: X here.
15:34:150Paolo Guiotto: It's clear now that if I do the intersection of the offline from minus infinity to X,
15:42:500Paolo Guiotto: with AB, I get the interval AB.
15:47:350Paolo Guiotto: So the Levesque measure of the intersection, in this case, will be the Levesque measure of this, which is B minus A. So I will have B minus A divided P minus A, and that's 1.
16:00:670Paolo Guiotto: So this is the CDF. Let me just copy here. FXX is equal to 0 for X less than 8. Then, basically, it is a linear function.
16:13:530Paolo Guiotto: X minus A divided B minus A, you see that it is linear, no? It is first a group polynomial in X, which is 0 at A, and it is 1 at B, so for X between A and B.
16:28:420Paolo Guiotto: And then it is 1 for X greater than… So, the plot of this… is the following.
16:43:380Paolo Guiotto: We wrote, this is the line Y equal 1.
16:46:820Paolo Guiotto: We have somewhere the two values AB.
16:49:910Paolo Guiotto: So the CDF is 0 until A.
16:53:770Paolo Guiotto: Then it grows linearly up to 1.
16:58:00Paolo Guiotto: which is reached that X equals B, and then it stays equal to 1 forever.
17:03:990Paolo Guiotto: This is the CDF for this particular distribution.
17:14:630Paolo Guiotto: We will see later other… introduce other important distributions.
17:20:89Paolo Guiotto: Now, there is a question. Now, we know that to each X, we can associate a low, which is a measure, and now a CDF, which is a function, with certain properties.
17:36:20Paolo Guiotto: Now, it is possible to prove,
17:39:950Paolo Guiotto: trivial, but not particularly interesting for us, that we can basically do the contrary. So, to each probability measure on the barrel set, we can construct, trivially, a random variable whose law is that measure. So, we can do it, just
17:59:320Paolo Guiotto: we noticed that…
18:08:620Paolo Guiotto: So given… Given a random variable.
18:15:580Paolo Guiotto: X on some probability space omega F, P, no better specified, we associate a mu X probability.
18:28:130Paolo Guiotto: Measure.
18:30:410Paolo Guiotto: on, on R, with the Borel sets.
18:36:910Paolo Guiotto: And also, we can associate a function, FX, CDF.
18:45:60Paolo Guiotto: function.
18:47:800Paolo Guiotto: This is a function from R, 2 0, 1.
18:54:140Paolo Guiotto: At least it sounds a more concrete object than imagined. We can also do the vice versa.
19:13:130Paolo Guiotto: Boom.
19:14:860Paolo Guiotto: Let's say, proposition, one,
19:20:530Paolo Guiotto: If mu is a probability, measure.
19:30:830Paolo Guiotto: on R, with the Borel sets.
19:36:420Paolo Guiotto: There exists a space, and the random variable whose law is that new? So there exists a space, omega.
19:44:340Paolo Guiotto: F, P.
19:46:790Paolo Guiotto: and the random variable x defined on that omega, real valued such that mu of X
19:54:970Paolo Guiotto: is exactly mu. So we can… this is saying, we can start from the low.
20:03:700Paolo Guiotto: To know that there exists always a probability, a random variable on some probability space.
20:09:880Paolo Guiotto: Whose law is that new? Well, this is not a…
20:14:950Paolo Guiotto: This is not particularly difficult, because you just take omega is R itself, F is just the Borel sigma algebra.
20:26:770Paolo Guiotto: And, perhaps, as you may imagine, what is the variable?
20:33:450Paolo Guiotto: X of omega is just omega. That's the function, because if you think about the probability that X belongs to E in this… in the… sorry, the probability P is the
20:46:830Paolo Guiotto: measure mu that you define. The probability that X is in E is what?
20:53:390Paolo Guiotto: P is mu, is the measure mu of the set of omegas such that in omega, so in R, in R, such that X of omega, which is omega, belongs to E.
21:07:500Paolo Guiotto: So, it is the set of omegas.
21:10:450Paolo Guiotto: That belongs to E. It's E itself, no? It's a sort of tautology. So this is a mu of E.
21:18:540Paolo Guiotto: And this says that the probability that X belongs to E is mu of E. This is, by definition, what is the law of the random variable X. So you see that mu X is mu.
21:32:170Paolo Guiotto: So this is somehow trivial. Now, you may wonder, what is the interest of doing this? Well, there is no particular interest when you deal with one single random variable.
21:45:700Paolo Guiotto: But, let's say that in probability, normally you start saying, let's X be a variable with this distribution.
21:54:820Paolo Guiotto: Now…
21:55:990Paolo Guiotto: does it exist a random variable with that distribution? We can now say, if we start from the low, we can say that, given the low, there exists always a random variable with that low.
22:08:280Paolo Guiotto: So we are sure that we can talk about what we say. A little bit more complicated is the proposition 2 that shows that, given a function f.
22:19:660Paolo Guiotto: If F is now a function of X, Defined on a real line.
22:26:20Paolo Guiotto: With value since 01.
22:29:140Paolo Guiotto: is a function with all the properties of a CDR.
22:33:680Paolo Guiotto: Is that function A CDF?
22:37:280Paolo Guiotto: So, if F fulfills
22:43:30Paolo Guiotto: all the… properties…
22:51:230Paolo Guiotto: of a CDF. So, roughly, F is increasing, in weak sense, in large sense, then F at minus infinity is 0. F at plus infinity is 1.
23:09:520Paolo Guiotto: Then, F is, continuous… from… the right.
23:19:200Paolo Guiotto: F is, has limit, Thus.
23:25:210Paolo Guiotto: Remove it?
23:27:200Paolo Guiotto: At Lefton.
23:29:710Paolo Guiotto: Since F is increasing, there is always the limit. That's not the requirement, but the point is that this limit must be less or equal to F of X.
23:44:20Paolo Guiotto: No.
23:45:10Paolo Guiotto: Are we sure that there exists a random variable whose CDF is that F? The answer is yes. There exists the probability space, omega F, P,
23:57:180Paolo Guiotto: and the X random variable, such that the CDF of that X is F.
24:05:150Paolo Guiotto: So now you are sure that whatever is the function you say, Huh?
24:11:870Paolo Guiotto: Provided that it has the key properties of a CDF, it's a CDF of something. So if I do a function which is 0 here, then start being present, then there is a jump here, it does like that, then there is another jump here, does like this, and then it is equal to 1,
24:28:560Paolo Guiotto: That's a CDF of something.
24:31:170Paolo Guiotto: Okay?
24:32:410Paolo Guiotto: This is what it's saying. In the CDF, there is a random variable whose cumulative distribution function is this one.
24:43:50Paolo Guiotto: Well, it's not difficult, the proof, but for simplicity, I will do the proof, because it becomes basically trivial, with the two extra conditions. So we do the proof.
25:05:360Paolo Guiotto: Assuming…
25:10:240Paolo Guiotto: two extra conditions which are not included in this. Number one, that the function is strictly increasing.
25:18:780Paolo Guiotto: F… Increasing strictly.
25:22:810Paolo Guiotto: So this is the key requirement we had here.
25:30:820Paolo Guiotto: And number two, we require also that F be continuous.
25:38:60Paolo Guiotto: Which is not the case of the figure, by the way, but…
25:41:990Paolo Guiotto: It simplifies the proof. The proof can be extended to the general case. Now.
25:49:480Paolo Guiotto: So let's start from the end. So, we look for a space with a random variable whose CDF is that F. So, let's see what should happen to be, to be through this. Now, F is D.
26:06:560Paolo Guiotto: CDF.
26:08:630Paolo Guiotto: of NX if the probability that the capital X is less or equal than little x is our F of X.
26:20:980Paolo Guiotto: Now, we can see this on a figure to understand what is the idea.
26:28:580Paolo Guiotto: So now, we do the plot of a CDF of this type, which is strictly increasing and continuous, so no jumps.
26:35:870Paolo Guiotto: So I imagine something like this.
26:39:740Paolo Guiotto: I want that, the probability pick an X.
26:43:260Paolo Guiotto: So, let's say this one.
26:45:310Paolo Guiotto: I want that, the probability that X be less or equal than that X be equal to the number F of X.
26:52:530Paolo Guiotto: Which is this one.
26:59:270Paolo Guiotto: Now…
27:08:670Paolo Guiotto: Now, if the function f is strictly increasing and… well, if it is strictly increasing, you notice that X is less or equal than little x if and only if
27:25:170Paolo Guiotto: F of capital X is less or equal than f of little x.
27:32:890Paolo Guiotto: So this means that, what I see here… This interval here.
27:41:250Paolo Guiotto: is the… should be the range of this capital F of X. So, because the values f of x can be seen as values, this is positive, because F is positive, where the quantity f of x is between 0 and f of x.
27:59:520Paolo Guiotto: So, I could say that,
28:07:670Paolo Guiotto: I could say that if I take as omega, The interval 01.
28:17:620Paolo Guiotto: as family F of measurable sets, Bores sets.
28:23:100Paolo Guiotto: Orland sets in, contained in 01.
28:27:920Paolo Guiotto: As probability P, the Lebec measure.
28:33:40Paolo Guiotto: Look, the probability that X is less or equal than little x would be the measure, 11 measure, of the omegas in 01,
28:47:860Paolo Guiotto: such that X of omega is less or equal than X, and I want that this be equal to the number F of X.
28:58:600Paolo Guiotto: So now, if this inter… if this set here
29:02:820Paolo Guiotto: is the interval from 0 to f of x.
29:07:660Paolo Guiotto: This is true, because I'm computing
29:11:680Paolo Guiotto: I'm computing lambda 1 of 0FX, and by definition, this would be equal to F of X.
29:20:330Paolo Guiotto: So, our x should be made in such a way that X of omega is less or equal than little x if and only if omega is
29:33:880Paolo Guiotto: between 0 and f of x.
29:47:460Paolo Guiotto: This happens if X is equal to…
29:58:840Paolo Guiotto: informally, no? Imagine that you invert informally. X of omega is less than X, if omega is less than…
30:15:690Paolo Guiotto: What would you do here to extract omega?
30:25:240Paolo Guiotto: You should apply.
30:28:810Paolo Guiotto: D, X minus 1.
30:31:300Paolo Guiotto: So, let's say that if X is increasing, but this will come at the end. Now, I wanted this VF of X,
30:40:670Paolo Guiotto: So, it means that X of omega must be the inverse function of F.
30:49:750Paolo Guiotto: Now, the inverse function exists because F is strictly increasing and continuous, so, sin, sir.
30:58:780Paolo Guiotto: F is a function that goes from R to 01.
31:05:320Paolo Guiotto: It is strictly increasing, and therefore it is injective.
31:11:580Paolo Guiotto: Strictly.
31:14:420Paolo Guiotto: So it is injective.
31:19:490Paolo Guiotto: And, also, it is, well, actually, let's take, 01 open.
31:28:220Paolo Guiotto: Well, no, we can take like this. So it is injective, so it is invertible, actually…
31:41:330Paolo Guiotto: Well, let's say that if I put the function
31:46:140Paolo Guiotto: from R to the image of R, which is a subset of 01. It's not necessarily
31:53:940Paolo Guiotto: the range of F is not necessarily all the intervals in 1, because it is not granted that F takes value 1 or value 0. It's just a function that, at infinity takes value 0 minus infinity at plus infinity takes value 1. But now, this is also search active.
32:13:340Paolo Guiotto: So, it is invertible.
32:16:360Paolo Guiotto: So there exists the inverse function of this F from this F of R, Back to R.
32:27:820Paolo Guiotto: And you call, by definition, X of omega
32:33:320Paolo Guiotto: is F minus 1 of omega.
32:36:990Paolo Guiotto: And from this position, you see that the variable X of omega is less or equal than x if and only if F minus 1 of omega is less or equal than x if and only if omega is less or equal than F of X.
32:53:570Paolo Guiotto: So when we compute the probability that capital X is less than little x.
33:01:460Paolo Guiotto: This is the probabilities the Lebec measure is the Lebesgue measure of the set of omegas in the interval 0, 1, such that omega is less than f of x.
33:14:890Paolo Guiotto: But this, in terms of omega, is the interval from 0 to the value f of x, and therefore the back measure.
33:23:180Paolo Guiotto: of this interval.
33:26:810Paolo Guiotto: will be exactly the value F of X.
33:36:880Paolo Guiotto: So this, shows that,
33:41:310Paolo Guiotto: If we have a CDF, there exists a random variable whose CDF is our function f. So, in particular, this means that
33:49:980Paolo Guiotto: to define a random variable, we could give directly its CDF, provided it is a CDF, it verifies the property of CDF. There exists a random variable with that CDF.
34:02:480Paolo Guiotto: So… in practice.
34:11:880Paolo Guiotto: We… Good.
34:15:690Paolo Guiotto: define.
34:17:679Paolo Guiotto: a random variable.
34:19:830Paolo Guiotto: Assign.
34:25:550Paolo Guiotto: either.
34:29:960Paolo Guiotto: It's low.
34:33:100Paolo Guiotto: Or… It's… CDF.
34:39:850Paolo Guiotto: Now, there is another important tool, another… a further specification, which is not always well-defined.
34:51:540Paolo Guiotto: So it's, it's something that cannot be always used to define a random variable, and that's the concept of density.
35:04:390Paolo Guiotto: And, absolutely… Continuous.
35:14:530Paolo Guiotto: random… viable, so…
35:36:980Paolo Guiotto: Now, this arises from this, definition.
35:45:330Paolo Guiotto: we say, that, a random variable X.
35:54:300Paolo Guiotto: Is absolutely continuous.
36:04:20Paolo Guiotto: If… The law of X, which is a Boreal measure.
36:11:440Paolo Guiotto: We write, let's say, informally in this way, if the law of x can be written as a function of X times the Lebec measure.
36:23:200Paolo Guiotto: So, that is,
36:28:90Paolo Guiotto: mu X of any Borel set E is the integral on e of a function FXX dx.
36:38:80Paolo Guiotto: Where this function F, X,
36:43:120Paolo Guiotto: FX is an L1 function on the real line with back to the LeBague measure.
36:52:630Paolo Guiotto: This function, FX, is called density of X.
36:58:530Paolo Guiotto: is called… density.
37:05:80Paolo Guiotto: of X. Because the intuitive idea is that, the probability
37:14:940Paolo Guiotto: that X belongs to a small interval from X, let's say, to X plus H, with this number small.
37:25:310Paolo Guiotto: So let's say that X is approximately equal to little x, no, because this is X between little x and little x plus h. So we are in a very, very small neighborhood of this value.
37:41:940Paolo Guiotto: Now, you cannot take H equals 0, as you will see, because this value will be trivially always equal to 0.
37:49:330Paolo Guiotto: In fact, if you see probability that capital X is equal to little x, now this would be the probability that X belongs to the singleton, little x, and if you put the singleton down here into this integral.
38:07:700Paolo Guiotto: Now you get zero, because for the LeMag measure, this guy, lambda 1 of a singleton, is 0.
38:15:380Paolo Guiotto: you are integrating on a measure zero set, you get zero. So, the, the random variable
38:23:190Paolo Guiotto: has no weight for points. This is different, for example, for the opposite case. Suppose that X is constantly equal to a number. There is a value X0, for which the probability is total 1,
38:36:950Paolo Guiotto: So, it's the opposite of this. Here, there is no value of X for which the probability that capital X is equal to a single value, little x, is positive. They are all equal zero.
38:48:640Paolo Guiotto: So that's why we have to take a small interval. So we have that this integral, according to this formula, reduces to the integral from X to X plus H.
38:58:750Paolo Guiotto: F, XSA of YDY.
39:03:890Paolo Guiotto: Now, in general, this is complicated if f is only L1, but if we assume, moreover, that FX is also continuous.
39:15:270Paolo Guiotto: If these things is continuous, That happens in lots of cases. Now, we may say that when the family
39:26:860Paolo Guiotto: H from X to X plus H, and H is more or less.
39:30:670Paolo Guiotto: So, this value, the value of X at point Y, it is to have more or less of the continuity, like the value here. So, I can say that that integral is approximately equal to FX of X
39:48:600Paolo Guiotto: times the integral of 1, which is H.
39:53:430Paolo Guiotto: So, in other words, this saying that the probability that the valuable food to be next and that's passage is proportional to this age.
40:03:360Paolo Guiotto: And the coefficient of proportionality is this number, which is not the probability, interpretation of FX is not that one of the probability, but it is sort of probability per unit of matter.
40:16:340Paolo Guiotto: Because if you're going to die by the United States, you shouldn't be bad. No? So that's not bad. It's not…
40:26:160Paolo Guiotto: Nope.
40:28:110Paolo Guiotto: Exactly what… as when you say the mass density. Now, when you have a mass density, that's not the mass, it's mass for unit of length, or area, or volume. That means that when you multiply by the length, you get the mass. Now, but the mass density itself is not a mass.
40:45:990Paolo Guiotto: is mass, pair, over, linear meter, or cubic meter, and this is the same type, of course, this is not a probability. This probability per unit of, this determination, or this quantitation.
41:04:10Paolo Guiotto: This means that that quantity in this one would be even bigger than 1, okay? Because the points that stop this number to be the probability, but this time speaking, they gave that this must be very small. So this one could be even bigger, but with the it makes it more number.
41:24:200Paolo Guiotto: Less than one particular.
41:27:770Paolo Guiotto: So this is just for the interpretation. Okay, so a random variable is absolutely continuous when this happens. So in particular, you see that…
41:40:570Paolo Guiotto: In particular, If the random variable X is absolutely continuous, you take the CDF, huh?
41:53:210Paolo Guiotto: which is the mu X at… of minus infinity X.
41:59:90Paolo Guiotto: Because of the,
42:01:780Paolo Guiotto: of the formula that say mu X of E is the integral on e of the density, so I have the integral on the domain minus infinity 2x.
42:11:810Paolo Guiotto: of the density, or, equivalently, the integral from minus infinity 2X of FX, say, in the integration variable Y.
42:26:240Paolo Guiotto: Now, this formula PR.
42:31:740Paolo Guiotto: tells, first of all, that if you know the density, in principle, you could compute the CDF by computing this integral.
42:41:540Paolo Guiotto: But also, the vice versa could be… could be done, so…
42:46:390Paolo Guiotto: at least informally, we may expect that something like… you see that FX of X is an integral function of little fx. So the relation between the two is, again, capital FX is the integral of little fx.
43:04:650Paolo Guiotto: And, it comes to me that legal effects is…
43:14:20Paolo Guiotto: the derivative of, so we may expect that this
43:19:480Paolo Guiotto: is the derivative of the CDF. Now, actually, to make this a true statement, we have the following proposition.
43:33:550Paolo Guiotto: So… X is absolutely… continuous. Actually, there is an if and only if.
43:46:220Paolo Guiotto: This absolute continuity reflects on the properties of the CDF, that are the following. Number one.
43:56:360Paolo Guiotto: The CDF is, first of all, a continuous function.
44:01:270Paolo Guiotto: on the real liner. Second… Now…
44:06:220Paolo Guiotto: It might not be always differentiable.
44:09:990Paolo Guiotto: actually, the right concept that you see here is that when this happens, this means that the FX is a derivative not necessarily everywhere, but almost everywhere, so there exists
44:26:470Paolo Guiotto: F prime of X.
44:29:560Paolo Guiotto: equal to little f of x for almost every X in R.
44:36:750Paolo Guiotto: The almost every is referred to the LeBague measure, with the respect… to LeBague.
44:47:170Paolo Guiotto: measure.
44:53:190Paolo Guiotto: And the number 3… The density must be an L1 function.
45:00:460Paolo Guiotto: positive.
45:03:760Paolo Guiotto: with the integral on R of the density equal to 1.
45:20:290Paolo Guiotto: Mmm, I… I don't, we, we, we skip the proof, it's technical,
45:31:690Paolo Guiotto: Let's see some examples of this.
45:37:220Paolo Guiotto: So, for example, because of this characterization, if we go back to the CDF we determined this morning.
45:46:960Paolo Guiotto: If you take the constant random variable, this is the CDF, you see it's not even continuous.
45:54:560Paolo Guiotto: So, the first of these three key properties is not verified. This is not absolutely continuous. There is no density for this variable. And the same is for the Bernoulli. Here we have two discontinuities.
46:07:340Paolo Guiotto: While, for the uniform, we can show that there is a density now. So, let's say this example.
46:16:590Paolo Guiotto: So, X constantly equal to X0 is naught.
46:25:120Paolo Guiotto: absolutely continuous.
46:28:780Paolo Guiotto: And also, X Bernoulli.
46:32:750Paolo Guiotto: With that.
46:34:960Paolo Guiotto: Well, except for the generated cases, so when P is between 0 and 1, because P equals 0 means that the probability that X is 1 is 0, so the probability that X is 0 is 1. So this means that X is actually a constant variable, so it's the…
46:51:690Paolo Guiotto: The generate case is the other case, is not… absolutely continuous.
47:00:200Paolo Guiotto: And these two are because of the same reason.
47:03:670Paolo Guiotto: This because…
47:09:10Paolo Guiotto: the… Relative, CVS.
47:16:500Paolo Guiotto: is not continuous.
47:23:460Paolo Guiotto: Well, maybe we will tell something about the continuity, which is not technically too complicated, and this follows from the dominated convergence. For the derivative, it's a bit more complicated.
47:35:830Paolo Guiotto: Now, instead, if we take X a uniform random variable.
47:44:310Paolo Guiotto: So we already computed the FX of X. That was 0 for X less than A. Then we have this linear function, X minus A divided B minus A for X between A and B.
48:00:870Paolo Guiotto: And 1 for X greater than B.
48:05:00Paolo Guiotto: Now, as you can see, there is a classical derivative here. So, first of all, here we see that the function fx is definitely a continuous function in the real line, no?
48:19:790Paolo Guiotto: There is no discontinuity. Second, we see that there exists the derivative everywhere, except at two points, points A and B, where you have the kink, no? So, there exists the derivative of F, X,
48:35:50Paolo Guiotto: And this is equal to 0 for X less than A,
48:39:550Paolo Guiotto: When x is between A and B, without touching A and B, the derivative is easy, is 1 over B minus A, and for X greater than B, it is equal to 0 again.
48:53:670Paolo Guiotto: So we can say that, the derivative exists for, so there exists derivative, of F…
49:03:810Paolo Guiotto: for every X different from A to B, so different from two points that, for the Lebec measure, are nothing.
49:12:810Paolo Guiotto: So, I'm measured zero sector.
49:15:560Paolo Guiotto: And this function that you see here is the density.
49:20:290Paolo Guiotto: Well, actually, this density is a constant, because if you plot, the density, the density is the derivative, so if you look at the, at the CDF, no?
49:34:160Paolo Guiotto: This is, piecewise linear, so the derivatives are zero in the two flat, pieces, and then the derivatives are constant in that, in that, diagonal.
49:48:120Paolo Guiotto: piece. So, the derivative is this.
49:53:580Paolo Guiotto: So we have zero out here.
49:56:950Paolo Guiotto: And the value 1 over… B minus A in the interval AB. So that's the density FX.
50:07:40Paolo Guiotto: So we can write this density as, basically 1 over B minus A times the indicator of the interval AB. That's the density of this random variable.
50:22:250Paolo Guiotto: You can easily check that, of course, it is positive.
50:25:760Paolo Guiotto: It is integral, it's 0 of an interval, and the integral of this is equal to 1.
50:34:180Paolo Guiotto: And the integral from minus infinity to plus infinity of this FX reduces to the integral from A to B of 1 over B minus A, the indicator of AB, and that's equal to 1.
50:50:740Paolo Guiotto: So, this shows that this variable is absolutely continuous, and this is the density.
50:58:970Paolo Guiotto: Now, if you can introduce a random variable through the density, it's like…
51:06:690Paolo Guiotto: First, to have something more, because the variable… not each variable has a density, we said.
51:15:250Paolo Guiotto: And this, as we will see, yields to better possibilities in calculations. So let's see some standard, important examples of random variables that are introduced through a density. So…
51:31:150Paolo Guiotto: The first one is the exponential.
51:36:20Paolo Guiotto: random variable.
51:39:980Paolo Guiotto: So this is, we say that X is exponential.
51:45:930Paolo Guiotto: of parameter lambda. Here, lambda is a positive.
51:50:10Paolo Guiotto: value.
51:51:240Paolo Guiotto: If… We can start directly from the density, because if we give a density.
51:59:150Paolo Guiotto: automatically we have a CDF, SDF automatically yields a random variable. Okay, you see the mechanism. So, if FX is this thing, is lambda E minus lambda X times the indicator of 0 plus infinity.
52:19:360Paolo Guiotto: for the X.
52:22:610Paolo Guiotto: Now, of course, we will check that this is a density.
52:26:290Paolo Guiotto: We compute the CDF of this, so let's do some calculation around this variable. Let's plot the CDF density first.
52:36:90Paolo Guiotto: Now, as I said, the density is not necessarily, well, that's… this is the plot of FX.
52:44:900Paolo Guiotto: It is not necessarily bounded by 1. Remind, this is a probability density, so it's not necessarily a probability. It's probability per unit of length. In fact, this function is 0 when x is negative. At X equals 0 is equal to lambda.
53:00:850Paolo Guiotto: So lambda can be 1 billion, so that value is bigger, and then it decays as an exponential, negative exponent to zero, so it's like that.
53:11:520Paolo Guiotto: So this is the density of this.
53:15:260Paolo Guiotto: So let's check… that… FX is a probability.
53:27:650Paolo Guiotto: density.
53:33:200Paolo Guiotto: So, of course, FX is greater or equal than zero, and we show at once that it is integral, and the integral is equal to 1.
53:43:600Paolo Guiotto: and integral minus infinity plus infinity of the function fx, since it is positive, this coincides with the models of fx. So, at the end, when I will show that this value is 1, this at once tells that this function is integral, okay?
54:00:630Paolo Guiotto: So, now, since fx is negative for X negative, this integral reduces to the integral from 0 to plus infinity, and the function is now lambda e to minus lambda X.
54:12:680Paolo Guiotto: This integral can be easily computed, because inside here, you see there is the derivative with respect to X of E minus lambda X with the minus.
54:23:370Paolo Guiotto: No, because the derivative with respect to X of that becomes minus C minus lambda X times the derivative of the exponent with respect to X, which is a minus lambda.
54:32:430Paolo Guiotto: So we have the evaluation of minus E minus lambda X between X equals 0 and x equals plus infinity.
54:41:960Paolo Guiotto: At plus infinity, we get 0, because lambda is positive, and at 0, we get 1, so with the minus, it comes plus 1. So this shows that the integral is finite, and it is relative to 1.
54:57:450Paolo Guiotto: To compute the CDF,
55:03:720Paolo Guiotto: We have to compute the integral from minus infinity to X of the function of the density.
55:13:360Paolo Guiotto: So if you have the CDF, you do the derivative. If you have the density, you have to integrate.
55:18:800Paolo Guiotto: on the appropriate interval, from minus infinity to X.
55:22:150Paolo Guiotto: Now, since F is 0,
55:25:360Paolo Guiotto: on the offline from minus infinity to zero. It is clear that when X is negative, you are integrating on an interval where the density is zero. So we will split this integration into X negative, X negative, or 0, X squared, then 0.
55:44:70Paolo Guiotto: So here, we are integrating 0,
55:47:380Paolo Guiotto: sorry, flop X in the Y, and therefore we get 0.
55:52:300Paolo Guiotto: In this case.
55:55:620Paolo Guiotto: If X is positive, since the function is 0 here, we can throw away the interval from minus infinity to zero, and restrict to 0 to X. And then, from this, on this interval, we have lambda E minus lambda y dY.
56:15:720Paolo Guiotto: So again, this is the derivative with respect to Y of minus C minus lambda y.
56:23:990Paolo Guiotto: And therefore, this will yield what? Minus E minus lambda y to be evaluated now from X equals 0, so Y equals 0, sorry, Y equals X.
56:38:60Paolo Guiotto: Since there is the minus we carry outside, so minus final value is E minus lambda X, minus initial value is e to 01.
56:49:20Paolo Guiotto: So, better 1 minus E minus lambda X.
56:54:40Paolo Guiotto: So the CDF is… FX of betta X is 0 when x is negative.
57:02:760Paolo Guiotto: And for X positive, it is 1 minus E2 minus lambda X.
57:10:880Paolo Guiotto: In many problems, since you will have problems like zoom that X is an exponential random variable, and sometimes you need to use directly the CDF, it's better to
57:22:860Paolo Guiotto: To… to keep a record of these formulas, okay?
57:28:220Paolo Guiotto: So, write somewhere these formulas for your convenience. Now, here you see that
57:35:960Paolo Guiotto: The shape of this thing is… 0 when X is negative.
57:42:200Paolo Guiotto: Then, at X equals 0, you see that the 1 minus the exponential is 0, because the exponential is 1, so we start from 0. Let's say that this is basically… you take the negative exponential that goes down that… for you, goes down this way. With minus, it goes up that way.
57:59:300Paolo Guiotto: So 1 minus, it's just a translation that makes when the value is plus infinity, this quantity is 1. So if this is the value 1,
58:09:210Paolo Guiotto: And this is the line at quote 1. We have something like this.
58:16:210Paolo Guiotto: Okay, so this is the CDF of this.
58:20:990Paolo Guiotto: Also, here you see that we have a nice, continuous, totally differentiable.
58:27:210Paolo Guiotto: that you can see, because, this is the plot of the derivative.
58:37:320Paolo Guiotto: No? This FX would be the F, capital FX prime. But the weather, it's not a problem, because it's a unique single point.
58:55:620Paolo Guiotto: Okay, so this is the exponential. Now, second…
58:59:800Paolo Guiotto: important for us is the class of Gaussians.
59:07:870Paolo Guiotto: This is… It's definitely the most important type of random virus we encounter in probability. This is not because
59:16:900Paolo Guiotto: But that's because of an important theory we will see in the future.
59:21:950Paolo Guiotto: Which is the central limit theorem.
59:24:980Paolo Guiotto: So a Gaussian is the following. We say that, X, is, Goshen.
59:36:290Paolo Guiotto: With, mean… oh, I forgot… well, okay.
59:42:700Paolo Guiotto: I forgot to compute, for example, mean and variance of this thing. Well, I will return maybe we do it on the Gaussian. With min m, which is supposed to be any real number.
59:58:230Paolo Guiotto: And, variants. Now, Of course,
00:05:400Paolo Guiotto: M will be the mean value of the random variable, the variance will be the variance of the random variable, but let's say these are, for the moment, names. It is normally written at square to emphasize the fact that it is a positive number.
00:20:490Paolo Guiotto: Which is a real positive. Well, let's say, that's right, it's actually positive.
00:27:660Paolo Guiotto: And the notation is, Normally, is this one.
00:35:730Paolo Guiotto: X is distributed as N, that stands for normal, also. Normal.
00:43:400Paolo Guiotto: M sigma square.
00:48:490Paolo Guiotto: So, we say that X is a Gaussian. If… X is absolutely continuous.
00:59:250Paolo Guiotto: with density.
01:05:660Paolo Guiotto: we have this formula, F, X of X,
01:09:940Paolo Guiotto: equal. This is a scaling factor to make this a probability distribution. 1 over 2 root of 2 pi sigma squared times exponential minus X minus m squared divided to sigma squared.
01:26:330Paolo Guiotto: This is well-defined for X real.
01:34:10Paolo Guiotto: So, the shape of this function…
01:36:840Paolo Guiotto: is the following. This function is symmetric with respect to M, no?
01:43:540Paolo Guiotto: If you take M equals 0, you see that this depends on X.
01:47:400Paolo Guiotto: through X squared, so it's even, no? Respect to the origin, if M is 0. Otherwise, it is symmetric with respect to M. I always draw M at these things as if they are positive, but M is not necessarily positive, can be negative, okay?
02:03:780Paolo Guiotto: And the plot of this is something of this type.
02:15:150Paolo Guiotto: Well, we do not check that this is,
02:19:670Paolo Guiotto: a density. No, we computed this thing many times.
02:25:980Paolo Guiotto: In this case.
02:29:890Paolo Guiotto: it is not possible, at least, let's say, it is not possible to determine the CDF of this thing in an explicit form.
02:41:980Paolo Guiotto: Considering the kind of functions we normally consider as elemental functions, so powers, exponentials, logarithm, and many others.
02:52:290Paolo Guiotto: Actually, this thing is considered itself an elementary function, okay? So, if I do the CDF of this, I should do the integral from minus infringe to X of this capital
03:07:110Paolo Guiotto: F, X, YDY. Now, It could be observed that if I put this into…
03:17:110Paolo Guiotto: The, the density into this integral.
03:21:220Paolo Guiotto: I have this Y minus M squared divided 2 sigma.
03:26:360Paolo Guiotto: Square DY.
03:28:490Paolo Guiotto: Now, there is a standard, this is important to know because you often find this in books, articles, whenever there is a
03:38:250Paolo Guiotto: a Gaussian around. So, there is a standard change of variables first that we do here, which is set T equal Y minus m divided sigma, so assume that sigma is positive. Of course, I write sigma squared, and this will kill the sine, but
04:00:80Paolo Guiotto: Here, you need to specify that it is positive, otherwise you should write the integral
04:08:320Paolo Guiotto: the integration interval in the opposite sense. Now, you see that since Y ranges from minus infinity to X, this t will vary from minus infinity, because sigma is a suitably positive repeat.
04:23:850Paolo Guiotto: 2X minus M over sigma, no? So I have, this is X minus M over sigma.
04:33:810Paolo Guiotto: sigma, which is the root of sigma squared. If sigma squared is the variance, this is the standard deviation, okay?
04:41:770Paolo Guiotto: So integral from minus infinity to this value of, 1 over root of 2 pi sigma squared, E minus… this becomes a T squared over 2.
04:55:40Paolo Guiotto: And when you do the dy, you see that there is a factor, 1 over sigma that comes out, or better, dt is DY over sigma, so DY is the sigma dt. That, in fact, kills this sigma square under the root.
05:12:400Paolo Guiotto: And this formula, minus infinity to X minus m over sigma, of this 1 over root of 2 pi.
05:23:120Paolo Guiotto: E minus T squared over 2 dt. As you see in the inside, there is no more sigma squared.
05:30:300Paolo Guiotto: And in fact, this would be the density of a Gaussian distribution with mean 0 and variance 1. That is called the standard Gaussian. Okay, I'll read it in a second.
05:43:320Paolo Guiotto: So… This function here is written usually with this letter, capital phi.
05:50:220Paolo Guiotto: evaluated at x minus m divided sigma, where the capital phi is this function, capital phi of U, is integral minus infinity to U, E minus T squared over 2 root divided by root of 2 pi.
06:09:510Paolo Guiotto: DT… Well, this is the CDF, as you can see, it's a CDF of
06:17:170Paolo Guiotto: This is the density of a Gaussian variable mean 0 variance 1, of…
06:28:370Paolo Guiotto: Gaussian, so normal distribution means 0 variance 1, which is called the standard distribute standard quotient solids.
06:46:220Paolo Guiotto: Now, the point is that, even if you cannot compute You cannot do any calculations.
06:55:370Paolo Guiotto: express this integer, you could express by using, for example, power series, you use the exponential series, then this becomes an integration of powers, but this is standard with minus infinity, so it's not, possible. Or you cannot basically compute this quantity in a better way than this one.
07:18:490Paolo Guiotto: This is not the real problem. We will have come to recognize such expansion, and…
07:23:820Paolo Guiotto: in, some decades ago, it was plenty of numerical tables of the values of this function at, at the different values of U. So let's say that statistician, for example, used this, or engineers used these, tables to compute the numerical values of this.
07:48:470Paolo Guiotto: Santron.
07:49:450Paolo Guiotto: Let's say that we can also consider this as an elementary function, like an exponential, e to something, or log, you know? In fact, you don't have a formula for E, you need a series, but you don't have a finite formula for E to… for the exponential, or the logarithm, as well as for sine to sine, hyperbolic sine, hyperbolic to sine, do all these functions that we consider elementary functions.
08:14:290Paolo Guiotto: are not elementary, in fact, no? Non-clinical functions.
08:18:620Paolo Guiotto: let's say that most element could be the polynomials, that you have a finite number of operations. You give… you give this to a machine, and this yields a number in a finite number of steps. For these functions, you have always to introduce an approximation, no? Okay? This one is often considered an elementary function, etc, okay? So…
08:43:450Paolo Guiotto: If we have to express a result in terms of this, it's like if you have written E to U, no, it's the same thing.
08:55:340Paolo Guiotto: Well, related to this, there is another important function, which is the error function, but maybe you can read by yourself this. Well, it is,
09:08:850Paolo Guiotto: Worth to mention the fact that
09:11:880Paolo Guiotto: Now, I told that the expect… the values of the parameters mean and sigma squared are respectively the mean and the variance of this viral Y, because it turns out that if you compute the expected value of X, you get M, and if you compute the variance of X, you get exactly sigma squared.
09:32:800Paolo Guiotto: Now, how do we compute this?
09:35:790Paolo Guiotto: So, no, we say that the expected value of X
09:42:350Paolo Guiotto: is, well, we have seen that if we know the law of x, this is the integral of… you remind this formula, we proved that, in general, if I have an integral function, phi of X, this, there is this, which is called change of variable.
10:02:680Paolo Guiotto: Because at left, I am integrating in omega, let's say. The expectation is an integral with respect to the probability, so the space is omega, no? Instead, on this side, I'm integrating with R, so it's like if I'm changing variable.
10:17:690Paolo Guiotto: That's why it is called change of variable formula, even if it is not the change of variable with the Jacobian matrix that you know.
10:24:730Paolo Guiotto: So, this comes out equal to the integral of that function as a numerical function, phi of x, with respect to the law of x. So, this means that this is the integral of X in the mu X.
10:41:10Paolo Guiotto: Now… In general, if we have a density, so we say that the density arises
10:52:790Paolo Guiotto: once we can write the loo of X as some function of X times the Libbag measure, no? This means that nu of X of
11:06:740Paolo Guiotto: Except is the only of FX. As you may understand, exactly as we proved.
11:13:530Paolo Guiotto: this relation here, this formula of chain to value, so we started from indicators, then we extend it to simple functions, then we send them to any function by all X, we can do the same, and we discover, or if you want to informal, imagine that you write here FXX times DX, it turns out that this will be equal to the integral now.
11:38:370Paolo Guiotto: of phi of X times the density, DX.
11:44:560Paolo Guiotto: So that's why the density is, is also interesting, because the system is difficult to calculate, but there are formulas.
11:54:320Paolo Guiotto: to calculate and determine whether we see a particular case when there is not necessary density. But if there is density, this man uses to inordinate with respect to the depth measure of this function.
12:10:490Paolo Guiotto: So this means, in particular, that if I want to compute the mean value here, I need to compute the integral on r of x times the density, so 1 over root of 2 pi sigma squared.
12:25:70Paolo Guiotto: E minus X minus M squared over 2 sigma squared ds. So that's the integral I should compute, no?
12:37:140Paolo Guiotto: Now, here, you can see that…
12:39:770Paolo Guiotto: If, for example, you take this X, you write, this is equal to X minus M to recreate this quantity you have in the exponential. You write like this, then you change variable, put y equal X minus M,
12:59:580Paolo Guiotto: This becomes integral on R, because it's just a translation, so X ranges from minus infinity plus infinity, Y ranges from minus infinity plus infinity. Then you have Y plus M,
13:15:650Paolo Guiotto: times… we can write it in this way, E minus Y squared divided 2 sigma squared. DY, let's put the scaling factor here, 2 pi sigma squared.
13:29:660Paolo Guiotto: So, now we'll split this into two integrals. One is the integral on r of y minus y squared over 2 sigma squared.
13:39:620Paolo Guiotto: DY over the root, etc, etc. Plus, now, this M is a coefficient, it's a constant, you carry outside
13:49:40Paolo Guiotto: And it remains integral on R of the density, E minus y squared over 2 sigma squared divided by root of 2 pi sigma squared dy.
14:03:00Paolo Guiotto: Now, the point is that this first integral is equal to zero, because we have an even order function. This is an even in this order, so the total is an odd function, or a symmetric individual symmetric perspective. The object is integral is zero.
14:22:960Paolo Guiotto: If we want a wire, you can also do the explicit, because this is derivative, so the information can be done, but it's not limited. Well, this one is 1 equals this is the important test, so…
14:35:840Paolo Guiotto: And you get the M.
14:39:250Paolo Guiotto: So, at the end, you get the N. And similarly, if you want to do the variance.
14:44:450Paolo Guiotto: it's a little bit longer, you have to compute the integral on R of… well, let's remind that the variance is, by definition, for example, you say it is the expected value of X minus the expected value of X.
15:04:350Paolo Guiotto: all this squared, and then take the expectation. We discovered that this is M, so we have to compute the expected value of capital X minus M squared.
15:16:70Paolo Guiotto: Now, again, using this formula here, it says you have to compute the expectation on any function of X, it's like if you… it's the same of computing this integral. So where the function phi is now, X minus m squared.
15:33:820Paolo Guiotto: So this is the integral on R of X minus M.
15:41:520Paolo Guiotto: squared E minus X minus N.
15:46:70Paolo Guiotto: Squared over 2 sigma squared, over the scarring factor, 2 pi… sigma squared.
15:54:390Paolo Guiotto: DX
15:57:90Paolo Guiotto: And here, you do a change of variable, you put Y equal X minus m, this becomes the integral on R,
16:06:590Paolo Guiotto: If we want, we can also eliminate the sigma square, because we put divided sigma directly here.
16:14:820Paolo Guiotto: So we… we give, maybe this sigma to this guy here, we put here, we give the sigma inside here, so we see that we have Y squared E minus Y squared over 2,
16:31:90Paolo Guiotto: Then you see that DX, DX is sigma DY, right?
16:40:410Paolo Guiotto: Because dy is dx over sigma, so DX will be sigma dy. So this will be sigma DY over the root of 2 pi.
16:55:160Paolo Guiotto: So there is something wrong here, because it comes in a square.
17:04:80Paolo Guiotto: So where is the mistake?
17:07:950Paolo Guiotto: Yes, of course, because I took this sigma square here, but there is a root, so it comes out… so if I take this sigma square outside, I have 1 over sigma.
17:20:550Paolo Guiotto: When I want to put inside the square, I need to have the square, so I need the square here, and I need to balance multiplying this, so I have sigma. Now it is correct. As you can see, it comes sigma squared times this integral of Y squared E minus Y squared over 2EY.
17:40:100Paolo Guiotto: Of a root of 2 pi.
17:43:780Paolo Guiotto: and this is, easily equal to 1.
17:50:440Paolo Guiotto: you can do by integrating, by parts and thinking, can we do without doing any calculation?
18:15:200Paolo Guiotto: No.
18:16:230Paolo Guiotto: So you do this writing, this as the integral of Y times YE minus Y squared over 2. This thing here is the derivative with respect to Y of minus E minus Y squared over 2.
18:33:80Paolo Guiotto: Because if you do the derivative, you get minus the exponential, then the derivative of the exponent, which is minus 2Y over 2, so minus 1. With the minus class, it's this one.
18:43:810Paolo Guiotto: So, you integrate by parts, and you get that this is equal to sigma squared. We will have the evaluation, y times that exponential minus
18:55:660Paolo Guiotto: E minus Y squared half between minus infinity plus infinity, and of course, this would be a zero, but the exponential would kill everything.
19:05:270Paolo Guiotto: 10 minus integral on R. The derivative now moves on this factor to get 1, and so we have minus E minus Y squared.
19:16:940Paolo Guiotto: over 2DY, and remind that there is also the scaring factor that does not change anything here.
19:25:620Paolo Guiotto: Root of 2 pi, so minus, minus, plus.
19:29:850Paolo Guiotto: This is the standard Gaussian integral, equal to 1, the other is equal to 0, we get sigma squared.
19:37:510Paolo Guiotto: So this is, why this is the variance. You can also compute mean and variance for the exponential
19:49:180Paolo Guiotto: Well, there is a couple of other distributions. I won't do details, because you… you see they are…
20:01:770Paolo Guiotto: practically a little bit boring, but it's good to know. This is the case of karma.
20:10:290Paolo Guiotto: Distribution.
20:14:390Paolo Guiotto: Again, this is defined, assigning a density.
20:19:40Paolo Guiotto: We say that a random variable acts as gamma distribution, there are
20:24:610Paolo Guiotto: Two parameters here, a number alpha and a number lambda.
20:30:90Paolo Guiotto: where… This alpha must be greater than 1, and lambda must be greater than 0.
20:39:460Paolo Guiotto: If the density of this is…
20:44:260Paolo Guiotto: Now, there is a coefficient, C alpha lambda, which is a scaling coefficient, in order to have… this is a probability density, so integral equal to 1.
20:54:950Paolo Guiotto: X to alpha minus 1, e to minus lambda X, indicator of 0 plus infinity.
21:05:840Paolo Guiotto: Excellent.
21:08:630Paolo Guiotto: Well…
21:12:40Paolo Guiotto: C alpha lambda is such that the integral on R of the density FX is equal to 1.
21:22:540Paolo Guiotto: Now, you cannot compute in general this coefficient explicitly, but you can express in terms of the gamma function. The gamma function, it turns out that this coefficient C, alpha lambda, is equal to… what?
21:42:420Paolo Guiotto: is equal to, lambda.
21:47:570Paolo Guiotto: 2 alpha minus 1 divided the gamma function.
21:52:20Paolo Guiotto: Alpha.
21:53:530Paolo Guiotto: Well, gamma function of T is this integral, 0 plus infinity, T, hmm… ER2 minus U…
22:08:500Paolo Guiotto: U to T minus 1, du.
22:15:650Paolo Guiotto: Well, you see that this distribution, for example, if phi is 1, this power goes up here, and you have the exponential distribution.
22:26:440Paolo Guiotto: Gamma of 1 is, as you see, it's just integral of the explanation is 1 to that case.
22:34:660Paolo Guiotto: So it's an extension of the exponential. In this case,
22:45:860Paolo Guiotto: It is, no, you, you cannot… the CDF is, basically, is the gamma function.
22:55:490Paolo Guiotto: So, however, there is some calculation in the notes you can check. Another distribution is the Cauchy.
23:07:50Paolo Guiotto: Distribution.
23:11:40Paolo Guiotto: We say that X is a Cauchier random value, we write C X0one.
23:17:360Paolo Guiotto: Ae?
23:20:400Paolo Guiotto: If the density of X
23:24:690Paolo Guiotto: is, you remind this function is a function we met with the Fourier transform, is this A divided by A squared plus X minus X0,
23:35:990Paolo Guiotto: square.
23:41:120Paolo Guiotto: In this case, you can compute the CDF,
23:44:620Paolo Guiotto: Because it's basically a primitive of this, so you get, yeah, tangent, something like this. An interesting feature of this variable is that for this variable.
23:58:410Paolo Guiotto: the expected value
24:01:100Paolo Guiotto: of X is not defined, because you can check that if you complete the expected value of modulus of X, you get plus infinity. So, they have not expect mean value, and similarly, the variance is
24:15:800Paolo Guiotto: of X is infinite.
24:22:790Paolo Guiotto: Okay, I want to talk about another random variable. Each of these variables, let's say, that has… it's considered to model different type of phenomenon.
24:38:810Paolo Guiotto: For example, in,
24:44:20Paolo Guiotto: Well, let's see. If you look at the… what we have seen, apart for the initial, the constant.
24:51:80Paolo Guiotto: and the Bernoulli, or the uniform. And so the uniform… let's say that the uniform is the model when you don't know anything. We assume that the quantity is distributed as if everything is… has the same probability to happen, depending on just the range of values where you are.
25:14:220Paolo Guiotto: These are used, for example, for the exponentials, for things like waiting times, and,
25:24:130Paolo Guiotto: These, these are positive, for example.
25:27:890Paolo Guiotto: Gaussian are not positive, because they are distributed on the real liner, but these are the most common type of variables we will see.
25:38:810Paolo Guiotto: So we meet in several phenomena, usually used to model noises, things like this. These are variations of the exponential.
25:51:350Paolo Guiotto: because she… I'm not often used because of this feature. For example, an interesting thing is that what is used to model a price in finance, for example? None of these variables is a good model for a price.
26:09:950Paolo Guiotto: you exclude all variables where the value can be negative, because prices cannot be negative. Well, there are exceptional situations in which market prices are negative. For example, if you take… do you remind the day
26:25:110Paolo Guiotto: there was a day during the COVID pandemic, a specific day we did not remember exactly.
26:33:90Paolo Guiotto: the day, it was something like the middle of March of 2021.
26:39:420Paolo Guiotto: when they decided to… to close, there was the lockdown, everything was closed. In one day, the market price of oil, crude oil, went down to minus… we had…
26:54:430Paolo Guiotto: Incredible negative value. What does it mean? It means that they would have paid you to buy the oil, okay? That was just for one day. There was a value of minus $17 per barrel of crude oil. So, this is possible, but it's really extraordinary. Normally, market prices are positive. So, for example.
27:19:400Paolo Guiotto: example, Goshen are not a good, tool to model prices, Cauchy distribution. These are positive, the exponential, but…
27:33:720Paolo Guiotto: You see that the exponential, for example, is not good, because you see the CDF, it says…
27:45:50Paolo Guiotto: the… this… the density. This says that,
27:51:230Paolo Guiotto: It's a distribution that says that, that, that,
27:56:240Paolo Guiotto: It's more likely for the low being the low value here, than high value.
28:02:570Paolo Guiotto: So, normally, for a price, we will have something like a mid value, and it is more likely that the value is around that mid value, and unlikely to be far. The distribution, the tail of the distribution, should be something like the Gaussian, but positive. Now, the most popular
28:23:690Paolo Guiotto: type of random variable used is this class.
28:28:220Paolo Guiotto: Which is called the log normal.
28:35:260Paolo Guiotto: random variable. Now, we say that it is, X is log normal, is log… Normal.
28:47:310Paolo Guiotto: as the name suggests, if the logarithm of X is a normal, is a Gaussian, or if X is the exponential of a Gaussian, okay? If…
29:00:690Paolo Guiotto: We can say X is E to Y, where Y is a Gaussian distribution with some mean and some average.
29:10:550Paolo Guiotto: The fact that you have this, imagine you have your Y, which is something, the exponent, that can have a distribution spread along the real line with min. If you now take the exponential of this, what happens?
29:28:880Paolo Guiotto: Well, first of all, you will see always positive value, because E to Y is positive, so you don't see anything for Y negative, so you may imagine that distribution… the density is zero, just for Y negative. And for Y positive, it's like if you have the quotient distribution shrinks a bit.
29:49:420Paolo Guiotto: Executive.
29:50:370Paolo Guiotto: It's not symmetric, like the Gaussian.
29:54:270Paolo Guiotto: But in this case, we have a density. Let's see how to compute this density, because this is an interesting problem. So…
30:06:310Paolo Guiotto: We know that F of Y is a certain density, E minus y minus m squared divided to sigma squared over root of 2 pi sigma squared.
30:21:690Paolo Guiotto: Now, we know that the variable X is E2Y.
30:27:260Paolo Guiotto: The question is, is X absolutely continuous? And if yes.
30:35:680Paolo Guiotto: what is the density of FX?
30:40:270Paolo Guiotto: So you know that this is a general question, no? General… problem.
30:48:760Paolo Guiotto: I know that, why… is absolutely continuous, so there is density for Y.
30:57:300Paolo Guiotto: And they define X as a certain function of Y. Don't say phi of Y.
31:06:660Paolo Guiotto: So, the question is, what can be said about the density of X, where is the density.
31:13:730Paolo Guiotto: under which conditions forfeit there is this density. Well, we can informally understand what is the solution, the answer to this, and then we can formalize into a statement. Because to compute the density.
31:28:320Paolo Guiotto: So the density, if there is a density, if FX… exists.
31:38:400Paolo Guiotto: We remind that FX does this. Mu X of E will be equal to the integral on e of this density FX of X, say, in the X.
31:51:640Paolo Guiotto: Right? This is the definition of what is the density.
31:55:210Paolo Guiotto: This would be the probability that X belongs to the set E.
32:00:680Paolo Guiotto: And X is equal to phi of Y.
32:05:260Paolo Guiotto: So, we will say phi of Y belongs to ill.
32:11:470Paolo Guiotto: Now, as you can see, this is going to be something like how I'm thinking that Y belongs to something. So, to an explicit Y, I need to invert this phi, so I need to know that this phi is at least invertible. So assume that phi
32:26:520Paolo Guiotto: is… invertible.
32:32:890Paolo Guiotto: This is the case for the exponential of Gaussian we are considering here. So, in the… Example…
32:43:10Paolo Guiotto: This is probability that E to Y belongs to E, right?
32:48:900Paolo Guiotto: Now, since E to Y is positive, the set must be contained in positive numbers, because if it is contained in negative numbers, there is no answer here, it's empty.
33:02:980Paolo Guiotto: And this would mean something like you take logarithm, both sides, you get Y belongs in the log of E. Log of E is the set of logarithms of numbers in E. So this is what I should have. And this is now the probability that Y belongs to something, so it is related to muy, the low Y,
33:25:580Paolo Guiotto: and therefore to the density. So now, this, in general, is the probability that Y belongs to P minus 1 of E,
33:36:440Paolo Guiotto: And this is the law of Y on the set phi minus 1E.
33:42:900Paolo Guiotto: This guy is an integral, because we have a density, this is the integral on the set phi minus 1E of F, Y, Y, DY.
33:57:100Paolo Guiotto: So…
33:59:660Paolo Guiotto: To have a density, we must have fx such that the integral of FX is the integral on phi minus 1 of phi of FY.
34:10:150Paolo Guiotto: So… X. Haas.
34:14:310Paolo Guiotto: density.
34:19:150Paolo Guiotto: F, X. If and only if…
34:22:660Paolo Guiotto: the integral on E of the density FX,
34:28:570Paolo Guiotto: is the integral on phi minus 1 of E, of FY… DUI.
34:36:680Paolo Guiotto: No.
34:37:970Paolo Guiotto: Of course, I don't know if there exists an FX, but I know that if FX is…
34:45:530Paolo Guiotto: This identity must be true. Now, we see that you have left integration in X, a derived integration in Y, and the relation between Y and X is that X is phi of Y, or Y is phi minus 1,
35:03:330Paolo Guiotto: of X. So now this, sounds like a change of variable. So if we take this integral, and we change variables, so we set X equal phi of Y,
35:14:860Paolo Guiotto: What happens?
35:16:770Paolo Guiotto: Now, forget of this, and apply the change of variable.
35:20:990Paolo Guiotto: So, since Y belongs into phi minus 1 of E, it means that X equals phi of Y belongs to E. So, we are integrating on E. What? The function, which is FY, in the variable Y. But Y is related to X by this change variable, so I can see here Y is a phi minus 1 of X, so I have to
35:44:130Paolo Guiotto: write phi minus 1 of X here.
35:47:910Paolo Guiotto: times, you know that when I change variable into an integral, now this is not the change of variable I was talking about, this is the classical change of variable. When I change a variable, there is the derivative of the change of variable.
35:58:930Paolo Guiotto: If you want to write the formula with the set, this will be the modules of the derivative of the function that gives y in terms of x, so the phi minus 1 prime of X.
36:12:380Paolo Guiotto: DX.
36:13:750Paolo Guiotto: So you have that. This integral here is the integral on any of these factors.
36:22:440Paolo Guiotto: And if there is a density, this integral is the integrity of the density, so it means that this function here is the density of X of X if X is that phi of Y. So we have this formula, that the density of X
36:41:240Paolo Guiotto: is the density of Y, Evaluated in phi minus 1 of X.
36:48:20Paolo Guiotto: times the modulus of phi minus 1, of X prime, of X.
36:54:570Paolo Guiotto: And this is the formula for the change of density when X is phi of Y.
37:04:680Paolo Guiotto: just a second, let's see the application to the Goshen, and we close. So…
37:11:480Paolo Guiotto: If my X is E to Y,
37:16:210Paolo Guiotto: And the FY, the density of the Y, is the Gaussian, so E minus Y minus M squared divided 2 sigma
37:30:100Paolo Guiotto: 2 sigma squared over root of 2 pi sigma squared.
37:35:150Paolo Guiotto: So, you see that the function phi of Y is the exponential.
37:40:480Paolo Guiotto: So the ingredients I need are this one, the function phi minus 1, and its derivative.
37:47:890Paolo Guiotto: What is phi minus 1? If x is e to y, and this is the phi of Y, the fee minus 1 is the inverse function, means that Y is log of X, this is the females 1 of X,
38:03:880Paolo Guiotto: And the derivative of phi minus 1
38:07:160Paolo Guiotto: is the derivative of log, which is 1 over X.
38:11:140Paolo Guiotto: So I get this. The density of X in the variable X is… the density of Y
38:18:930Paolo Guiotto: So, I put… 1 over root of 2 pi sigma squared.
38:25:460Paolo Guiotto: Here, I don't have to change anything. E minus, so down here, 2 sigma squared. Instead of Y, I put log of X.
38:34:540Paolo Guiotto: Because I have to put T minus 1 of X, no? So this is log of X minus M squared
38:46:330Paolo Guiotto: And then there is the absolute value of defi minus 1 prime, which is 1 over X, so 1 over modules of X.
38:57:740Paolo Guiotto: This for X positive, because log X is defined for X positive.
39:03:740Paolo Guiotto: So, in fact, at the end.
39:06:570Paolo Guiotto: I don't need the modules here. So I have that if X is E to normal, min m variance sigma squared, the density of X
39:21:830Paolo Guiotto: is this one. 1 over… root of 2 pi sigma squared. Normally, this X is written inside X squared.
39:34:450Paolo Guiotto: E minus log of X minus M squared divided to sigma squared.
39:42:720Paolo Guiotto: For X positive. For X negative, it is 0.
39:51:140Paolo Guiotto: And this is the density of the log-normal distribution.
39:58:400Paolo Guiotto: Okay.
40:00:550Paolo Guiotto: We stop here, I will try to publish
40:05:240Paolo Guiotto: If it is not yet complete, I will publish, 3 quarter…
40:11:290Paolo Guiotto: of the notes for the second part this afternoon, and I will, I will, start giving you some exercise to do with reference to these notes. But I will… I will write as soon as I will publish the notes.
40:29:820Paolo Guiotto: Okay.