Class 13, Dec 15, 2025
AI Assistant
Transcript
00:01:450Paolo Guiotto: Okay, good morning.
00:05:300Paolo Guiotto: So, I want to start finishing the exercise we started the last one.
00:10:600Paolo Guiotto: So, let's quickly review. We have the two random variables, X and Y, both normal, respectively, with VIN M and 0, and same variance.
00:21:620Paolo Guiotto: sigma squared, and the problem asks to determine the conditional expectation of X plus Y.
00:28:100Paolo Guiotto: given X, that means given the sigma algebra generated by X.
00:34:20Paolo Guiotto: And the conditional expectation of X given X plus Y. The first one was easy, the second one is less easy, because this is a new random variable.
00:49:880Paolo Guiotto: And, so there is no way to solve this with the simple tricks we did in the first case.
00:57:390Paolo Guiotto: So what we did is, to apply the, conditional density formula.
01:03:970Paolo Guiotto: That tells that if we want to compute the conditional expectation of a random variable given other random variable, so X given Y here, this is a function of Y.
01:16:140Paolo Guiotto: And it's a numerical function of capital Y, where this numerical function is the mean value of X with respect to this function, which is called the conditional density.
01:29:40Paolo Guiotto: Which is basically the ratio of the joint density of the two random variables divided by the density of the random variable respect to what we are conditioning.
01:38:950Paolo Guiotto: So, we are now going to compute this. So, to compute this, we need the first to compute the joint density of the pair, which is.
01:47:970Audio shared by Paolo Guiotto: here.
01:48:370Paolo Guiotto: X, and the second variable is X plus Y. So this is, of course, a function of XY, and since we have that XY are supposed to be independent, so we have the two densities, we know automatically that the characterization of independence
02:07:800Paolo Guiotto: In this case, is that the joint density is the product of the marginal densities.
02:17:970Paolo Guiotto: So, we, used this, simple linear, transformation of X and Y.
02:27:540Paolo Guiotto: to determine the joint density of XX plus Y. At the end, we obtained…
02:33:890Paolo Guiotto: this formula, FXX plus Y, let's say ZW is the product, FXZFYZ minus W.
02:43:690Paolo Guiotto: Now, to get the,
02:48:510Paolo Guiotto: We need also the other ingredient is the density of the variable respect to what we are conditioned, which is X plus Y here.
02:58:370Paolo Guiotto: Now, this can be obtained by the joint density integrating in, say, the other variable, so by doing the integral of the joint density with respect to the first variable.
03:11:360Paolo Guiotto: And this yields the density of the second variable of this pair.
03:17:680Paolo Guiotto: But this is, because of that formula, the convolution of these two functions, FX, FY. So, to compute that convolution, since both FX and FY are Gaussian, we used the properties of Fourier transform, because we said
03:36:340Paolo Guiotto: If we do the Fourier transform, the traditional L1 Fourier transform, this turns out to be the product of the Fourier transform. So this was the first step. So, let's work out the details here. So we do the FX, FY,
03:53:00Paolo Guiotto: We do D hat, let's say, let's call it, see the variable. This is FX hat at point C times FY hat at point C. Now, we know that
04:06:150Paolo Guiotto: the two, effects, FY about caution with different means, but, this means that, for the Fourier transform.
04:19:00Paolo Guiotto: Of FX, so FX is, say, this one is 1 over square root of 2 pi sigma square, E minus 1 half
04:31:470Paolo Guiotto: There was a mean here, X minus m squared divided sigma squared, or if you want to, sigma squared. And the Fourier transform of this.
04:43:400Paolo Guiotto: Well, if you do not remind, it doesn't matter. Well, because there is a translation, there is a multiplication by a factor.
04:52:590Paolo Guiotto: EIXCM. Then there is the freedom form of the Gaussian centroid at M equals 0, which is e to minus 1 half sigma squared c squared.
05:06:60Paolo Guiotto: So this is the FX, and similarly, FY hat C.
05:11:270Paolo Guiotto: is equal… there is no mean, so it's just E minus…
05:16:540Paolo Guiotto: 1 half sigma square C squared. Well, let's say that this,
05:22:550Paolo Guiotto: Yeah, sigma squared, C squared.
05:26:640Paolo Guiotto: So, the, Fourier transform of the convolution FXFY at point C.
05:34:710Paolo Guiotto: It is the product of these two functions, so E, I, C, M.
05:39:920Paolo Guiotto: And you see that we have the same exponential, so this is sigma squared Xi squared at the end.
05:48:120Paolo Guiotto: And this is more or less the Fourier transform of a Gaussian.
05:53:280Paolo Guiotto: The unique point is that we do not have the factor 1 half here, but we can create, so we put 1 half and two.
06:00:310Paolo Guiotto: And now, this is exactly as the first formula.
06:06:00Paolo Guiotto: where the mean remain M, and the covariance, the sigma square, the variance, is replaced by 2 sigma squares. So this is the hat.
06:17:190Paolo Guiotto: of 1 over root of 2 pi. I say this is replaced by 2 sigma squared, so 2 sigma squared here, E minus 1 over 2 times 2 sigma squared, if you want, the variable minus m squared.
06:36:830Paolo Guiotto: And this is the hat of the convolution, and since the Fourier transform is injective, so injectivity…
06:52:380Paolo Guiotto: Pouli etants perform.
06:54:900Paolo Guiotto: We have that, FX star FY, now let's say, at point…
07:02:160Paolo Guiotto: I don't know what is the letter we used.
07:07:940Paolo Guiotto: W, this was the letter.
07:10:790Paolo Guiotto: This is, at the end, the density of X plus Y, so this is…
07:16:340Paolo Guiotto: Let's remind that this is F of X plus Y.
07:20:600Paolo Guiotto: W.
07:22:870Paolo Guiotto: It is equal to… This function, 1 over root of 4 pi, sigma square.
07:31:100Paolo Guiotto: E minus, say, W minus M squared divided 4 sigma squared.
07:39:760Paolo Guiotto: That's the density of X plus dub.
07:42:660Paolo Guiotto: Now, we have all the ingredients to…
07:45:900Paolo Guiotto: We have the joint density, XX plus Y, and the density of X plus Y. So we can say that the conditional expectation
07:56:900Paolo Guiotto: of X given X plus Y, let's say that this quantity is equal to W,
08:03:780Paolo Guiotto: is this function phi of W.
08:07:140Paolo Guiotto: where phi of W… is… the integral of X,
08:15:680Paolo Guiotto: With respect to the conditional density, X given X plus Y, say, X given W.
08:24:370Paolo Guiotto: PC in DX.
08:27:420Paolo Guiotto: Now, this is, the integral of…
08:32:890Paolo Guiotto: what? So, the joint density, by definition of this conditional density, this is the joint density between X and X plus Y,
08:41:390Paolo Guiotto: at point XW divided F, X plus Y W.
08:50:760Paolo Guiotto: DX.
08:54:650Paolo Guiotto: So, we have just to…
08:58:910Paolo Guiotto: Now, plug these quantities. So, the joint density… the joint density was computed We did the,
09:11:660Paolo Guiotto: Last time. It is this one.
09:16:670Paolo Guiotto: Mmm… So, we have,
09:25:40Paolo Guiotto: This is written at ZW, so we should restore letter X here, X, X, X, W minus X. So we have…
09:37:00Paolo Guiotto: Fxx. Let's write first this FYW minus X divided by the FX plus Y W.
10:00:930Paolo Guiotto: And… Yes.
10:06:410Paolo Guiotto: Now, this is something which is a constant we can write outside, but perhaps it is better if we keep inside. Well, let's see what happens. It is integral.
10:18:980Paolo Guiotto: of X, so the FX is, the Gaussian, 1 over…
10:24:20Paolo Guiotto: root of 2 pi sigma square E minus
10:29:980Paolo Guiotto: X minus M squared over 2 sigma squared.
10:35:450Paolo Guiotto: FY is the same thing, but it means zero, so we have this.
10:42:430Paolo Guiotto: So E minus, that will be this argument squared, so W minus X squared.
10:50:360Paolo Guiotto: Divided to sigma square.
10:52:980Paolo Guiotto: And all this is divided by…
10:55:720Paolo Guiotto: 1 over root of 4 pi sigma squared, E minus X minus… W, sorry.
11:07:840Paolo Guiotto: W minus M squared divided for sigma squared.
11:15:00Paolo Guiotto: the X of…
11:23:670Paolo Guiotto: Okay, so… I think we have to…
11:32:850Paolo Guiotto: To do the calculations, in the,
11:37:500Paolo Guiotto: exponentials… well, I don't… I don't think we need… we will need this exponential out here, so let's put outside.
11:45:780Paolo Guiotto: For a moment, maybe… So EW minus M squared divided 4 sigma squared.
11:55:180Paolo Guiotto: Let's see if we have to… let's take out one of these factors. So we have a root of… well, let's write it this way… root of 4 pi…
12:10:940Paolo Guiotto: Sigma squared divided the root of 2 pi sigma squared.
12:15:870Paolo Guiotto: So this console is this, so it remains root of 2.
12:21:740Paolo Guiotto: PR.
12:24:250Paolo Guiotto: And then we have this integral, integral on R of X.
12:31:60Paolo Guiotto: So let's put the scaling factor down here, root of 2 pi sigma squared.
12:37:340Paolo Guiotto: And when we do the sum of the two exponentials.
12:45:910Paolo Guiotto: Yeah.
12:47:130Paolo Guiotto: we get E minus… 2 sigma square.
12:56:940Paolo Guiotto: And we have to work a bit with the calculations, so we do the square. Here, we get X square.
13:12:250Paolo Guiotto: So we have to transform this into S squared to use the Gaussian integral, in a way, or in another…
13:18:800Paolo Guiotto: So plus M squared minus 2MX, then you have another plus X squared plus W squared minus 2WX…
13:33:00Paolo Guiotto: So we, have, 2X square.
13:38:610Paolo Guiotto: What is convenient to do? There is,
13:44:450Paolo Guiotto: So we have to recombine this into a, Square.
13:51:400Paolo Guiotto: Here we have minus 2M plus WX.
13:59:340Paolo Guiotto: So… Either we divide by 2, then there is another plus M squared plus W squared.
14:08:500Paolo Guiotto: If we divide by 2, we put the divided 2 here, so we eliminate this.
14:15:860Paolo Guiotto: And then there is another way, you'll see this as a double product in this way. So when you combine.
14:23:160Paolo Guiotto: We have root of 2EW minus M…
14:28:260Paolo Guiotto: Square of a sigma square integral on R of X.
14:34:150Paolo Guiotto: Exponential minus the denominator is sigma squared.
14:39:900Paolo Guiotto: Then we have X squared minus 2X times W plus M over 2, so this comes from doing the square of X minus M plus W divided 2 squared.
14:53:660Paolo Guiotto: That's the double product, so we should have… A square of this.
15:01:70Paolo Guiotto: So we do not have… we have to subtract M plus W.
15:05:800Paolo Guiotto: divided 2 square, and then there is also this guy, plus M square, W squared, divided 2.
15:16:820Paolo Guiotto: All this, indeed.
15:18:690Paolo Guiotto: numerator of this fraction, then we have the dx divided by scaling factor root of 2 pi sigma squared.
15:29:40Paolo Guiotto: We don't need that, so we don't need, probably, the root of 2 here.
15:34:510Paolo Guiotto: Because this has been…
15:36:590Paolo Guiotto: is not 2 sigma squared, but it's just sigma squared. So we separate this, we carry this outside, we have E2W minus M,
15:48:320Paolo Guiotto: square… well, let's see, but let's put all the terms together. Divided sigma squared, then we have minus W plus M over 2.
16:01:180Paolo Guiotto: Sigma at square, plus…
16:04:990Paolo Guiotto: W squared plus m square over 2. So there is something here. Then we have an integral on R of X times E to minus X minus the mean m plus w over 2.
16:22:620Paolo Guiotto: Square divided sigma square.
16:26:60Paolo Guiotto: DX over root of, pi… Sigma square.
16:42:160Paolo Guiotto: To do all this calculation.
16:46:570Paolo Guiotto: So, what is it?
16:48:350Paolo Guiotto: It is W square… plus M squared minus 2MW. Maybe there is a better way to do this calculation.
16:58:640Paolo Guiotto: However, W squared plus M squared plus 2MW divided with Sue…
17:06:760Paolo Guiotto: plus W squared plus M squared divided 2.
17:12:89Paolo Guiotto: So we have W squared minus plus, so this is canceled by this.
17:19:530Paolo Guiotto: Then we have M square… The same here for the squares.
17:25:790Paolo Guiotto: Then we have, so minus 2MW minus another MW, so minus 3MW. So at the end, out here, we have E.
17:37:60Paolo Guiotto: W squared plus M squared minus 3MW.
17:43:330Paolo Guiotto: Seems. Divided sigma square… And then about this integral.
17:57:790Paolo Guiotto: We could do a change of variable, set U equal X minus that average XM plus W over 2.
18:08:100Paolo Guiotto: So this becomes the integral on, U plus M plus W divided 2.
18:16:100Paolo Guiotto: E minus U squared over sigma squared, the
18:21:90Paolo Guiotto: U divide the root of pi sigma square.
18:26:790Paolo Guiotto: Now, the integral U exponential u squared is zero. The integral UE minus u squared over sigma squared du, this is zero, because of the symmetry. This is odd.
18:42:600Paolo Guiotto: And so it remains that M plus W over 2, that multiplies everything.
18:50:560Paolo Guiotto: exponential W squared plus M squared minus 3.
18:58:220Paolo Guiotto: W over sigma squared.
19:06:00Paolo Guiotto: Yes?
19:07:310Paolo Guiotto: And then, the integral on R, E2U minus u squared over sigma squared du
19:15:800Paolo Guiotto: over root of pi sigma squared. Now, this is More or less…
19:23:40Paolo Guiotto: a Gaussian integral, so we have to reintroduce de facto. I want to make the 2 here.
19:31:320Paolo Guiotto: So we put a 2 here, 2 here, so it goes inside as a root of 2, so if we, change the variable here, and put the root of 2U equals V, it becomes the integral in R.
19:46:780Paolo Guiotto: of E minus V squared over 2 sigma square.
19:51:320Paolo Guiotto: Now, the U is 1 over root of 2, so this goes perfectly into this root of 2 pi sigma squared, and this is the standard Bausian integral, which is equal to 1.
20:03:640Paolo Guiotto: So at the end, we get this M plus W divided 2.
20:09:790Paolo Guiotto: E to W squared plus M squared minus 3MW Over sigma squared.
20:19:860Paolo Guiotto: Now, this is what? This is the function phi of W that represents the conditional expectation of X, even X plus Y, when X plus Y is W.
20:35:490Paolo Guiotto: So, this means that if you want the conditional expectation of X given X plus Y,
20:42:920Paolo Guiotto: as a random variable, this is that function phi, where in place of W, you put X plus Y.
20:52:870Paolo Guiotto: And so, it comes, equal, M… plus… X plus Y.
21:01:140Paolo Guiotto: over 2.
21:03:120Paolo Guiotto: Oh, that's strange.
21:04:710Paolo Guiotto: There's something that… That sucks.
21:09:600Paolo Guiotto: That is not correct here.
21:12:410Paolo Guiotto: that exponential… is something,
21:18:680Paolo Guiotto: Because it comes… it's very in nonlinear function of W. Well, let's check a second…
21:26:30Paolo Guiotto: If we have done properly the calculations, So… Here…
21:32:420Paolo Guiotto: We took the joint density, FX plus Y, we computed This joint density here.
21:42:450Paolo Guiotto: So this was FX… Of X, F… YW minus X.
21:54:20Paolo Guiotto: Yeah.
21:56:680Paolo Guiotto: So we replaced it here.
22:04:740Paolo Guiotto: FY is centered at zero, so this is correct.
22:10:850Paolo Guiotto: divided the FX plus Y… well, it is here where it comes, that exponential.
22:16:450Paolo Guiotto: X plus Y… We computed, and it is this one.
22:25:170Paolo Guiotto: One of our router for… Yeah, that's correct.
22:32:320Paolo Guiotto: Okay, now… So, everything is, correct.
22:38:340Paolo Guiotto: So we did… I… I took this outside, and then I developed all that exponential. So we have X squared plus M squared minus MX, yes. Then we have W squared plus X squared plus minus…
22:55:820Paolo Guiotto: 2… WX, okay?
23:00:880Paolo Guiotto: So we, well, we divided by 2,
23:07:860Paolo Guiotto: Yeah, I divided by 2, but…
23:17:970Paolo Guiotto: So when I divided by 2, I add the 2W, but then I restored the 2.
23:24:30Paolo Guiotto: Inside, then there is this W square plus M squared.
23:30:00Paolo Guiotto: Why it is divided by 2?
23:35:680Paolo Guiotto: Yeah, I divided by 2 because I factorized the 2, so this here, it is here, it is correct.
23:42:370Paolo Guiotto: So we have now X minus M plus W divided 2 squared, which is the… this comes out from this
23:53:900Paolo Guiotto: This is the double product.
23:59:440Paolo Guiotto: And therefore, this plus the square of M plus W over 2 minus, because I do not have this.
24:08:460Paolo Guiotto: So I have this.
24:12:210Paolo Guiotto: So in this way, I use these two terms.
24:17:800Paolo Guiotto: Yes.
24:20:50Paolo Guiotto: And so I have this minus this plus this. It seems correct. So when I carry outside.
24:27:80Paolo Guiotto: I have, the term in the denominator that comes
24:33:250Paolo Guiotto: as the numerator, EW minus M squared divided 4 sigma squared.
24:41:270Paolo Guiotto: Shit.
24:44:210Paolo Guiotto: I do not.
24:46:580Paolo Guiotto: I forgot to put a 4 here.
24:50:390Paolo Guiotto: So, when I put a 4, since the other two come with, if you want.
24:57:690Paolo Guiotto: Well, let's… they come with sigma squared.
25:02:860Paolo Guiotto: So I have to just put the writing for here and here, if I'm not wrong.
25:09:720Paolo Guiotto: Because they come with their military probe nois.
25:12:710Paolo Guiotto: So when we do this expansion, so we have to redo this… This comes… Let's see if…
25:24:330Paolo Guiotto: You get better.
25:25:890Paolo Guiotto: So, W squared… plus M squared minus 2MW.
25:33:320Paolo Guiotto: Then when we do the square of this, this 4 simplifies with the 2.
25:38:460Paolo Guiotto: Inside, so we have just the square of W plus M, so W squared plus M squared plus 2MW.
25:48:640Paolo Guiotto: Here, we remain with plus 2M squared plus W squared.
25:56:330Paolo Guiotto: Now, let's simplify. We have W squared.
26:00:860Paolo Guiotto: minus W squared plus W squared, so this cancels this, it remains 2W square.
26:10:420Paolo Guiotto: And we have M squared minus M squared, same story.
26:15:450Paolo Guiotto: So, plus 2M squared.
26:18:560Paolo Guiotto: Hmm.
26:19:800Paolo Guiotto: But they should simplify.
26:23:950Paolo Guiotto: Now, we have this is… ano. This is minus… 4… MW.
26:34:90Paolo Guiotto: So this is, at the end, it is equal to E,
26:39:110Paolo Guiotto: when I factorize the 2, so 2…
26:44:50Paolo Guiotto: M plus W squared over sigma squared. Is that the…
26:53:310Paolo Guiotto: Now, this is never simplified, but this is not correct.
26:57:260Paolo Guiotto: There is still some error.
27:00:850Paolo Guiotto: Well, the point is that there shouldn't be this exponential. This is the problem, okay? This smells strange, because…
27:09:620Paolo Guiotto: I'm doing linear transformation, it should come something linear at the end. Okay, this is my problem. But probably,
27:17:770Paolo Guiotto: I've done… some, so, I found a mistake there.
27:26:900Paolo Guiotto: There is something else.
27:34:180Paolo Guiotto: So the 4 is correct.
27:40:130Paolo Guiotto: Why do I do have it?
27:48:90Paolo Guiotto: Yeah, the calculation is done a little bit differently, but… At the end, it's,
27:57:920Paolo Guiotto: Shield accountable.
27:59:770Paolo Guiotto: One sec…
28:29:860Paolo Guiotto: It should come, it should come without any exponential there. It should come zero, that quantity, but I don't see…
28:39:70Paolo Guiotto: Why this is non-zero.
28:52:530Paolo Guiotto: you see that we have also… there is an error… we have a minus here, and a minus here plus here. So when we put together this with this outside.
29:03:380Paolo Guiotto: The sign in front of this term is not minus, but it is plus, because it is minus, minus.
29:10:240Paolo Guiotto: And the sign in front of this becomes minus… Because it is minus plus.
29:17:440Paolo Guiotto: So, redoing once more this calculation, this is now a plus.
29:23:500Paolo Guiotto: This is a plus, and this is a minus.
29:28:540Paolo Guiotto: Now, if we have this, we see that we have W squared plus W squared minus 2W squared, this goes away, so there is no W squared here.
29:40:620Paolo Guiotto: Then we have the same for M squared. M squared plus another M squared minus 2M squared, and this cancels also this factor. Then we have minus 2MW plus 2MW, and also this cancels, no?
29:57:970Paolo Guiotto: So we have this kills this, so we have zero at the end.
30:03:360Paolo Guiotto: So at the end, this is E to 0 divided sigma squared, so there is no exponentials, finally.
30:11:920Paolo Guiotto: We found, so there is no exponential here, this was wrong, already wrong.
30:18:160Paolo Guiotto: So there is not this exponential here.
30:21:430Paolo Guiotto: And therefore, M plus W over 2 is the function phi of W. This means that if you want the conditional expectation of X given X plus Y is the function phi as function of X plus Y. So this is the value of the conditional expectation.
30:38:340Paolo Guiotto: of X given X plus Y.
30:42:540Paolo Guiotto: I'm sorry for the mess.
30:47:640Paolo Guiotto: Okay, so, let's, shift on the new…
30:55:590Paolo Guiotto: Let's do some other exercise. So, 7, 3, 1, still on the same application of the same form.
31:05:310Paolo Guiotto: So, computer… The goal is compute…
31:10:430Paolo Guiotto: the conditional expectation of X, not Y given X,
31:20:310Paolo Guiotto: in the following cases. One…
31:28:100Paolo Guiotto: So, the exercise gives the joint distribution of X and Y.
31:36:230Paolo Guiotto: In this first case, it is equal to lambda square E minus lambda Y indicator, Zero.
31:46:650Paolo Guiotto: Y of X.
31:51:340Paolo Guiotto: Well, let's first check that this is really a, a probability density.
31:59:840Paolo Guiotto: Where's… Check.
32:04:980Paolo Guiotto: That's… F, X, Y… is, probabilities.
32:13:280Paolo Guiotto: density.
32:17:60Paolo Guiotto: We notice that there are two conditions to be verified. The first one is that this quantity be always greater or equal than zero, and this is evident for every XY.
32:30:970Paolo Guiotto: Actually, it should be for almost every…
32:33:950Paolo Guiotto: XY. And second, that the integral on F2 of the function FXY Should be equal to 1.
32:45:210Paolo Guiotto: This one, is the integral on R2.
32:50:260Paolo Guiotto: Of, we said lambda square.
32:53:610Paolo Guiotto: E minus lambda Y indicator 0.
32:58:840Paolo Guiotto: Why?
33:00:470Paolo Guiotto: of X.
33:04:120Paolo Guiotto: DXDY.
33:10:660Paolo Guiotto: Now, we use the reduction formula, since this says that X is between 0 and Y.
33:25:00Paolo Guiotto: But since this path depends on Y, I would prefer to look this as a condition on Y instead than a condition of X. Because if I apply the reduction formula, I have to do the double integration. I have to decide
33:40:240Paolo Guiotto: If to integrate first in X, and then in Y, or vice versa. Now, if we decide to integrate first in X, this would be the integral, lambda square E minus lambda y, dx, DY.
33:59:830Paolo Guiotto: And for X, I would have the range 0 to Y, and 4Y from 0 to plus infinity.
34:08:580Paolo Guiotto: or vice versa, I could also write the other integration, lambda square E minus lambda Y, first in Y, then in X.
34:17:960Paolo Guiotto: In the case I start integrating in Y, the range is
34:22:610Paolo Guiotto: Y must be greater than X, no? So, if you look at this point for Y, this says that Y is between X and plus infinity, and for X, you have just X greater or equal than 0. You cannot write X less than Y, because Y is, in this case, is the first integration variable.
34:42:330Paolo Guiotto: So, these are the two integrals. At the end, it seems they are… equivalent, so…
34:49:429Paolo Guiotto: we can decide to continue with the first one. So integral 0 plus infinity, now this is a constant for this integration, so lambda squared E minus lambda y.
34:59:930Paolo Guiotto: Integral 0 to y of 1 dx dy.
35:04:820Paolo Guiotto: This integral is equal to Y, so we have to integrate 02 plus infinity lambda squared YE minus lambda YDY.
35:19:110Paolo Guiotto: This can be computed by parts. So we look at this as a derivative, in such a way that when derivative moves on Y, we
35:29:520Paolo Guiotto: we eliminate the variable. The derivative with respect to Y of E minus lambda y is minus lambda E minus lambda y. So if we take a lambda here.
35:42:310Paolo Guiotto: So let's just rewrite this in this way. So we put the lambda outside Y lambda here, and even a minus, in such a way that this be… now, this derivative, by parts, this is minus lambda. Then we have Y times E minus lambda y.
36:02:110Paolo Guiotto: Evaluation between 0 and plus infinity.
36:06:150Paolo Guiotto: There is something missing in the problem, but it's implicit, which is lambda positive, otherwise this value
36:13:770Paolo Guiotto: This function wouldn't even be integral.
36:17:330Paolo Guiotto: So, let's add this at the beginning. Lambda here is assumed to be a positive parameter.
36:26:600Paolo Guiotto: So minus integral 0 to plus infinity. When the derivative moves on this factor, we get 1.
36:35:330Paolo Guiotto: So, we have, minus lambda E minus lambda YD.
36:42:740Paolo Guiotto: Why?
36:44:360Paolo Guiotto: About the evaluation, this gives 0, because at plus infinity, the exponential kills the power. At zero, the power kills the exponential, so it remains just plus lambda integral 0 to plus infinity E minus lambda. Why?
37:02:230Paolo Guiotto: Well, again, we could… we could leave this in the previous form, it is better, because here we have that this is the derivative with respect to Y of E minus lambda y.
37:16:790Paolo Guiotto: No, sorry.
37:21:260Paolo Guiotto: Yeah.
37:22:180Paolo Guiotto: No, correct.
37:24:160Paolo Guiotto: No, it is… there is not this lambda here, sorry.
37:31:40Paolo Guiotto: This lumber is not there.
37:34:20Paolo Guiotto: Because it is the derivative, so we multiply that, and that's… Okay, so,
37:40:940Paolo Guiotto: We have to do something here, so at the end, it is, Minus lambda…
37:50:220Paolo Guiotto: minus, minus, plus lambda integral 0 plus infinity of E minus lambda y dy.
37:57:380Paolo Guiotto: So now we give the lambda here, we put the minus in and out.
38:02:70Paolo Guiotto: And this is my evaluation of T minus lambda y between y equals 0, y equals plus infinity. At plus infinity, we get 0, minus at 0, we get 1.
38:15:10Paolo Guiotto: So the value is minus 1 times minus 1 is plus 1.
38:20:170Paolo Guiotto: So… This, this shows that this function is really a probability desk. Okay.
38:29:310Paolo Guiotto: Now… To compute, to compute.
38:36:220Paolo Guiotto: the conditional density of Y given X, We… use… formula.
38:52:590Paolo Guiotto: that says that the conditional… the conditional expectation of Y given X equals X,
39:02:110Paolo Guiotto: which is an informal notation for this quantity, is the integral on R of… well, actually, we are conditioning Y, so YF… well, the conditional density is the conditional density of Y given X.
39:21:820Paolo Guiotto: Y given X, the Y, where this is the ratio between the joint density
39:30:460Paolo Guiotto: of course, function of XY divided, since we are conditioning in X, divided by the density of X.
39:40:640Paolo Guiotto: all this integrated in Y.
39:44:50Paolo Guiotto: Now, what is this, this density? We do not have, but this is a marginal. Since we have the joint density, we can derive this one.
39:55:260Paolo Guiotto: So, we have… That's DFX…
40:04:320Paolo Guiotto: is the integral on R of the joint density, FXY, integrated with respect to Y.
40:14:350Paolo Guiotto: Perhaps we have already done this calculation.
40:20:370Paolo Guiotto: Let's, let's do… let's redo.
40:22:780Paolo Guiotto: It's the integral of lambda square E minus lambda y indicator 0Y of X.
40:32:930Paolo Guiotto: in variable Y.
40:35:970Paolo Guiotto: So, this is an integral in Y. Yes, in this case, this indicator is equal to 1 if and all if X is between
40:48:610Paolo Guiotto: 0 and Y. But in terms of Y, this means that it is equal to 1 if and only if the indicator of the offline x to plus infinity evaluated at Y is equal to 1, you see?
41:04:370Paolo Guiotto: This is because here I am integrating in Y.
41:08:50Paolo Guiotto: So this condition needs to be written as a condition in Y. So I can say that this is the same of the integral in R of lambda squared E minus lambda y indicator X to plus infinity Y
41:25:790Paolo Guiotto: DY… And this now becomes the integral from X to plus infinity of lambda square E minus lambda y
41:35:150Paolo Guiotto: DY.
41:37:360Paolo Guiotto: Which can be easily computed. Once again, we take a lambda outside and put a minus here in such a way that this becomes the derivative with respect to Y of E minus lambda y.
41:50:970Paolo Guiotto: So this is minus lambda evaluation of E minus lambda y.
41:57:150Paolo Guiotto: between Y equal X and Y equal plus infinity.
42:03:110Paolo Guiotto: At plus infinity, the exponential is 0. At X, we get E minus lambda X. So, with the minus lambda out here, we have finally lambda E minus lambda X.
42:17:320Paolo Guiotto: Yes, there is a little detail that we may forget, potentially, here. Remind that this is for X positive, because for X negative, since we are computing this quantity for X, okay, as a function of X, this is true when X is positive.
42:36:610Paolo Guiotto: Because when X is negative, the indicator, 0y, at point x will be always equal to 0. So we should say this if x is positive.
42:48:580Paolo Guiotto: If X is positive or zero. If X is negative, then we have that FX of X, which is still the same integral on R of the joint density, so lambda square E minus lambda
43:04:570Paolo Guiotto: Y indicator 0 or YX.
43:10:890Paolo Guiotto: the, the, the Y… Now, if X is negative, this quantity is necessarily equal to 0.
43:20:850Paolo Guiotto: Whatever is Y, because Y…
43:24:910Paolo Guiotto: Y for this notation must be positive, and when X is negative, this is 0.
43:36:120Paolo Guiotto: Okay?
43:37:820Paolo Guiotto: So, we get zero. So, the density of X is…
43:44:570Paolo Guiotto: lambda E minus lambda X for X greater than or equal than zero, and 0 for X negative.
43:53:550Paolo Guiotto: spot in a unique form is lambda E minus lambda X indicator, 0 plus infinity, for Vaxa.
44:06:270Paolo Guiotto: So, in other words, this X is an exponential, no? This is an exponential of… parameter lambda.
44:17:630Paolo Guiotto: So when we compute the conditional density.
44:22:110Paolo Guiotto: So the conditional density of Y given X,
44:26:360Paolo Guiotto: at Y given X. We remind that in the statement, there is just,
44:33:650Paolo Guiotto: A little detail to keep in mind that the ratio
44:39:360Paolo Guiotto: of the joint density with the, the density of the variable for which we are conditioning,
44:49:910Paolo Guiotto: can be done when the denominator is different from zero, otherwise we set this as equal to 0. So, we say that this is…
45:02:340Paolo Guiotto: 0 when FXX, which is the denominator, is 0, and this happens if and only if X is negative.
45:12:310Paolo Guiotto: And, in the other case.
45:15:340Paolo Guiotto: When this is different from zero, and this happens, if X is positive.
45:21:360Paolo Guiotto: the ratio is, FXY, which is, so F… XY.
45:31:630Paolo Guiotto: X times Y divided, in this case, FXX.
45:37:130Paolo Guiotto: So, precisely, it is equal to… Now, the joint density was… lambda square…
45:49:20Paolo Guiotto: lambda square E minus lambda y.
45:53:500Paolo Guiotto: Indicator, 0Y.
45:56:570Paolo Guiotto: Excellent.
45:58:450Paolo Guiotto: divided by… When X is positive, the denominator is lambda E minus lambda X.
46:07:290Paolo Guiotto: This is for X greater than 0, and 0 for X less than 0.
46:13:830Paolo Guiotto: So… We can…
46:15:820Paolo Guiotto: still simplify a bit. We can divide this and put together the two exponentials, so we have a unique exponential, E minus lambda.
46:25:740Paolo Guiotto: X plus Y indicator, 0.
46:30:760Paolo Guiotto: Y of X is when x is greater or equal than 0, 0 when x is negative.
46:38:490Paolo Guiotto: So this is the formula for the conditional density of Y given X.
46:48:370Paolo Guiotto: And now we can finish our calculation. So, the conditional expectation of
46:56:310Paolo Guiotto: Y given capital X equal to the value little x. It is the integral on r of y times the conditional density of Y given X.
47:13:340Paolo Guiotto: in DY.
47:17:690Paolo Guiotto: So we would be integrating… for X negative, we would be integrating 0, because the conditional density is zero when X is negative. So we can… we can say that when X is negative, we are integrating on RY times 0.
47:37:170Paolo Guiotto: DY, this will yield value 0. For X positive, we will be integrating on R, Y times, and now we copy that
47:47:950Paolo Guiotto: the platform, e… I did a mistake, of course.
47:53:790Paolo Guiotto: Because when I put together these two exponentials, I wrote the sum, but in fact.
48:00:20Paolo Guiotto: the… the term at the denominator change sign, so it would… it becomes at numerator E2 plus lambda X. So if you want, this is Y minus X, not Y plus X.
48:14:860Paolo Guiotto: Okay, so here we have E2 minus lambda y minus X.
48:20:820Paolo Guiotto: Indicator 0Y.
48:24:190Paolo Guiotto: of X. This is integrated in Y.
48:28:930Paolo Guiotto: Now, let's do this calculation. Okay, so we can take out the factor E lambda X that, in fact, is independent of,
48:40:200Paolo Guiotto: of the integration variables, so then we are integrating on R…
48:46:10Paolo Guiotto: Y lambda E2 minus lambda y with this indicator, 0Y, of AXA.
48:56:870Paolo Guiotto: the… Why?
48:59:230Paolo Guiotto: Now, reminder, this condition means x must be between 0 and Y, so in terms of Y, means Y greater than X, so this becomes… so the integral from X to plus infinity of Y
49:15:720Paolo Guiotto: I keep this lambda here, lambda E minus lambda YDY.
49:21:300Paolo Guiotto: I put a minus here as a factor in such a way that this becomes the derivative with respect to YE minus lambda y.
49:30:70Paolo Guiotto: So this is, that minus is a multiplication factor, so minus E lambda X.
49:39:600Paolo Guiotto: Integrating by parts, we get YE minus lambda y to be evaluated between Y equals X and Y equal plus infinity.
49:50:680Paolo Guiotto: minus integral from X to plus infinity, we move the derivative of Y, we get 1, e minus lambda YDY.
50:03:30Paolo Guiotto: Now, about the evaluation here, when y is plus infinity, the exponential will kill the power, so we get 0. Minus when Y is X, we get X E minus lambda X.
50:17:460Paolo Guiotto: So we have minus E lambda X times minus X, E minus lambda X,
50:26:580Paolo Guiotto: And then we have this other integral that, once more, we compute, we put the minus inside, we introduce a lambda, so we have a 1 over lambda here, in such a way that this be now the derivative of E minus lambda y, so we have plus 1 over lambda.
50:45:190Paolo Guiotto: evaluation of E minus lambda y between y equals X and Y equal plus infinity.
50:56:740Paolo Guiotto: So this yield…
50:58:480Paolo Guiotto: about the evaluation here. When Y is plus infinity, we get 0. Minus. When Y is X, we get minus C to minus
51:07:580Paolo Guiotto: lambda X.
51:09:970Paolo Guiotto: So, at the end, we have multiplying these two, we get plus X.
51:18:20Paolo Guiotto: And here, there is also here a minus times minus plus. The exponentials killed
51:26:120Paolo Guiotto: each with the other, so it remains plus 1. So this is the conditional expectation of Y given little x equal capital X. And therefore.
51:41:220Paolo Guiotto: the conditional expectation of Y, even capital X,
51:46:920Paolo Guiotto: as a function of capital X is capital X plus 1.
51:55:260Paolo Guiotto: Now, the second one is, Similar.
51:58:900Paolo Guiotto: And, so… You… do number 2.
52:15:850Paolo Guiotto: Let's do… The 732… Excess size.
52:24:370Paolo Guiotto: 7, 3, 2… Here, the problem says we have data.
52:31:20Paolo Guiotto: Y is a random variable, Random variable width.
52:38:250Paolo Guiotto: Density… F, Y… of Y equal A over Y squared indicator between 1 and 2.
52:48:660Paolo Guiotto: of why.
52:52:00Paolo Guiotto: A is a positive constant.
52:56:150Paolo Guiotto: to be determined.
53:02:660Paolo Guiotto: to…
53:07:150Paolo Guiotto: Of course, how do we determine? This must be a probability density, so it must be positive, and such way that the full integral will be equal to 1. We will do in a second.
53:19:90Paolo Guiotto: Let X… It says… X is a random variable.
53:29:480Paolo Guiotto: Such that,
53:31:770Paolo Guiotto: It says that the conditional
53:36:270Paolo Guiotto: Well, we have to interpret what it means is the conditional density of X given Y
53:46:530Paolo Guiotto: As a function of the first variable.
53:49:780Paolo Guiotto: So, I would say this, I suppose that this is the meaning of what is written.
53:55:330Paolo Guiotto: is a Gaussian distribution, mean zero, and variance Y squared, so it should be e to minus X minus 0, so the x.
54:07:410Paolo Guiotto: square.
54:09:900Paolo Guiotto: divided 2Y square. Y squared is the variance, so I have to rescale by the factor 2 pi.
54:18:350Paolo Guiotto: Y squared.
54:20:320Paolo Guiotto: This, I suppose, for Y positive.
54:24:890Paolo Guiotto: It's not written, but… Or, let's say, Y different from 0.
54:31:360Paolo Guiotto: However, since, this is,
54:37:740Paolo Guiotto: the conditional density is defined non-zero when FY is non-zero, and FY is non-zero when Y is between 1 and 2, so we may say that this is
54:51:80Paolo Guiotto: when Y is between 1 and 2,
54:55:680Paolo Guiotto: and equals 0 when Y is not in the interval 1, 2, because
55:02:330Paolo Guiotto: This is defined as the ratio between the
55:05:580Paolo Guiotto: Join density and FY. Where FY is 0, we just… Sets this thing as zero.
55:13:420Paolo Guiotto: Now… it says… Number 1… Compute the density
55:24:890Paolo Guiotto: off.
55:26:180Paolo Guiotto: X times Y. I hope it's not a typo.
55:30:310Paolo Guiotto: D.
55:31:540Paolo Guiotto: conditional expectation of X given Y.
55:36:930Paolo Guiotto: the expectation of X.
55:40:390Paolo Guiotto: And the probability that X is positive.
55:47:70Paolo Guiotto: Number 2… compute the density of X.
55:54:370Paolo Guiotto: and the variance… of X.
55:58:790Paolo Guiotto: And the task is X.
56:01:700Paolo Guiotto: normal, or Gaussian.
56:09:730Paolo Guiotto: Number 3… X… Why independent?
56:21:570Paolo Guiotto: Okay.
56:23:20Paolo Guiotto: Let's see what we can, do.
56:26:520Paolo Guiotto: So, first of all, it says that that number 8 must be determined. So now, let's determine… B.
56:39:500Paolo Guiotto: So, this was about the FY.
56:45:30Paolo Guiotto: to be.
56:47:770Paolo Guiotto: a probability.
56:50:250Paolo Guiotto: density.
56:54:330Paolo Guiotto: F… Why? Must be.
56:59:810Paolo Guiotto: Great or equal to 0.
57:02:370Paolo Guiotto: So this is, clear, of course, when A is greater or equal to zero, otherwise it is negative.
57:10:50Paolo Guiotto: So this would imply that A will be greater or equal than 0. And the integral on R of FY be equal to 1.
57:21:420Paolo Guiotto: But this is the integral on R of A over Y squared, indicator of the interval 1, 2 in Y.
57:32:210Paolo Guiotto: So this is that A is just a constant. We have to integrate between 1 and 2, 1 over 1Y square in the Y.
57:43:430Paolo Guiotto: Now, this is the derivative with respect to Y of minus 1 over Y.
57:49:870Paolo Guiotto: So we get A times evaluation of minus 1 over Y between 1 and 2.
57:58:20Paolo Guiotto: So, at Y equal 1, we get minus 1, minus at Y equal 2, we get minus 1 half.
58:06:350Paolo Guiotto: So at the end, the value of this is minus 1…
58:11:580Paolo Guiotto: plus 1 half… no, there is something wrong, it cannot be negative. What is… What is wrong here?
58:24:10Paolo Guiotto: No, yeah, I inverted the values.
58:27:780Paolo Guiotto: So when I have first to calculate at Y equals 2,
58:32:100Paolo Guiotto: and subtract the value at Y equal 1. So it is minus 1 half the value at Y equal 2, minus… the value at y equals 1 is minus 1, so it is plus 1, minus 1 half is plus 1 half.
58:45:130Paolo Guiotto: So at the end, I get a half.
58:48:160Paolo Guiotto: And this is equal to 1 if and only if A is equal to 2.
58:54:190Paolo Guiotto: So this is the value, that, we have here.
59:01:50Paolo Guiotto: 2 of a Y square indicator.
59:05:370Paolo Guiotto: 1 to 2 in order this be a probability density.
59:11:150Paolo Guiotto: Now, the exercise, gives the… conditional density.
59:21:240Paolo Guiotto: And it asks to compute a certain number of things. So let's start with,
59:27:450Paolo Guiotto: Well, let's… let's go in order. Let's start with density of X times Y. Now, to compute the density of X times Y, since I start from X and Y, which are two variables, and I end into 1, this is not a map, no? Mapping is two variables into two new variables.
59:48:00Paolo Guiotto: So there could be also an artificial idea that is the following. We could say, let's take the map that sends XY into one of the variables is X times Y, and then I use another variable, for example, one of the two Y, okay?
00:04:390Paolo Guiotto: This now is a map, so… and the X times Y is a marginal, so let's say that if I have the joint density here.
00:14:520Paolo Guiotto: I could have the joint density here.
00:19:180Paolo Guiotto: And from the joint density, I could deduce the density, okay? This could be… a possibility.
00:28:660Paolo Guiotto: Or, I could, do somehow directly
00:34:180Paolo Guiotto: saying that, well, I cannot start directly from the density, but I can always compute the CDF. So I would start from the CDF, so say probability that, probability that X times Y is less or equal than some value U.
00:54:740Paolo Guiotto: Now, this can be seen as a, again, as an integral on the domain of points XY, where X times Y is less or equal than u of the joint density.
01:10:80Paolo Guiotto: F, X, Y,
01:12:350Paolo Guiotto: DXDY, so if I compute this quantity, then I will do the derivative, because this is the CDF.
01:21:450Paolo Guiotto: of XY.
01:23:880Paolo Guiotto: And if you want to see the density, you have to discuss if this function is differentiable, at least almost every U, and then the derivative will be the density.
01:34:510Paolo Guiotto: I don't know what is better, so… in any case, I need to have this ingredient, and here, if I have this ingredient, I can try to conclude directly, so I would proceed in this way. So, in any case.
01:54:680Paolo Guiotto: we need… to compute… the joint density.
02:04:900Paolo Guiotto: We do not have, but we have something. We have the density of Y and the conditional density. Well, we may remind
02:13:590Paolo Guiotto: That the conditional density, we… reminder… That's it.
02:22:690Paolo Guiotto: a conditional density. In this case, we have the density
02:27:930Paolo Guiotto: of X given Y, okay? So to suppose that we have this, of X given Y,
02:36:450Paolo Guiotto: is, by definition, we say zero if, well, let's say, when this formula makes sense, FXYX times Y divided FY of Y, sorry, FY,
02:53:00Paolo Guiotto: This, when… the denominator, FY, is different from 0. Otherwise, we put…
03:01:680Paolo Guiotto: The, conditional density equal to zero.
03:08:340Paolo Guiotto: So, for us, FY is this function, is 2 divided by Y squared indicator between 1 and 2.
03:20:390Paolo Guiotto: of Y.
03:22:40Paolo Guiotto: So we have that the conditional density X given Y.
03:28:360Paolo Guiotto: which is, somehow known for as, no, it is another data of this problem, is the ratio between FXY
03:38:920Paolo Guiotto: Divide this by FY.
03:42:400Paolo Guiotto: for Y between 1 and 2.
03:46:870Paolo Guiotto: and 0 for every other Y, for Y is not in the interval 1, 2.
03:54:440Paolo Guiotto: So it is clear that saying that 0 is the conditional density is not helpful to determine the joint density, but we can say that 4
04:05:390Paolo Guiotto: Y in 1, 2… we have that F, X, Y, It is equal to…
04:18:10Paolo Guiotto: we use this, the FY.
04:22:110Paolo Guiotto: Y times the conditional density X given Y.
04:28:730Paolo Guiotto: And this means that this is 2 over Y squared, I don't write the indicator, because Y is already between 1 and 2, times the Gaussian, yeah, 1 over root of 2 pi… sorry, not sigma squared. The sigma squared is Y squared.
04:46:910Paolo Guiotto: E minus X squared divided to Y squared.
04:52:190Paolo Guiotto: This is the density when Y is between 1 and 2.
04:59:250Paolo Guiotto: Now, the point is, what if Y is not in 1, 2?
05:04:490Paolo Guiotto: Now, the… this relation does not tell what is the value of XY for those Ys, because we cannot exploit this, not say it's just that this must be equal to 0, so this will be a 0 equals zero identity.
05:21:550Paolo Guiotto: So you cannot determine what is this factor, but…
05:24:990Paolo Guiotto: We could say that this is when Y belongs to 1, 2, and X is whatever is real.
05:34:590Paolo Guiotto: Now, assume that if we, put equal 0, this out of this range, so when Y is not in 1, 2, and we, have that this FXY, which is clearly positive, has integral equal to 1,
05:52:290Paolo Guiotto: This means that this would be a probability density, so it must be FXY for every XY.
05:58:370Paolo Guiotto: Because for other XY cannot be any… anything else than zero, no? So my idea is the following. In the plane XY,
06:07:650Paolo Guiotto: we are saying that when X is between… when Y is between 1 and 2, and X is any real, so when we are in this strip, FXY is known. It is given
06:21:460Paolo Guiotto: by these formulas, okay? But what about here and here?
06:28:230Paolo Guiotto: or here.
06:30:680Paolo Guiotto: What about in these regions? We don't know what is it.
06:34:840Paolo Guiotto: But suppose that this FXY, if we put FXY equals 0 here, here, here, here, here, here.
06:44:550Paolo Guiotto: On the interior plane, R2, this C is a probability distribution.
06:49:110Paolo Guiotto: So this necessarily must be the distribution of XY, because if you say, what is the probability that the pair XY is in the strip, is… falls here? If we get that the integral of FXY is 1, it means that the pair XY falls in the strip with probability 1.
07:09:40Paolo Guiotto: So there is no probability that you fall outside, so the density outside of the strip will be zero.
07:16:750Paolo Guiotto: So let's check if this is a probability density. So… Set the… F, X, Y…
07:27:480Paolo Guiotto: So, X times Y.
07:29:800Paolo Guiotto: As the function, we have above 2 over Y squared, 1 over root of 2 pi Y squared, E minus X squared divided Y squared, when y is in 1, 2,
07:48:370Paolo Guiotto: Index is any real.
07:51:370Paolo Guiotto: And 0 elsewhere.
07:56:940Paolo Guiotto: So now we have a well-defined function in the interior Cartesian plane. It is greater or equal than zero, because this is greater or equal than zero.
08:06:690Paolo Guiotto: So, FXY is…
08:29:350Paolo Guiotto: This reduces to the strip where X is any real.
08:35:640Paolo Guiotto: And Y is between 1 and 2.
08:39:430Paolo Guiotto: of this function, FXY, DXDY.
08:43:950Paolo Guiotto: And we apply the reduction formula to compute the integral.
08:48:120Paolo Guiotto: maybe we should start computing first integration in Excel.
08:53:40Paolo Guiotto: And we have, so, reduction formula.
08:56:569Paolo Guiotto: The integration splits into double integration, in,
09:02:100Paolo Guiotto: And for X is in R, and for Y between 1 and 2.
09:06:390Paolo Guiotto: of the density, so now let's copy the density. 2 over Y squared, 1 over root of 2 pi…
09:14:250Paolo Guiotto: Y squared, E minus X squared over Y squared.
09:19:200Paolo Guiotto: DX, and then DY.
09:23:220Paolo Guiotto: is close outside, then the integral inside this one is clearly equal to 1, because it's a Gaussian integral.
09:32:790Paolo Guiotto: No?
09:33:910Paolo Guiotto: the sigma square is that number Y squared. Whatever the number is, that integral… well, sorry, I forgot that there is a 2 here, because…
09:42:990Paolo Guiotto: That's a Gaussian density.
09:45:630Paolo Guiotto: Yes, we are. The two are just,
09:48:979Paolo Guiotto: forgot to copy the 2. So this integral is 1, and therefore.
09:55:250Paolo Guiotto: This, this integral reduces to the integral of 2 over Y squared between 1 and 2, which is as well equal to 1, because 2 has been determined that way. So it means that the function of two variables given by
10:12:40Paolo Guiotto: That function, this function here, when the point XY is in the strip, and 0 outside, is a probability distribution, and it coincides with FXY when XY is in the strip.
10:26:850Paolo Guiotto: So this means that this must be the distribution, the joint distribution, okay? Because this means that there cannot be any probability that the pair XY falls in a set which is outside of that strip. So these sets have all probability equals zero, so the density must be zero.
10:46:250Paolo Guiotto: So this is the joint accident.
10:48:310Paolo Guiotto: Okay, now we have the joint density. We can return to our question, determining the CDF of X times Y, so we have to compute this integral. So…
11:04:920Paolo Guiotto: F… X times YU.
11:09:700Paolo Guiotto: is the integral on domain of points X, Y,
11:14:180Paolo Guiotto: where X times Y is less or equal than u. Of that function, so 2 over Y squared
11:23:180Paolo Guiotto: Well, remind that this is… let's copy the function, that's why it's FXY, because the function FXY is 0 out of a certain region.
11:39:20Paolo Guiotto: Okay, so how can we…
11:47:850Paolo Guiotto: Now, maybe I'm thinking that, in any case, we had to compute first this, no? Whatever is the way we choose. But perhaps it is better
12:01:10Paolo Guiotto: To pass through this…
12:07:280Paolo Guiotto: Well, then I have to do, in any case, an integral.
12:13:110Paolo Guiotto: Because, now, the point is, how do we compute the integral? What is the region X times Y less or equal than U?
12:22:870Paolo Guiotto: Mmm…
12:26:70Paolo Guiotto: So, let's think about… because here, we are integrating that function, which is non-zero only when we are in a strip like this.
12:37:650Paolo Guiotto: So, 1, 2. So, let's say that if, for some U, there is no intersection with that region.
12:44:940Paolo Guiotto: the calculation of the integral is zero. Otherwise, we have to determine what is the intersection with this region. Now.
12:52:780Paolo Guiotto: So let's… let's start with some examples. See, if I take U equals 0, X times Y less or equal than 0 means the product negative means one positive, the other negative.
13:08:90Paolo Guiotto: So, when X is positive and Y is negative, it is this quarter here.
13:13:570Paolo Guiotto: So in here, the integral will be 0, or it is all this.
13:18:220Paolo Guiotto: Okay?
13:19:420Paolo Guiotto: But in this case, you see that the integral reduces to the integral on this fast strip.
13:27:640Paolo Guiotto: So, reasonably, it will be half of the full integral, so it will be 1 half.
13:33:260Paolo Guiotto: So this 4U equals 0. For U, less than 0. For U, greater than zero, what is the difference?
13:40:790Paolo Guiotto: Now, this means that, we have to distinguish a lot of cases, because…
13:49:650Paolo Guiotto: I'm thinking what is… what is better to do?
13:53:370Paolo Guiotto: If to handle this by doing cases.
13:58:220Paolo Guiotto: Or to try… let's try to see what happens if we do the transformation.
14:03:780Paolo Guiotto: So I say that a possibility is this one. We take the pair XY,
14:10:100Paolo Guiotto: And we transform into a new pair.
14:13:110Paolo Guiotto: I don't know if it is the right choice is X times Y.
14:17:930Paolo Guiotto: Well, I wouldn't say X, because X, we do not have directly the distribution of X, but let's use Y. Let's see, please.
14:32:310Paolo Guiotto: Let's see if the… the point is that we should need… we should have a big section, no, for the two. Now, we know that X times Y belongs to the strip, and here we have the density we just computed.
14:48:40Paolo Guiotto: So this is the map that introduces two new variables, U and V, and here we will have the density of U and V.
15:05:240Paolo Guiotto: Now, First thing, let's, understand if this is a big objection.
15:13:450Paolo Guiotto: Well, you have that, U.
15:17:240Paolo Guiotto: So, let's use the little letters. So, PXY is X times YY.
15:26:70Paolo Guiotto: That we call U and V.
15:28:990Paolo Guiotto: So, U is XY… V is Y means that, of course, Y is V.
15:38:850Paolo Guiotto: and the X… is, U of V.
15:44:870Paolo Guiotto: Provided, provided,
15:50:70Paolo Guiotto: V is different from 0, but this is the case, because if since V is Y, and if we are considering Y,
15:59:290Paolo Guiotto: in, the region, in the intervals 1, 2, and X real, so this is,
16:06:900Paolo Guiotto: the, starting set. The UV SAT is made of what?
16:12:350Paolo Guiotto: You see that V, since V is Y, is still in 1, 2.
16:18:730Paolo Guiotto: And when you do products between any real and number between 1 and 2, you get any real source, so you will be in reals. So this map actually maps the initial set into itself.
16:39:370Paolo Guiotto: And it is a big junction, because as you can see, it is invertible. So this is the direct map, this is the inverse map.
16:47:710Paolo Guiotto: So the density of UV in the letters U, little u, little v will be the density of XY
16:59:10Paolo Guiotto: composed with phi-1 UV.
17:02:370Paolo Guiotto: times modulus of the determinant of phi minus 1 prime UV.
17:09:210Paolo Guiotto: So this means that… Now, you remind that the density… well, let's write first the arguments. So, FXY…
17:20:570Paolo Guiotto: So the arguments are for X U over V, for Y is V.
17:28:940Paolo Guiotto: The modulus of the determinant of phi minus 1 prime, phi minus 1,
17:33:690Paolo Guiotto: prime is the Jacobian matrix of V minus 1, which is this map. So we have to do the gradients of the two components, U over V and V. So the first line is the gradient of U over V, the second is the gradient of V.
17:50:440Paolo Guiotto: Of course, the variables are u and v, so the partial derivative with respect to U is 1 over V. The partial derivative with respect to V is minus U over V squared.
18:01:740Paolo Guiotto: The second line, derivative with respect to U is 0, derivative with respect to V is 1. So when we do the determinant.
18:10:280Paolo Guiotto: of V minus 1 prime, we get 1 over V, okay? So this is the quantity, well, the absolute value of this is the absolute value of 1 over V, but remind that our V is between 1 and 2, so it is positive.
18:29:110Paolo Guiotto: And therefore, This is 1 over 3. So it means that here we have to plug 1 over B.
18:38:600Paolo Guiotto: Now, let's replace the formula for F. We have seen that FXY is that quantity when Y is between 1 and 2, and X3L0 elsewhere.
18:53:100Paolo Guiotto: So we can say that it is…
18:55:400Paolo Guiotto: So let's put the indicator to do the restriction. So, it is the indicator of 1, 2,
19:03:870Paolo Guiotto: for Y, Y is equal to V, so it's the same. Then there is any real, so no restriction for X.
19:12:770Paolo Guiotto: D function is… 2 over Y squared, I'm sorry.
19:20:40Paolo Guiotto: See ya.
19:21:20Paolo Guiotto: 2 over Y squared, which is, Y is V, so 2 over V square.
19:31:410Paolo Guiotto: Then there is one over the root of 2 pi Y squared that becomes V squared.
19:38:390Paolo Guiotto: E minus… If you want, if you want, you see that the exponent…
19:52:320Paolo Guiotto: No. So we have, in the exponent here, X over Y squared.
20:00:250Paolo Guiotto: And so we have to…
20:01:890Paolo Guiotto: replace, so we have X squared, X is U over V, so U of V squared, this is X squared, divided to Y squared, Y is V, so V square.
20:21:120Paolo Guiotto: So at the end, we have… and there is, do not forget the factor which is here, 1 over V.
20:30:320Paolo Guiotto: want of a village.
20:33:560Paolo Guiotto: Okay, so let's see what we have. One… the indicator interval 12V.
20:45:640Paolo Guiotto: Let's see if it is convenient. I don't know, but let's say… let's simplify as much as possible. We have a 2 over… we have a V square here. If you want, we have root of V square, which is V, because V is positive. We have another V here, so…
21:01:680Paolo Guiotto: V to power 4 here, then we have 1 over root of 2 pi.
21:07:590Paolo Guiotto: exponential minus u squared divided 2V to power 4.
21:13:700Paolo Guiotto: This is the formula of the joint density of UV, okay? So this is FUV.
21:22:350Paolo Guiotto: little u, little v, and reminded that this means is the joint density of X times Y.
21:30:670Paolo Guiotto: as function of this pair UV.
21:33:860Paolo Guiotto: So if we want now the density of XY, So, F, X, Y…
21:41:890Paolo Guiotto: as functions say of you, we have to integrate
21:46:200Paolo Guiotto: on the real liner, F, the joint density, FXYY,
21:51:920Paolo Guiotto: UV in the other variable, so in the variable V.
21:58:80Paolo Guiotto: Is that easy?
22:00:980Paolo Guiotto: Okay, let's see, what is it?
22:05:510Paolo Guiotto: Because for V, you have this.
22:13:370Paolo Guiotto: Okay, so let's say that we have a factor here, 1 over 2 pi.
22:18:400Paolo Guiotto: integral. V ranges from 1 to 2.
22:24:150Paolo Guiotto: Well, let's keep the two inside. 2 over V power fourth, E minus U square over V power fourth.
22:34:230Paolo Guiotto: TVs.
22:41:660Paolo Guiotto: Is that…
22:47:00Paolo Guiotto: Is it possible to compute this one?
22:49:750Paolo Guiotto: Because if I do the derivative with respect to V of E minus u squared over V, Power 4…
22:57:960Paolo Guiotto: This is E minus u squared over V power 4, then the derivative of the exponent is equal to minus u squared.
23:07:140Paolo Guiotto: And then I have the derivative of V minus 4, so it is minus 4.
23:13:540Paolo Guiotto: times V to minus 5, so minus, so there is a 4 here.
23:19:420Paolo Guiotto: V to power 5.
23:29:690Paolo Guiotto: So it seems that, yeah, we can create this thing.
23:34:420Paolo Guiotto: So we need a 4U square. We have a 2, so we put another 2U square. We divide by 2U square.
23:50:980Paolo Guiotto: This, at least, if U is different from 0.
23:57:30Paolo Guiotto: If U is equal to 0, maybe the calculation can be done directly.
24:01:470Paolo Guiotto: Then I need a V to power 5 down here. I add the 1 by multiplying and dividing by V in this way.
24:11:650Paolo Guiotto: But in any case, it will remain a… it will remain an unsolved integral at the end.
24:17:820Paolo Guiotto: Because, I, we have, 1 over 2 root of 2 pi, U squared…
24:27:490Paolo Guiotto: Integral 1 to 2.
24:30:100Paolo Guiotto: Now, we created the derivative with respect to V of E minus u squared over V to power 4.
24:38:250Paolo Guiotto: Eve nieu.
24:40:190Paolo Guiotto: We can integrate by parts.
24:43:70Paolo Guiotto: This yields VE minus U square over V to power 4.
24:50:460Paolo Guiotto: evaluated between 1 and 2, minus integral between 1 and 2, now the derivative moves on V, so 1E minus u squared over V to power 4.
25:01:400Paolo Guiotto: TV. I suspect that there is a… something,
25:07:620Paolo Guiotto: Perhaps that request, I will change maybe in a second.
25:12:580Paolo Guiotto: the request, because I think we cannot compute anything here. So we get 1 over 2 root of 2 pi u squared, then that part can be computed.
25:24:220Paolo Guiotto: We are integrating in V, so when V is 2, we get 2E2 minus u squared divided 2 to power 4, so U square over 16.
25:34:500Paolo Guiotto: minus, when V is 1, e to minus u squared.
25:39:340Paolo Guiotto: and not divided 1, minus integral from 1 to 2 of E minus u squared divided V to power 4 in dV.
25:50:110Paolo Guiotto: And honestly, I don't know how to integrate this, so we can… we can…
25:57:10Paolo Guiotto: we could live. However, this is… this should be water. This should be the… yeah, the density of X times Y.
26:07:530Paolo Guiotto: As a function of you.
26:11:430Paolo Guiotto: I don't know what specialist says this, huh?
26:14:160Paolo Guiotto: However, this is F of X times Y,
26:18:260Paolo Guiotto: of U. So, if we computed for U different,
26:23:860Paolo Guiotto: than zero. For U equals 0,
26:27:880Paolo Guiotto: just plug u equals 0, what happens here? We get that this exponential is e to 0, so 1. So at the end, we have to say 1 over root of 2 pi.
26:45:290Paolo Guiotto: Integral, 1 to 2.
26:48:980Paolo Guiotto: of 2 over V to power 4.
26:53:130Paolo Guiotto: DV, because the exponential is 1.
26:56:390Paolo Guiotto: And this is, this is,
27:00:70Paolo Guiotto: the 2 goes outside. V2 minus 4 is,
27:07:20Paolo Guiotto: So, 2 over root of 2 pi…
27:11:730Paolo Guiotto: What is minus, minus 1 over 3V cubed?
27:16:990Paolo Guiotto: Between 1 and 2.
27:20:860Paolo Guiotto: So whatever it is, it becomes a value 2 over root of 2 pi.
27:24:910Paolo Guiotto: when, V is 2, so this is, minus 1 over 24.
27:31:840Paolo Guiotto: Minus, minus, plus 1 3rd.
27:36:350Paolo Guiotto: However… I wonder if we, instead of doing the density of X times Y, Probably,
27:47:720Paolo Guiotto: the exercise would change if I do the density of… X over Y.
27:58:680Paolo Guiotto: Just… mmm… Poir curiosity.
28:02:550Paolo Guiotto: So, in this case, I would say, let's consider the map that maps XY into X over Y, and still Y.
28:13:100Paolo Guiotto: with the same arguments as above, no? So, the pair XY varies in reals times 1, 2.
28:22:150Paolo Guiotto: The pass, X over Y, so when Y is in, 1, 2, the second component is still in 1, 2.
28:30:60Paolo Guiotto: And when Y is between 1, 2, and X is any real, the ratio X over Y is still any real.
28:37:730Paolo Guiotto: So the map maps the set into itself.
28:44:340Paolo Guiotto: In this case, so the, the mapping is U equal X over Y, and V equal Y. So this is the direct map, the inverse map is Y equals V.
28:58:470Paolo Guiotto: And this means that X is… is… is…
29:04:530Paolo Guiotto: UY, which is UV. So this is the map phi minus 1.
29:11:240Paolo Guiotto: So the Jacobian, phi minus 1 prime, is the Jacobian matrix of this. The gradient of UV is VU. The gradient of V is 0, 1.
29:23:410Paolo Guiotto: So the determinant of the Jacobian of the inverse is just V.
29:29:750Paolo Guiotto: So, the density of the new variables, UV,
29:35:270Paolo Guiotto: which are the variables X over Y and Y, so this is the density of X over Y.
29:42:430Paolo Guiotto: And Y.
29:43:820Paolo Guiotto: This is equal to the initial density, again, FXY,
29:52:00Paolo Guiotto: Evaluated in phi minus 1 of UV, so in this pair, UV.
29:58:350Paolo Guiotto: UVV.
30:01:70Paolo Guiotto: and times the modulus of the determinant, which is a modulus of V, which is V, because V is between 1 and 2.
30:09:640Paolo Guiotto: So in this case, we would obtain that this is equal.
30:13:190Paolo Guiotto: When V is not in 1, 2, the density FXY is 0, so we get 0. When V is in 1, 2,
30:24:200Paolo Guiotto: Now, the density is, 2 of P squared.
30:31:130Paolo Guiotto: Then we have the Gaussian, 1 over root of 2 pi.
30:37:30Paolo Guiotto: The second component, which is still B squared, E minus… so you reminded here we are the X over 2Y… X squared over 2Y square, so this would be UV,
30:48:890Paolo Guiotto: square over 2V squared. So probably the right question was the ratio, not the product. And then you have indicator between 1 and 2 of V.
31:00:820Paolo Guiotto: I forgot, also, there is a V here, so all this… times V.
31:08:830Paolo Guiotto: So we have the joint density is 0 when V is not in 1, 2.
31:15:490Paolo Guiotto: And when V is in 1, 2,
31:19:30Paolo Guiotto: is equal to 2 over V,
31:24:490Paolo Guiotto: One… well, let's put together this square, let's give the square here, so 1 over root of 2 pi.
31:32:620Paolo Guiotto: And here, we get the simplification, because you see that the V square cancels this 1. So we are… at the end, we have E minus U squared over 2. So that's the…
31:43:100Paolo Guiotto: Which is much easier.
31:45:70Paolo Guiotto: In fact, here, now, this is the joint density of X over Y and Y.
31:52:960Paolo Guiotto: We'll say, in letters, UV.
31:56:440Paolo Guiotto: So when you want the density of X over Y, You have now to integrate this joint density.
32:09:450Paolo Guiotto: in the other variable, so the variable V. This is much easier because of this formula. You see that
32:17:620Paolo Guiotto: When V is not in 1, 2, you get 0, so the integral restricts to 1, 2, and in this, we get 2 over V square. This part is independent of V, so we can write outside, so 1 over root of 2 pi.
32:37:130Paolo Guiotto: E minus U square half, and this we computed at the beginning, was equal to 1.
32:45:00Paolo Guiotto: So at the end, we get 1 over root of 2 pi.
32:49:900Paolo Guiotto: E minus U square over 2.
32:59:730Paolo Guiotto: Cool.
33:01:70Paolo Guiotto: Probably the right request for this exercise would have been this one.
33:06:800Paolo Guiotto: Now, to compute the conditional density, let's set this calculation of X given Y. We start doing the conditional density of
33:18:950Paolo Guiotto: X given Y equal little y, which is the integral on R of X, the conditional density.
33:28:560Paolo Guiotto: X given Y in the X…
33:34:820Paolo Guiotto: Now, this conditional density is the ratio between the joint density and the density of the variable with respect to which we are conditioning. So, this is integral on R of X.
33:51:230Paolo Guiotto: The joint density is, 2.
33:55:110Paolo Guiotto: Well, we have here to distinguish, because of the joint density, now this is the formula. F, X, Y,
34:04:480Paolo Guiotto: divided the FY.
34:09:100Paolo Guiotto: This, when FY is different from 0, so when Y is not…
34:15:110Paolo Guiotto: when Y is in 1, 2. Otherwise, we are integrating,
34:20:780Paolo Guiotto: So let's say, otherwise, we are integrating, zero.
34:26:240Paolo Guiotto: when Y is not in… 1, 2.
34:36:190Paolo Guiotto: Because when the denominator is zero, we set, by definition, this equals zero. So in this case, we will get 0. In the first case, so continuing just this one.
34:48:510Paolo Guiotto: In this case, we have integral on R of X. Now, we have that the joint density is,
34:57:200Paolo Guiotto: 2 over Y square.
35:00:420Paolo Guiotto: 1 over root of 2 pi. Y…
35:04:650Paolo Guiotto: squares. I do not remember exactly.
35:09:320Paolo Guiotto: Where is it? The joint density?
35:13:850Paolo Guiotto: Yes, that's that stuff.
35:17:610Paolo Guiotto: So, E,
35:23:850Paolo Guiotto: I'm writing up here.
35:26:140Paolo Guiotto: So 2 over Y squared, 1 over root of 2 by Y squared, E minus X squared over Y squared, 2Y square.
35:38:20Paolo Guiotto: EDX.
35:42:230Paolo Guiotto: Okay, now these, All this can be written outside.
35:48:400Paolo Guiotto: So we have 2 over Y cubed… Root of 2 pi.
35:54:800Paolo Guiotto: integral on R of X E minus X squared divided to Y squared. We restore the root and the Y inside, because this is the mean value of a Gaussian
36:11:410Paolo Guiotto: centered in zero with mean zero, no? This is a normal with mean zero and variance Y squared, and this is the mean value. So the mean value is just 0. This is equal to zero.
36:26:150Paolo Guiotto: So we get that this, all this makes zero.
36:30:110Paolo Guiotto: So the conditional expectation of X given Y equal little y is identically equal to 0.
36:42:150Paolo Guiotto: And therefore, the conditional expectation of X Given why.
36:47:60Paolo Guiotto: Is equal to zero.
36:51:600Paolo Guiotto: If you want the expectation of X, you just use the identity that expectation of X,
36:58:870Paolo Guiotto: is the expectation of the conditional expectation with respect to any sigma algebra, so in particular of this, since you already know that this is zero without any argument, this is the expected value of zero, you get 0.
37:17:300Paolo Guiotto: If you want the probability the DEX is positive, PR.
37:27:160Paolo Guiotto: We needed to determine the density.
37:31:700Paolo Guiotto: Or… However, there are… now, time is over, so, there is still to compute, compute…
37:43:80Paolo Guiotto: the probability that X is positive.
37:47:480Paolo Guiotto: the density of X.
37:51:120Paolo Guiotto: You have now the joint density, so it's… Hmm.
37:55:440Paolo Guiotto: this…
37:59:830Paolo Guiotto: Should be possible, hopefully.
38:02:220Paolo Guiotto: And it asks, is… X normal.
38:09:350Paolo Guiotto: So, respond to this, and then there is a last final
38:14:80Paolo Guiotto: requirement are X and Y independent, you have just to check if the joint distribution that we computed is the product of the two distributions.
38:23:300Paolo Guiotto: But, well, let's say, probably, I don't think so, by looking at the joint distribution.
38:30:410Paolo Guiotto: Okay, let's stop here for today.
38:33:210Paolo Guiotto: But do the remaining exercises on this chapter.