1
00:00:03,960 --> 00:00:09,090
We have looked at using random variables individually in the past examples, so now we're going to look

2
00:00:09,090 --> 00:00:12,810
at the concept of using multiple random variables in a single experiment.

3
00:00:13,680 --> 00:00:17,880
So let it be a random variable with a PDF of our effects here.

4
00:00:18,240 --> 00:00:22,530
Also, let let's why be a random variable with a PDF of F..

5
00:00:22,530 --> 00:00:29,520
Why here it is now possible to define a PDF for the joint probability that is a probability of X and

6
00:00:29,520 --> 00:00:37,680
Y, and we define this as a probability density function of F, X, Y or for shorthand notation.

7
00:00:37,680 --> 00:00:41,640
We can just write it as F with X and Y being the parameters of the input.

8
00:00:42,030 --> 00:00:48,080
So we automatically know that this is a probability density function for random variables X and Y,

9
00:00:48,540 --> 00:00:50,850
so we can either use either of these annotations.

10
00:00:52,170 --> 00:00:58,380
So just like in basic probability, the joint probability gives us a probability of X and Y happening

11
00:00:58,380 --> 00:00:59,200
at the same time.

12
00:00:59,550 --> 00:01:04,950
So from the probability density function, the joint one, we can work out the joint probability and

13
00:01:04,950 --> 00:01:08,640
we can just do this by using our probability equation that we had before.

14
00:01:09,060 --> 00:01:12,760
But we're going to extend it to being a function of two variables.

15
00:01:13,170 --> 00:01:21,480
So now we have our ingroup from our limits and B for the X variable and we integrate the function with

16
00:01:21,480 --> 00:01:28,110
respect to X, and then we also integrate the function again with respect to Y between C and D to get

17
00:01:28,110 --> 00:01:29,250
the limits for C and D.

18
00:01:29,640 --> 00:01:35,010
So this joint probability equation here gives us the probability that the random variable X is between

19
00:01:35,160 --> 00:01:41,560
limits A and B, with the joint probability that Y is also between limits C and D.

20
00:01:42,150 --> 00:01:47,970
So this is just an extension of our equation to work out the probability from the density function using

21
00:01:47,970 --> 00:01:48,600
the integral.

22
00:01:48,810 --> 00:01:53,610
But we now we have to do a double integral because we got two parameters that we want to integrate over.

23
00:01:55,490 --> 00:02:00,770
We can also work out our marginal density functions so we have a joint probability density function

24
00:02:00,770 --> 00:02:06,830
for random variables, X and Y, if we integrated over the opposite variable, we can get the probability

25
00:02:06,830 --> 00:02:08,930
density function for the other variable.

26
00:02:09,260 --> 00:02:15,560
Sorry to work out our density function for a random variable X, we have to integrate our joint probability

27
00:02:15,590 --> 00:02:18,310
over Y and to do the opposite.

28
00:02:18,320 --> 00:02:24,080
If you want to work out our density function for the random variable, why we have to do our indefinite

29
00:02:24,080 --> 00:02:27,410
integral over the function with respect to X.

30
00:02:29,360 --> 00:02:33,980
We can also have a look at the expected value for when we're using a joint probability density function,

31
00:02:34,430 --> 00:02:39,740
so we recovered in the past that the expected value for when we're using a single random variable is

32
00:02:39,740 --> 00:02:41,180
just this equation shown here.

33
00:02:41,210 --> 00:02:45,250
So so we have a function of X and we want to work out the expected value of it.

34
00:02:45,890 --> 00:02:53,090
The answer this is just simply the integral of that function as a function of X multiplied by the probability

35
00:02:53,090 --> 00:02:56,690
density function of X integrated, all with respect to X.

36
00:02:57,440 --> 00:03:03,770
Now when we go to our multiple random variables, so now we just have to extend it by using a double

37
00:03:03,770 --> 00:03:06,060
integral over our X and Y.

38
00:03:06,110 --> 00:03:11,240
So it's pretty much the same equation, but now we're using a double integral for both parameters.

39
00:03:13,730 --> 00:03:19,340
So just like in basic probability, we can have independent random variables, and what this means is

40
00:03:19,340 --> 00:03:25,730
that if we have events and B, if they're independent, it means a total probability of event A and

41
00:03:25,730 --> 00:03:26,490
B happening.

42
00:03:26,510 --> 00:03:32,510
Is this the multiplication of the probability that A happens multiplied by the probability that Event

43
00:03:32,510 --> 00:03:33,330
B happens?

44
00:03:33,860 --> 00:03:36,560
So if they're independent, this relationship holds up.

45
00:03:37,460 --> 00:03:43,170
Now, a similar relationship can be found for the probability density functions for all random variables.

46
00:03:43,490 --> 00:03:50,330
So if we have a joint density function of X and Y, if events or the random variables X and Y are independent,

47
00:03:50,630 --> 00:03:56,090
it means that the density function is just going to be the same as multiplying the two individual marginal

48
00:03:56,090 --> 00:03:57,350
density functions together.

49
00:03:58,190 --> 00:04:04,190
So if this definition holds, it means that the random variables X and Y are independent of each other.

