1
00:00:00,120 --> 00:00:06,180
Now that we've talked about measures of central tendency like mean median and mode and measures of spread

2
00:00:06,180 --> 00:00:09,390
like range and IQ are interquartile range.

3
00:00:09,390 --> 00:00:16,290
We want to talk about this idea of transforming a random variable because if we have, for instance,

4
00:00:16,290 --> 00:00:22,830
a data set and we already know all of these measures about the data set, so let's just make up some

5
00:00:22,830 --> 00:00:23,370
values.

6
00:00:23,370 --> 00:00:29,550
Let's say that for this particular data set, we know that the mean is six, that the median is seven,

7
00:00:29,580 --> 00:00:35,100
the mode is three, and we'll just say the range in IQ R are ten and eight.

8
00:00:35,100 --> 00:00:38,280
And let's say we also just have some standard deviation.

9
00:00:38,280 --> 00:00:45,360
What we want to say now is that if we shift the data set by some constant value, we'll call it K,

10
00:00:45,690 --> 00:00:50,910
Then our shifted data set is only going to see the mean meeting and mode.

11
00:00:50,910 --> 00:00:56,820
B shifted the range and interquartile range and standard deviation for that matter will still stay the

12
00:00:56,820 --> 00:00:57,360
same.

13
00:00:57,480 --> 00:01:06,030
So if we shift the data set by some constant K, then the mean and let's say the shift is adding K to

14
00:01:06,030 --> 00:01:12,630
every value in the data set, then the mean of this new shifted data set will be six plus K.

15
00:01:12,660 --> 00:01:14,820
In other words, the mean will change.

16
00:01:14,820 --> 00:01:21,270
The median will also be seven plus K, the median will change and the mode will change.

17
00:01:21,270 --> 00:01:29,310
The mode will be three plus K, but the range and the interquartile range won't be affected by the shift

18
00:01:29,310 --> 00:01:31,440
of adding K to the data set.

19
00:01:31,440 --> 00:01:37,320
The range and interquartile range will still be ten and eight and the standard deviation is also not

20
00:01:37,320 --> 00:01:37,860
affected.

21
00:01:37,860 --> 00:01:42,840
So the standard deviation will still just be equivalent to the standard deviation from the original

22
00:01:42,840 --> 00:01:43,560
data set.

23
00:01:43,560 --> 00:01:50,190
And the reason for that, if we think about it, we could sketch a hypothetical probability distribution

24
00:01:50,190 --> 00:01:51,930
for the original data set.

25
00:01:51,930 --> 00:01:55,980
Let's say that the distribution for the original set looks something like this.

26
00:01:55,980 --> 00:02:02,130
So this is the probability distribution for this set of data, in which case we could maybe indicate

27
00:02:02,130 --> 00:02:05,670
here the mean and the standard deviation.

28
00:02:05,670 --> 00:02:09,419
So the mean in this case for this original set is six.

29
00:02:09,419 --> 00:02:15,870
And then we have our standard deviation here, shifting the data set by adding some value K to every

30
00:02:15,870 --> 00:02:22,470
point in the data set means that this whole distribution gets shifted to the right by K units.

31
00:02:22,470 --> 00:02:30,780
So we could visualize this shifted distribution here and we would say that the shift of K units is this

32
00:02:30,780 --> 00:02:31,530
distance right here.

33
00:02:31,530 --> 00:02:39,330
So this is a shift of K, and so we would have our new distribution and we would show there it's mean

34
00:02:39,330 --> 00:02:40,800
and standard deviation.

35
00:02:40,800 --> 00:02:46,380
In other words, let's say that some of the values in our original data set, we see that the mode is

36
00:02:46,380 --> 00:02:46,710
three.

37
00:02:46,710 --> 00:02:52,470
So we know that this original dataset has to include values of three, the median is seven.

38
00:02:52,470 --> 00:02:55,560
So the data set might include values of seven, it might not.

39
00:02:55,560 --> 00:03:01,890
But let's just say that some of the data points in this original data set are three, three, seven,

40
00:03:01,890 --> 00:03:05,640
ten, 12 and those are just a few examples.

41
00:03:05,640 --> 00:03:13,620
If we add some value of K to each data point in the data set, then three of course is going to become

42
00:03:14,040 --> 00:03:23,040
three plus K, So this will be three plus K, this is going to be seven plus K and we'll have ten plus

43
00:03:23,070 --> 00:03:30,900
K and here 12 plus K, And these then are the values in the new shifted dataset.

44
00:03:30,900 --> 00:03:37,920
So if we call this data set X and we call this data set Y, then these are the values in the dataset

45
00:03:37,920 --> 00:03:40,770
X and these are the values in the data set Y.

46
00:03:40,770 --> 00:03:46,560
If we knew that K was equal to, let's say, five, then we would know that these values were eight,

47
00:03:46,560 --> 00:03:49,020
eight, 12, 15 and 17.

48
00:03:49,020 --> 00:03:55,050
But just for some generic K, we can express the values in the shifted data set is three plus K, seven

49
00:03:55,050 --> 00:04:01,800
plus K, etc. And so practically that means that every value in our original data set, if we can think

50
00:04:01,800 --> 00:04:08,010
about maybe a data point here, maybe that's the value three in the original data set, maybe we have

51
00:04:08,010 --> 00:04:10,230
a data point here of seven.

52
00:04:10,230 --> 00:04:19,860
Then when we add K to that value, we're going to shift over to the corresponding value three plus K

53
00:04:20,160 --> 00:04:27,690
right here in the new data set, we're going to shift over a distance of K to this new value in the

54
00:04:27,690 --> 00:04:28,560
new data set.

55
00:04:28,560 --> 00:04:35,040
And so because of that shift, we can see how the mean is going to move from the mean in the original

56
00:04:35,040 --> 00:04:43,200
data set to that mean plus K to get to this mean in the second data set in the shifted data set, the

57
00:04:43,200 --> 00:04:48,840
median will also move because the whole data set moves over and the mode just represents a single point

58
00:04:48,840 --> 00:04:49,350
in the set.

59
00:04:49,350 --> 00:04:55,620
So if this was the point representing the mode right here, when we shift the data set over, of course

60
00:04:55,620 --> 00:04:57,390
that mode is going to shift as well.

61
00:04:57,390 --> 00:04:59,720
But you can imagine that the range and.

62
00:04:59,850 --> 00:05:04,950
The interquartile range won't change because the spread of the data doesn't move.

63
00:05:04,980 --> 00:05:11,730
The whole set just gets shifted over by the same amount, but the width of this probability distribution

64
00:05:11,730 --> 00:05:13,230
won't change at all.

65
00:05:13,230 --> 00:05:19,200
If the range here was ten and let's say the range of ten spans from the lowest value in the set, which

66
00:05:19,200 --> 00:05:22,230
maybe is two to the highest value, which may be is 12.

67
00:05:22,230 --> 00:05:23,820
And that's why we're getting a range of ten.

68
00:05:23,820 --> 00:05:27,060
Let's say that the minimum and maximum values in this set are two and 12.

69
00:05:27,060 --> 00:05:28,290
So we have a range of ten.

70
00:05:28,290 --> 00:05:36,510
If K is five, then two and 12 become seven and 17, then the range is still ten because the spread

71
00:05:36,510 --> 00:05:37,710
of the data is still the same.

72
00:05:37,710 --> 00:05:42,930
We just went from 2 to 12 over to 7 to 17 and the same with the IQ.

73
00:05:42,930 --> 00:05:43,080
R.

74
00:05:43,110 --> 00:05:45,000
The IQ r is also a measure of spread.

75
00:05:45,000 --> 00:05:50,760
It's not going to change because the width of the data distribution doesn't change when we shift the

76
00:05:50,760 --> 00:05:52,710
data set by some constant K.

77
00:05:52,740 --> 00:05:58,380
So that's the idea of shifting a data set, the idea of scaling a data set.

78
00:05:58,380 --> 00:06:03,750
So let's say we start with again this same data set with the same values.

79
00:06:03,750 --> 00:06:11,310
So the mean is six, median is seven, mode is three, the range is ten eight and some generic standard

80
00:06:11,310 --> 00:06:12,030
deviation.

81
00:06:12,180 --> 00:06:13,920
So we have our original data set.

82
00:06:13,950 --> 00:06:21,240
If we scale the data set, meaning instead of adding some positive constant K to create a shift, we're