50
00:04:06,000 --> 00:04:11,350
So now let's have a look at the expected value for multiplication of independent random variables.

51
00:04:11,730 --> 00:04:16,890
So we want to work out the expected value when we multiply a random variables, X and Y together.

52
00:04:17,520 --> 00:04:22,800
So now using the equation that we showed on previous slide, we can work out our integral.

53
00:04:23,100 --> 00:04:25,780
So we just multiplying our random variables, X and Y.

54
00:04:25,800 --> 00:04:31,560
So that becomes a function and we multiply that by our density function so we can expand this equation

55
00:04:31,560 --> 00:04:32,260
out further.

56
00:04:32,610 --> 00:04:37,830
We actually know that our joint probability density function is independent, so we know that we can

57
00:04:37,830 --> 00:04:40,710
split it up into our F and Y random.

58
00:04:41,190 --> 00:04:45,660
So we know that we can split it up into our X and Y probability density functions.

59
00:04:46,050 --> 00:04:48,400
So we end up with this equation shown here.

60
00:04:48,420 --> 00:04:53,730
So we're basically just splitting up our joint density function into the two individual component density

61
00:04:53,730 --> 00:04:54,270
functions.

62
00:04:55,200 --> 00:05:00,980
So next we can move and separate out X and Y variables together so we can separate them out.

63
00:05:00,990 --> 00:05:03,480
And now we have two integrals multiplied together.

64
00:05:03,510 --> 00:05:09,450
So we have all the X terms in this integral and all Y terms in this integral area here.

65
00:05:10,110 --> 00:05:15,180
Now, if you have a look closer at these two integrals, you might look at them and they might seem

66
00:05:15,180 --> 00:05:15,820
pretty familiar.

67
00:05:16,290 --> 00:05:23,130
This is because this term here and this term here is simply just the expected values for the X and Y

68
00:05:23,790 --> 00:05:24,720
random variables.

69
00:05:25,290 --> 00:05:32,700
So using this here, we know that our definition, assuming independent expected value for random variables

70
00:05:32,700 --> 00:05:39,960
X multiplied, is just going to be the expected value of the X random variable multiplied by the expected

71
00:05:39,960 --> 00:05:41,830
value of the Y random variable.

72
00:05:42,240 --> 00:05:46,110
And of course, this only holds if X and Y are independent.

73
00:05:49,270 --> 00:05:55,360
We can also have a look at the expected value of the sum of independent random variables, so a function

74
00:05:55,360 --> 00:05:58,630
Z here is a function of two parameters, X and Y.

75
00:05:58,810 --> 00:06:05,170
And this function is just the sum of two independent functions, function G, which is just a function

76
00:06:05,170 --> 00:06:11,050
of X and function F and and function Hech, which is a function of Y.

77
00:06:11,890 --> 00:06:18,730
So we want to work out the expected value of our function Z and this just turns into our expected value

78
00:06:18,790 --> 00:06:21,400
of our function G plus our function H.

79
00:06:23,180 --> 00:06:28,790
So now riding out our expected value equation, we can pull in a function and put the function that

80
00:06:28,790 --> 00:06:33,710
we want to work at the expected value of in of you, multiply it by the probability density function.

81
00:06:34,160 --> 00:06:37,040
Now, we can expand this some out here into two terms.

82
00:06:37,340 --> 00:06:40,290
We can also expand out our probability density function.

83
00:06:40,310 --> 00:06:46,610
So if we assume X and Y are independent, we know that we can break it down into the two different individual

84
00:06:46,610 --> 00:06:48,080
probability density functions.

85
00:06:48,770 --> 00:06:51,350
So when we do that, we can get this equation here.

86
00:06:51,710 --> 00:06:55,220
So we split out our function of G into this one.

87
00:06:55,220 --> 00:06:57,590
A function of how much into this one over here.

88
00:06:57,950 --> 00:07:01,250
Multiply it by our two individual probability density functions.

89
00:07:02,090 --> 00:07:08,030
And like we did in the last example, now we can split this in this double integral into an integral

90
00:07:08,330 --> 00:07:13,750
respect to X and integral in respect to Y, because this is all just a single multiplication.

91
00:07:14,330 --> 00:07:20,120
So when we do that, we end up with this term here and we can also have a look at a different individual

92
00:07:20,150 --> 00:07:23,360
integrals and we might notice some commonalities between the two.

93
00:07:24,020 --> 00:07:29,000
Now, if you look at this integral here, this integral here is just going to equal to one, because

94
00:07:29,000 --> 00:07:34,250
this is just summing up the probability density function and we know that the probability density function

95
00:07:34,490 --> 00:07:35,590
has to equal one.

96
00:07:36,350 --> 00:07:39,860
We can do the same thing over here for X, that also has to equal one.

97
00:07:40,220 --> 00:07:47,330
So now we just end up with the sum of this integral and this integral and going back to our basic expectation

98
00:07:47,330 --> 00:07:53,960
in the integral, we can see that this integral here and this integral here are just the expected values

99
00:07:53,960 --> 00:07:56,720
for a function G and a function H.