83
00:06:21,240 --> 00:06:24,060
going to multiply by some constant k.

84
00:06:24,090 --> 00:06:30,870
For instance, if K is two, that means we're going to double every value in the original data set to

85
00:06:30,870 --> 00:06:32,370
get the scaled data set.

86
00:06:32,370 --> 00:06:39,930
If K is one half, that means we're going to divide in half or have every value in the original data

87
00:06:39,930 --> 00:06:40,320
set.

88
00:06:40,320 --> 00:06:48,270
So in that case then the scaled data set, if we're scaling by some value, K just like with the shift,

89
00:06:48,270 --> 00:06:51,240
the mean median and mode will all get scaled.

90
00:06:51,240 --> 00:06:57,720
So the mean now will be given by six K, the median will be given by seven K, the mode will be given

91
00:06:57,720 --> 00:06:58,860
by three K.

92
00:06:58,860 --> 00:07:06,030
But here's the difference now the range and the interquartile range are also affected by scaling, even

93
00:07:06,030 --> 00:07:07,680
though they aren't affected by shifting.

94
00:07:07,680 --> 00:07:14,400
So the range now will be ten K and the interquartile range will be eight K, If the original range in

95
00:07:14,400 --> 00:07:19,950
interquartile range were ten and eight, The standard deviation is also affected by the scaling.

96
00:07:19,950 --> 00:07:23,940
So the standard deviation will also need to be multiplied by K.

97
00:07:23,940 --> 00:07:26,550
And we can see why this scaling is true.

98
00:07:26,550 --> 00:07:31,530
Because if we took a super simple data set, let's say we started with a data set, there's just two

99
00:07:31,530 --> 00:07:34,200
data points which are five and six.

100
00:07:34,200 --> 00:07:40,560
So not the set described by these values here, but just a two data point data set, one values five,

101
00:07:40,560 --> 00:07:41,730
the others six.

102
00:07:41,730 --> 00:07:48,360
If we say that K is two and we scale up our data set by a factor of two, then our new data set is ten

103
00:07:48,360 --> 00:07:49,530
and 12.

104
00:07:49,620 --> 00:07:52,380
Well, the mean over here is five and one half.

105
00:07:52,380 --> 00:07:54,240
The mean over here is 11.

106
00:07:54,240 --> 00:07:59,430
So we can see that the mean also doubles in the same way that the actual data itself doubled.

107
00:07:59,430 --> 00:08:02,100
The median over here is five and a half.

108
00:08:02,100 --> 00:08:04,080
The median over here is 11.

109
00:08:04,080 --> 00:08:05,670
So that doubled as well.

110
00:08:05,730 --> 00:08:11,070
The mode there is no mode, but we can see that even if there was a mode.

111
00:08:11,070 --> 00:08:13,860
So let's say there was some other value here of five.

112
00:08:13,860 --> 00:08:15,180
Now the mode is five.

113
00:08:15,180 --> 00:08:21,210
The new data set would be ten, ten, 12, the mode would be ten in the scale data set compared to five

114
00:08:21,210 --> 00:08:24,000
in the original data set, it got doubled as well.

115
00:08:24,150 --> 00:08:26,610
But then here's where we see the range.

116
00:08:26,610 --> 00:08:32,760
So ignoring this again here, the range is one because six minus five is one.

117
00:08:32,760 --> 00:08:38,280
And when we double those values, the range doubles from 1 to 2 because 12 minus ten is two.

118
00:08:38,280 --> 00:08:39,590
So the range is affected.

119
00:08:39,630 --> 00:08:44,039
The interquartile range, we don't really have enough to calculate here, but we can see that if the

120
00:08:44,039 --> 00:08:48,510
range expands, then of course the interquartile range is also going to expand.

121
00:08:48,510 --> 00:08:50,850
And then our standard deviation, same thing.

122
00:08:50,850 --> 00:08:53,160
It's also a measure of spread.

123
00:08:53,190 --> 00:08:58,080
It's going to be affected by the scaling and we see that with the data distribution.

124
00:08:58,080 --> 00:09:03,120
So let's say that this is the distribution of our original data set.

125
00:09:03,300 --> 00:09:10,680
We could identify here the mean and then the standard deviation in this original set, scaling the data

126
00:09:10,680 --> 00:09:12,510
set by some factor.

127
00:09:12,510 --> 00:09:19,110
If K is greater than one, that means we're increasing all of the values in the set.

128
00:09:19,110 --> 00:09:24,270
And so what that's going to do is stretch out this distribution horizontally.

129
00:09:24,270 --> 00:09:29,220
It's almost as if we grab the right hand side of this distribution and we pull it to the right so that

130
00:09:29,220 --> 00:09:30,960
this whole thing stretches out.

131
00:09:30,990 --> 00:09:34,590
You can imagine as we stretch it out, it's going to get flatter.

132
00:09:34,590 --> 00:09:40,740
The vertical height of it will decrease because we have the same amount of area here that we're working

133
00:09:40,740 --> 00:09:43,020
with, the same amount of area under the curve.

134
00:09:43,290 --> 00:09:48,030
And if we stretch this out to the right, we're just distributing it over a larger interval, over a

135
00:09:48,030 --> 00:09:49,320
larger range.

136
00:09:49,320 --> 00:09:56,310
So that stretched out distribution might look something like this with its mean and standard deviation.

137
00:09:56,310 --> 00:09:59,550
And we can see here with this stretch, notice how this.

138
00:09:59,600 --> 00:10:04,200
Standard deviation itself actually gets stretched, this standard deviation.

139
00:10:04,220 --> 00:10:08,900
Here we have a shorter distance, whereas in the stretched data set, the standard deviation gets stretched

140
00:10:08,900 --> 00:10:09,330
out.

141
00:10:09,350 --> 00:10:16,460
We can see here too, if we think about this point here where the boundary of that single standard deviation

142
00:10:16,460 --> 00:10:23,790
intersects the curve and maybe the symmetric point right here, we could see that width.

143
00:10:23,810 --> 00:10:26,740
If we look at the same width along this curve.

144
00:10:26,750 --> 00:10:28,400
So maybe that's this point.

145
00:10:28,400 --> 00:10:36,380
And then roughly, let's say this point right here and we connect those, we can see how the width of

146
00:10:36,380 --> 00:10:42,050
just one standard deviation around the mean is larger than this width of one standard deviation around

147
00:10:42,050 --> 00:10:42,560
the mean.

148
00:10:42,560 --> 00:10:47,660
So everything about the spread, the range, the interquartile range and the standard deviation are

149
00:10:47,660 --> 00:10:48,620
going to increase.

150
00:10:48,620 --> 00:10:54,170
They're going to stretch out by whatever factor K is indicating if K is less than one.

151
00:10:54,200 --> 00:10:58,790
Of course, then this original distribution gets compressed even further, which means it's going to

152
00:10:58,790 --> 00:11:01,840
get taller instead of shorter.

153
00:11:01,850 --> 00:11:06,590
This way it's going to get taller and get compressed into a narrower range.

154
00:11:06,590 --> 00:11:12,260
But for values of K greater than one, we stretch out the distribution and all of those measures of

155
00:11:12,260 --> 00:11:14,410
spread get stretched out as well.

156
00:11:14,420 --> 00:11:21,860
So the takeaway here is just to realize that only mean median and mode are affected by a shift.

157
00:11:21,860 --> 00:11:28,280
But all of these measures mean median mode and range I.Q., R and standard deviation are all affected

158
00:11:28,280 --> 00:11:29,660
by scaling.

159
00:11:29,660 --> 00:11:35,540
So with that in mind, let's look at sort of a real world example so that we can understand how this

160
00:11:35,540 --> 00:11:37,190
affects data in real life.

161
00:11:37,490 --> 00:11:44,210
In this example, let's say that we're running a dropshipping business, so we're not the manufacturer

162
00:11:44,210 --> 00:11:46,250
who's actually creating the product.

163
00:11:46,250 --> 00:11:52,070
We have a separate manufacturer, they are producing the product, but then they send it to us and our

164
00:11:52,070 --> 00:11:54,740
responsibility is to just ship it out.

165
00:11:54,740 --> 00:11:59,930
So we are paying the manufacturer for the privilege of that shipping business.

166
00:11:59,930 --> 00:12:05,390
So we're getting paid by the manufacturer to ship out their product.

167
00:12:05,390 --> 00:12:11,090
But they're also asking us to pay a small upfront fee for the privilege of doing business with them