100
00:07:58,100 --> 00:08:03,950
So this is basically saying that when we say this is saying that our expected value for the sum of two

101
00:08:03,950 --> 00:08:09,620
independent random variables is just the sum of the expected values for the two independent variables.

102
00:08:10,190 --> 00:08:17,150
So if we had our function, Z is equal to X plus, why then our expected value for this function is

103
00:08:17,150 --> 00:08:20,490
just going to be expected value for X plus expected value for Y.

104
00:08:21,200 --> 00:08:24,240
And again, this only holds when X and Y are independent.

105
00:08:25,010 --> 00:08:29,630
So these are two different identities for independent random variables that are useful to know.

106
00:08:32,530 --> 00:08:38,420
So now we can also look at dependent random variables, so the two random variables might not be independent.

107
00:08:38,560 --> 00:08:40,790
There might be some correlation between the two.

108
00:08:41,050 --> 00:08:46,740
So every time we query the joint custody function, we might end up with some correlated examples.

109
00:08:46,780 --> 00:08:52,840
So we can see on the right here, we have a graph that has the X random variable and Y random variable.

110
00:08:53,140 --> 00:08:57,430
And you can see that every time we create the density function, we might get different points that

111
00:08:57,430 --> 00:08:58,000
look like this.

112
00:08:58,540 --> 00:09:02,340
And it's pretty clear to see that these are correlated in some regard.

113
00:09:02,830 --> 00:09:07,320
We can see that there's basically the following in this case, a line of correlation.

114
00:09:07,720 --> 00:09:13,710
And this is actually a positive correlation because this means that as X gets bigger, Y gets bigger,

115
00:09:14,080 --> 00:09:16,680
you could have cases of negative correlation.

116
00:09:16,990 --> 00:09:21,540
So that would be on the other side when when it gets bigger, Y gets smaller.

117
00:09:21,580 --> 00:09:26,410
So be along with the opposite slope or you might have zero correlation.

118
00:09:26,410 --> 00:09:30,280
So there might be independent and that would just mean that random all over the place.

119
00:09:30,280 --> 00:09:31,420
There's no pattern to them.

120
00:09:34,470 --> 00:09:38,840
So to work out the correlation between the different components, we can look at the covariance.

121
00:09:39,690 --> 00:09:45,240
So in the past we looked at the variance of a parameter and that was just the expected value of the

122
00:09:45,240 --> 00:09:48,120
random variable, minus the main squared.

123
00:09:48,420 --> 00:09:49,950
So the covariance is very similar.

124
00:09:50,130 --> 00:09:54,730
But instead of being a function of a single random variable is now a function of two random variables.

125
00:09:55,140 --> 00:10:02,220
So here we have the expected value of the multiplication of our random variable X minus its main multiplied

126
00:10:02,220 --> 00:10:04,710
by a random variable, Y minus this mean.

127
00:10:05,430 --> 00:10:09,070
And we can expand this out and we can end up with this equation here.

128
00:10:09,110 --> 00:10:12,780
So so this is how we can work at the covariance coefficient.

129
00:10:13,020 --> 00:10:19,110
So we basically look at the expected value of X and Y minus the mean of X and Y.

130
00:10:19,800 --> 00:10:23,420
So using the covariance, we can work out a correlation coefficient.

131
00:10:23,460 --> 00:10:25,080
So that's basically this term here.

132
00:10:25,440 --> 00:10:31,470
So using the variance multiplied it by the standard deviation for the random variable X and Y gives

133
00:10:31,470 --> 00:10:35,010
us a correlation coefficient between negative one and one.

134
00:10:35,670 --> 00:10:42,270
Negative one means that negatively correlated positive one mean that positively correlated zero means

135
00:10:42,270 --> 00:10:43,410
are not correlated at all.

136
00:10:45,150 --> 00:10:49,030
So here is a summary of all the different concepts we have gone over in this video.

137
00:10:49,050 --> 00:10:53,950
We've talked about the joint probability density function and how to work out the probability from it.

138
00:10:55,110 --> 00:11:00,240
We've described how to work out the expected value equation for when we have a joint probability density

139
00:11:00,240 --> 00:11:00,660
function.

140
00:11:01,440 --> 00:11:06,780
We looked at the independence condition for a joint density function, just being the sum of the two

141
00:11:06,780 --> 00:11:08,310
individual density functions.

142
00:11:08,820 --> 00:11:11,280
We've looked at the concept of covariance.

143
00:11:11,550 --> 00:11:12,300
So how much?

144
00:11:12,300 --> 00:11:14,810
One parameter is correlated with another parameter.

145
00:11:15,570 --> 00:11:21,210
We've worked out how to work out a marginal density functions from our joint density function here and

146
00:11:21,210 --> 00:11:27,810
we've got a few independent expectation identities that will come in handy every now and again of that,

147
00:11:27,810 --> 00:11:33,870
the expected value of the sum that the expected value of the multiplication of random variables is just

148
00:11:33,870 --> 00:11:34,650
going to be expected.

149
00:11:34,650 --> 00:11:39,690
Value multiplied together and likewise with the sum is just going to be the sum of the expected values

150
00:11:39,690 --> 00:11:40,160
together.