168
00:12:11,090 --> 00:12:14,600
and so that they're not sending us a bunch of product to ship.

169
00:12:14,600 --> 00:12:19,880
Then we fail to ship it and they get left with a bunch of us shipped product and lose a bunch of money.

170
00:12:19,880 --> 00:12:27,350
So the arrangement that we've agreed on here is that we will pay the manufacturer $2 per package or

171
00:12:27,350 --> 00:12:34,850
per item and they will pay us, or we will receive $10 for every pound of product that we ship out.

172
00:12:34,850 --> 00:12:40,370
So what we know about the product that we're getting from the manufacturer is that the items that they

173
00:12:40,370 --> 00:12:45,470
manufacture and the things that they want us to ship come in only three weights.

174
00:12:45,470 --> 00:12:50,000
There's a £1 product, a £2 product and a £5 product.

175
00:12:50,000 --> 00:12:56,690
So what we do is we create this discrete random variable X that models the weight of product.

176
00:12:56,690 --> 00:13:00,470
So X can only take on the values one, two or five.

177
00:13:00,470 --> 00:13:02,270
There are no in between values.

178
00:13:02,270 --> 00:13:05,990
There's no one and one half pound package, there's no £4 package.

179
00:13:05,990 --> 00:13:07,730
We only have the £1 package.

180
00:13:07,730 --> 00:13:11,330
And then maybe this is a two item bundle in a five item bundle.

181
00:13:11,330 --> 00:13:16,700
But the package weights that we get can only be a £1, £2 or £5 package.

182
00:13:16,700 --> 00:13:22,700
And these are the rates at which customers purchase these items or these bundles.

183
00:13:22,700 --> 00:13:32,660
So 60% of customers purchase the £1 item, £1 package, 30% of customers purchase the £2 bundle and

184
00:13:32,660 --> 00:13:39,170
10% of customers purchase the £5 bundle, which means that the manufacturer, when they are sending

185
00:13:39,170 --> 00:13:45,980
us product to ship out, 60% of what we're getting from them is these little £1 packages, 30% is the

186
00:13:45,980 --> 00:13:49,280
£2 packages and 10% is the £5 packages.

187
00:13:49,280 --> 00:13:55,010
So we can say the probability of us receiving from the manufacturer and shipping out to the customer.

188
00:13:55,010 --> 00:13:58,820
Any particular item here is given by these values.

189
00:13:58,820 --> 00:14:06,140
What we want to do is calculate a mean or an expected value and a standard deviation value for the amount

190
00:14:06,140 --> 00:14:10,340
of money we can expect to make based on this payment structure.

191
00:14:10,340 --> 00:14:16,940
So in order to do that, the first thing that we want to do is compute the expected value of the number

192
00:14:16,940 --> 00:14:22,910
of pounds were sending out to customers the weight of all the product that we're shipping to customers.

193
00:14:22,910 --> 00:14:29,990
So what we can say is that our expected value, the expected value of our variable x here, which models

194
00:14:29,990 --> 00:14:35,270
the weight of product, is going to be the mean of this variable here.

195
00:14:35,270 --> 00:14:40,490
And remember that when we have a discrete random variable like this, what we have to do is find the

196
00:14:40,490 --> 00:14:47,600
weighted mean, which means that we have to say for the £1 packages, there's a 60% chance that we're

197
00:14:47,600 --> 00:14:50,480
sending out one of those for the £2 packages.

198
00:14:50,480 --> 00:14:53,840
There's a 30% chance we're sending out one of those.

199
00:14:53,960 --> 00:14:59,450
And for the £5 packages, there's a 10% chance that we're shipping out.

200
00:14:59,630 --> 00:15:01,250
One of those packages.

201
00:15:01,250 --> 00:15:13,730
So when we multiply here, we get 0.6 plus 0.6 plus 0.5 or 1.7, which means that on average for every

202
00:15:13,730 --> 00:15:20,870
package we ship out, we're shipping out about £1.7 of product, even though the only values we're actually

203
00:15:20,870 --> 00:15:24,010
shipping out are £1, £2 and £5 packages.

204
00:15:24,020 --> 00:15:31,160
If we average out all the packages we're shipping, our mean weight is £1.7, then our variance.

205
00:15:32,010 --> 00:15:37,440
For this discrete random variable is going to be the difference between each of these weights one,

206
00:15:37,440 --> 00:15:39,270
two and five and the mean.

207
00:15:39,270 --> 00:15:41,760
So we'll say we'll take the first weight here.

208
00:15:41,760 --> 00:15:44,790
We'll say one minus the mean of 1.7.

209
00:15:44,790 --> 00:15:49,860
We square that value and we multiply it by the probability of that particular weight.

210
00:15:49,860 --> 00:15:57,330
So 0.6 and then we do that for all of the weights that we have, all of the values that X can take on.

211
00:15:57,330 --> 00:15:59,220
So we say here to.

212
00:15:59,890 --> 00:16:07,240
Minus the mean 1.7 quantity squared, and then multiply that by the probability 0.3.

213
00:16:07,390 --> 00:16:14,320
And then the last one is this last value x can take on five minus the mean of 1.7.

214
00:16:14,740 --> 00:16:19,870
We square that and multiply by the probability of a £5 package, 0.1.

215
00:16:20,020 --> 00:16:25,150
Now if we do that math, one -1.7 is -0.7.

216
00:16:25,150 --> 00:16:33,880
When we square that, we get positive 0.49 times 0.62 -1.7 is 0.3.

217
00:16:33,880 --> 00:16:36,730
When we square that, we get 0.09.

218
00:16:36,730 --> 00:16:44,560
So 0.09 times 0.3 and five -1.7 is 3.3.

219
00:16:44,560 --> 00:16:49,870
When we square that, we get 10.8, nine times 0.1.

220
00:16:49,870 --> 00:16:53,590
That's going to give us a value of 1.41.

221
00:16:53,590 --> 00:16:59,050
And when we take the square root of that to get standard deviation, we find a value of approximately

222
00:16:59,290 --> 00:17:00,550
1.19.

223
00:17:00,550 --> 00:17:07,720
So that's our standard deviation for this discrete random variable x modeling the weight of the amount

224
00:17:07,720 --> 00:17:09,099
of product we're shipping out.

225
00:17:09,099 --> 00:17:14,680
But remember, the whole idea here is that we want to figure out how much money we're making when we're

226
00:17:14,680 --> 00:17:21,130
getting paid per pound of product, but we're also sending the manufacturer $2 for every individual

227
00:17:21,130 --> 00:17:23,109
package that they give us to ship.

228
00:17:23,109 --> 00:17:31,990
So what we could do is we could set up a net gain equation, we'll call it here, capital N for net.

229
00:17:31,990 --> 00:17:33,790
We'll think about this as profit or loss.

230
00:17:33,790 --> 00:17:41,860
So net gain of our discrete random variable X and that's going to be equal to we'll write this as ten

231
00:17:42,100 --> 00:17:47,560
X because remember X models the number of pounds, it models the weight in pounds.

232
00:17:47,560 --> 00:17:55,060
So if X is pounds and we're getting paid $10 from the manufacturer to ship each pound, then the amount

233
00:17:55,060 --> 00:18:02,260
of money that we're going to make is given by ten X, except that we then have to subtract two from

234
00:18:02,260 --> 00:18:08,530
this net gain equation because we have to pay the manufacturer $2 for every product they give us.

235
00:18:08,530 --> 00:18:14,920
So if we then take this net gain equation and we evaluate it at all of the values that X can take on

236
00:18:14,920 --> 00:18:23,140
one, two and five we get when X is one, we get ten times one is ten, minus two is eight.

237
00:18:23,650 --> 00:18:32,140
When x is two for a £2 package we get ten times two is 20, minus two is 18.

238
00:18:32,530 --> 00:18:41,740
And for one of the £5 packages, when x is five, we get ten times five is 50, minus two is 48.

239
00:18:41,740 --> 00:18:51,610
So what this is saying then is that our net profit is $8, our net gain is $8 for every £1 package that

240
00:18:51,610 --> 00:18:58,420
we ship, which makes sense because it's a £1 package, the manufacturer is paying us $10 per pound

241
00:18:58,420 --> 00:19:02,350
that we ship, which means that we're going to get ten bucks from the manufacturer for shipping that

242
00:19:02,350 --> 00:19:03,340
£1 product.

243
00:19:03,340 --> 00:19:07,090
But we also had to pay them $2 for that individual product.

244
00:19:07,090 --> 00:19:13,840
So ten minus two, we get eight in contrast here, a £5 package because it's £5, they're paying us

245
00:19:13,840 --> 00:19:15,070
$10 per pound.

246
00:19:15,070 --> 00:19:21,820
We would make $50, except that for that one individual package, we paid them $2.

247
00:19:21,820 --> 00:19:25,270
So instead of making $50, we make $48.

248
00:19:25,270 --> 00:19:33,100
So now with these new values, we can set up a new probability distribution like we had over here instead

249
00:19:33,100 --> 00:19:36,070
of X and the probability of X.

250
00:19:36,100 --> 00:19:41,350
We'll look at this as N and the probability of N.

251
00:19:41,380 --> 00:19:48,430
In other words, we can think about N as a new discrete random variable that has been scaled and shifted.

252
00:19:48,430 --> 00:19:55,930
So the values that n can take on are 818 and 48 in the same way that X could take on the values of one,

253
00:19:55,930 --> 00:19:57,010
two and five.

254
00:19:57,220 --> 00:20:07,420
So we want to say here 818 and 48 and now we want to talk about the probability of each of these dollar

255
00:20:07,420 --> 00:20:08,080
amounts.

256
00:20:08,080 --> 00:20:11,200
And of course those probabilities are still going to be the same.

257
00:20:11,200 --> 00:20:13,630
The manufacturer is sending us product.

258
00:20:13,630 --> 00:20:17,350
60% of that product is still these £1 packages.

259
00:20:17,350 --> 00:20:21,550
So there's a 60% chance that we make $8.

260
00:20:21,550 --> 00:20:29,380
There's a 30% chance that we make $18 and a 10% chance that we make $48.

261
00:20:29,380 --> 00:20:35,770
So now if we want to find the mean and standard deviation of this new discrete random variable n we

262
00:20:35,770 --> 00:20:42,880
could of course, do the same thing we did before and use this distribution table to calculate the expected

263
00:20:42,880 --> 00:20:45,640
value and the standard deviation from scratch.

264
00:20:45,640 --> 00:20:52,990
Or we could use what we just learned about transforming random variables by shifting and scaling to

265
00:20:52,990 --> 00:20:58,630
just transform the mean and standard deviation we already calculated so.

266
00:20:58,690 --> 00:21:06,220
If you remember, we said that the mean was affected by shifting and it was also affected by scaling.

267
00:21:06,220 --> 00:21:10,270
What we can do then is say that our new mean.

268
00:21:10,270 --> 00:21:16,180
So instead of mu sub x, which represents the mean of the original discrete random variable, x will

269
00:21:16,180 --> 00:21:24,640
say that mu sub n the mean representing this new discrete random variable n has to be equal to remember

270
00:21:24,640 --> 00:21:32,740
we set up this equation for n in terms of x, so instead of ten times x minus two, we'll say ten times

271
00:21:32,740 --> 00:21:34,450
the original mean.

272
00:21:34,450 --> 00:21:37,330
So mu sub x and then minus two.

273
00:21:37,360 --> 00:21:43,720
And we include the ten and we include the minus two because the mean is affected by the scaling of ten

274
00:21:43,720 --> 00:21:46,180
and also by the shifting of two.

275
00:21:46,210 --> 00:21:49,810
So we can just plug 1.7.

276
00:21:51,110 --> 00:21:56,840
Into this equation and we get 17 minus two or 15.

277
00:21:57,170 --> 00:22:02,300
So the new mean, the mean here for this data distribution is 15.

278
00:22:02,300 --> 00:22:08,390
And of course we would find that same value if we used this same calculation we did before, where we

279
00:22:08,390 --> 00:22:20,690
take eight and multiply it by 0.6 plus 18 times 0.3 plus 48 times 0.1.

280
00:22:20,690 --> 00:22:22,640
So we could have calculated it that way.

281
00:22:22,640 --> 00:22:28,310
But instead of going through all that math, we can just scale and shift the mean we already found since

282
00:22:28,310 --> 00:22:33,380
n is just a shifted and scaled version of the original variable X.

283
00:22:33,380 --> 00:22:35,960
And then the same thing goes for the standard deviation.

284
00:22:35,960 --> 00:22:40,970
Except remember that standard deviation is only affected by scaling.

285
00:22:40,970 --> 00:22:43,250
It's not affected by shifting.

286
00:22:43,400 --> 00:22:50,480
So the standard deviation of this new discrete random variable n instead of plugging it in here to ten

287
00:22:50,480 --> 00:22:57,980
x minus two and replacing x with the standard deviation of x to say ten times the standard deviation

288
00:22:57,980 --> 00:23:04,700
of x minus two, we will ignore the minus two because the standard deviation isn't going to be affected

289
00:23:04,700 --> 00:23:06,770
by this shift of minus two.

290
00:23:06,770 --> 00:23:12,770
So the new standard deviation is simply ten times the old standard deviation.

291
00:23:12,770 --> 00:23:21,440
With respect to X, we know that that was 1.19, so this is approximately equal to ten times 1.19 or

292
00:23:21,440 --> 00:23:24,740
about 11.9.

293
00:23:24,740 --> 00:23:30,140
And of course, just like before, we could have found that the old fashioned way, we could have said

294
00:23:30,140 --> 00:23:39,140
here our data point eight minus the mean that we calculated 15 quantity squared times the probability

295
00:23:39,140 --> 00:23:43,880
of that particular value eight and then plus 18.

296
00:23:44,680 --> 00:23:49,570
Minus the mean of 15, square it, multiply it by the probability.

297
00:23:49,570 --> 00:23:51,700
And then the last one here, 48.

298
00:23:52,820 --> 00:23:54,710
Minus the mean of 15.

299
00:23:54,890 --> 00:23:57,440
Square it and multiply it by the probability.

300
00:23:57,440 --> 00:24:02,240
We could have done that whole calculation to get variance and then taking the square root of that variance

301
00:24:02,240 --> 00:24:03,800
to get standard deviation.

302
00:24:03,800 --> 00:24:07,340
And we would have found the same value here of approximately 11.9.

303
00:24:07,340 --> 00:24:14,600
But there's no need to go through all that work since n is just a data set under transformation by shifting

304
00:24:14,600 --> 00:24:17,660
and scaling from this original data set X.

305
00:24:17,660 --> 00:24:24,890
So whereas X modeled the weight that we were shipping out and models the amount of money that we make

306
00:24:24,890 --> 00:24:32,510
for doing that shipping and these values we calculate it for X tells us that on average the mean weight

307
00:24:32,510 --> 00:24:40,100
of each package that we ship is £1.7 with a standard deviation of £1.19.

308
00:24:40,100 --> 00:24:46,490
And then with that we can say that the mean amount of money we make for every package we ship out,

309
00:24:46,490 --> 00:24:50,390
we make on average a mean of $15.

310
00:24:50,390 --> 00:24:58,670
Even though for any given package, we will only ever make either $8 or $18 or $48 with no values in

311
00:24:58,670 --> 00:24:59,270
between.

312
00:24:59,270 --> 00:25:04,430
Our profit will only ever be one of these three values for an individual package.

313
00:25:04,430 --> 00:25:09,860
But when we take the mean there, when we look at the long term average, based on the fact that 60%

314
00:25:09,860 --> 00:25:16,340
of the packages we ship net us $8, that 30% of the packages we ship net US $18, and that 10% of the

315
00:25:16,340 --> 00:25:18,680
packages we ship net US $48.

316
00:25:18,680 --> 00:25:27,950
The mean amount of profit per package is $15 with a standard deviation of just under $12.

317
00:25:27,950 --> 00:25:34,310
And we were able to get all of this information here about the amount of money we make modeled by DN,

318
00:25:34,340 --> 00:25:40,730
Just by applying a scale and a shift to this X variable we already have.

319
00:25:40,730 --> 00:25:47,180
Instead of collecting all new data about the profit per packages and the probability of each of these

320
00:25:47,180 --> 00:25:53,960
amounts of profits and then calculating from scratch this mean here and this variance here, and then

321
00:25:53,960 --> 00:25:55,520
therefore standard deviation.

322
00:25:55,520 --> 00:26:02,120
So you can see how understanding this transformation of random variables by scaling and shifting can

323
00:26:02,120 --> 00:26:05,960
save us a lot of time answering real world questions.

