1
00:00:00,120 --> 00:00:04,830
Next, we want to talk about a really important probability distribution because it comes up all the

2
00:00:04,830 --> 00:00:09,330
time in statistics, and that is the continuous uniform distribution.

3
00:00:09,540 --> 00:00:11,220
Now it looks like this.

4
00:00:11,220 --> 00:00:12,420
It's really simple.

5
00:00:12,420 --> 00:00:17,850
This is a simple distribution where the probability density function associated with this distribution

6
00:00:17,850 --> 00:00:25,650
is completely off or at zero for all values of x until we get to a So everything to the left of x equals

7
00:00:25,650 --> 00:00:27,450
a here is it zero.

8
00:00:27,450 --> 00:00:33,930
And then at x equals A, suddenly we see the distribution jump up to this level here.

9
00:00:34,080 --> 00:00:41,160
Then it b it immediately instantaneously drops down back to zero again and remains at zero.

10
00:00:41,190 --> 00:00:45,300
These vertical dashed lines are not part of the distribution.

11
00:00:45,300 --> 00:00:51,330
The reason they're there is to show us that this part of the distribution up here starts exactly at

12
00:00:51,330 --> 00:00:58,710
a and ends exactly at B, But the distribution itself just has this zero value to the left of A, then

13
00:00:58,710 --> 00:01:05,670
this value up here between A and B and then again becomes zero at B and stays at zero for all other

14
00:01:05,670 --> 00:01:07,500
values of X one.

15
00:01:07,500 --> 00:01:13,110
Application of this kind of continuous uniform distribution is this idea of voltage.

16
00:01:13,110 --> 00:01:20,040
Think about turning on a light switch When the light is off, the voltage being supplied is zero, and

17
00:01:20,040 --> 00:01:26,070
then suddenly if we flip the light switch on at a the voltage jumps up to this level here and then if

18
00:01:26,070 --> 00:01:30,180
we turn the light switch off at B, it drops down again to zero.

19
00:01:30,210 --> 00:01:34,880
That's kind of one way to remember this off, on off kind of pattern.

20
00:01:34,890 --> 00:01:41,520
Now, before we go further with this uniform distribution, let's compare and contrast this distribution

21
00:01:41,640 --> 00:01:46,590
with the one that we looked at before when we talked about discrete uniform distributions.

22
00:01:46,590 --> 00:01:53,310
If you remember, this is the probability mass function that is associated with rolling a six sided

23
00:01:53,310 --> 00:01:54,570
die one time.

24
00:01:54,570 --> 00:02:00,030
And this represents the discrete uniform distribution of that die roll.

25
00:02:00,030 --> 00:02:06,780
So when we have a discrete random variable and its probability mass function and we want to sketch its

26
00:02:06,780 --> 00:02:12,720
probability distribution, it's going to look like this where we have these vertical bars or columns,

27
00:02:12,720 --> 00:02:16,860
all of equal height at each of the values that X can take on.

28
00:02:16,860 --> 00:02:23,820
So all of these bars or columns in red that represent the probability are vertical, whereas with a

29
00:02:23,820 --> 00:02:30,270
continuous random variable where we have a continuous uniform distribution, all of the pieces of our

30
00:02:30,270 --> 00:02:33,210
probability density function are horizontal.

31
00:02:33,240 --> 00:02:39,450
This section of the probability density function between x equals zero and x equals a is horizontal.

32
00:02:39,480 --> 00:02:42,420
This piece of it here between A and B is horizontal.

33
00:02:42,420 --> 00:02:47,430
This piece here starting at B and extending to the right of B is also horizontal.

34
00:02:47,430 --> 00:02:52,890
And that makes sense because when we have a continuous random variable, remember we can always define

35
00:02:52,890 --> 00:02:59,880
smaller and smaller increments of this continuous random variable x, so we can define X at A or at

36
00:02:59,880 --> 00:03:05,910
B, but we can also define X halfway between A and B, and then halfway between those values again and

37
00:03:05,910 --> 00:03:06,870
then halfway again.

38
00:03:06,870 --> 00:03:11,310
And we can continue measuring smaller and smaller increments of X.

39
00:03:11,310 --> 00:03:16,980
And so when we're talking about the probability distribution of a continuous random variable like that,

40
00:03:16,980 --> 00:03:22,860
we need to model probability along all of these values of X along this horizontal axis.

41
00:03:22,860 --> 00:03:29,190
And so we have to have these horizontal sections of the graph that can represent the value of the probability

42
00:03:29,190 --> 00:03:36,660
density function F of X at all of these different values of X along the axis, whereas it would never

43
00:03:36,660 --> 00:03:44,160
make sense to sketch a continuous uniform distribution for a discrete random variable because it would

44
00:03:44,160 --> 00:03:49,410
have to look something like this where we're showing that the probability that these values of X occurs

45
00:03:49,410 --> 00:03:56,760
is always 0.167 always consistent, but that only works at this exact value.

46
00:03:56,790 --> 00:04:01,080
X equals one right here at this exact value x equals two.

47
00:04:01,110 --> 00:04:07,890
Here at this exact value x equals three here, it doesn't make sense to show this horizontal section

48
00:04:07,890 --> 00:04:11,640
of graph in between one and two or in between two and three.

49
00:04:11,640 --> 00:04:17,459
Because with a die role where we're rolling a six sided die, of course we're never going to find the

50
00:04:17,459 --> 00:04:20,519
value one and one half or the value two and a half.

51
00:04:20,519 --> 00:04:26,190
We'll never get values in between these six discrete countable values.

52
00:04:26,190 --> 00:04:33,180
So we would never have a horizontal graph that stretches along parallel to this horizontal axis as if

53
00:04:33,180 --> 00:04:38,670
it was defining probability at all of these different values of x along the horizontal axis.

54
00:04:38,670 --> 00:04:44,730
Instead, we have to use this vertical measure to show the probability just at exactly x equals one

55
00:04:44,730 --> 00:04:51,330
and at exactly x equals to exactly x equals three, etc. Whereas up here when we have that continuous

56
00:04:51,330 --> 00:04:58,260
random variable, we need these horizontal pieces of graph to show probability all along the x axis.

57
00:04:58,590 --> 00:04:59,880
Now, with that in mind, let's.

58
00:05:00,030 --> 00:05:05,910
Talk about the probability density function for this continuous random variable x, because in the case

59
00:05:05,910 --> 00:05:11,730
of a continuous uniform distribution, we do have a continuous random variable and every continuous

60
00:05:11,730 --> 00:05:14,520
random variable has a probability density function.

61
00:05:14,730 --> 00:05:20,310
So the probability density function in the case of a continuous uniform distribution is going to be

62
00:05:20,310 --> 00:05:20,910
this function.

63
00:05:20,910 --> 00:05:22,920
Here it's always this function.

64
00:05:22,920 --> 00:05:23,670
Exactly.

65
00:05:23,670 --> 00:05:31,380
So the probability density function F of x is going to be given by one divided by B minus A when the

66
00:05:31,380 --> 00:05:38,310
continuous random variable takes on values between A and B, otherwise the function is going to be zero

67
00:05:38,310 --> 00:05:39,120
everywhere else.

68
00:05:39,120 --> 00:05:49,410
So that means zero when X is less than a so over here to the left of A or when x is greater than B,

69
00:05:49,410 --> 00:05:55,350
So over here to the right of B, so we're zero to the left of A, we're zero to the right of B, but

70
00:05:55,350 --> 00:06:01,170
between A and B, the probability density function is given by this probability here one over B minus

71
00:06:01,170 --> 00:06:05,490
A, and we can figure out why we have one over B minus A.

72
00:06:05,520 --> 00:06:11,310
If we think about what we know about probability density functions, remember that under the curve of

73
00:06:11,310 --> 00:06:17,910
a probability density function, the total area everywhere under the curve has to be equal to one.

74
00:06:17,910 --> 00:06:23,430
That was one of the requirements for something to qualify as a probability density function, which

75
00:06:23,430 --> 00:06:27,270
means that the area all this area under here.

76
00:06:27,970 --> 00:06:31,280
Has to sum up geometrically to one.

77
00:06:31,300 --> 00:06:35,240
And of course, we can see that this is a rectangular shape here.

78
00:06:35,260 --> 00:06:38,800
So the area of this rectangle has to be equal to one.

79
00:06:39,160 --> 00:06:45,490
Well, we know from geometry that the area of a rectangle is equal to the length times the height.

80
00:06:45,520 --> 00:06:50,710
Well, if we look at the length of the rectangle in this case, let's call that the base here of the

81
00:06:50,710 --> 00:06:57,530
rectangle between A and B, We know that this width, this length is going to be B minus A.

82
00:06:57,550 --> 00:07:01,070
Imagine that A is three and that B is five.

83
00:07:01,090 --> 00:07:06,310
We can see right away that the length of this base here is two, because to get from 3 to 5, that's

84
00:07:06,310 --> 00:07:08,040
a width there of two.

85
00:07:08,050 --> 00:07:11,850
So to get the width of two we can see that we just have to take five minus three.

86
00:07:11,860 --> 00:07:16,510
Well, even if we don't know the values of A and B, we can just say that that width, the width of

87
00:07:16,510 --> 00:07:18,310
the base there is B minus A.

88
00:07:18,580 --> 00:07:21,460
So we can say here that this length is.

89
00:07:22,120 --> 00:07:28,330
B minus A, and we don't know the height yet, but we know that the area of this rectangle has to be

90
00:07:28,330 --> 00:07:34,870
one in order for us to have a probability density function, which means that when we divide both sides

91
00:07:34,870 --> 00:07:41,080
of this equation by B minus A, we're just left with height over here on the right hand side and we

92
00:07:41,080 --> 00:07:45,700
get one over B minus A is equal to the height.

93
00:07:45,970 --> 00:07:51,490
And so what that says is that in order for this to be a probability density function, the height of

94
00:07:51,490 --> 00:08:00,130
this rectangle here has to be one over B minus A, and that's why we see the height over here along

95
00:08:00,130 --> 00:08:06,430
the vertical axis given as one over B minus A, and that's why our probability density function gives

96
00:08:06,430 --> 00:08:09,290
this value here as one over B minus A.

97
00:08:09,340 --> 00:08:15,040
So if we have a continuous uniform distribution with this kind of probability density function, where

98
00:08:15,040 --> 00:08:18,640
the height here of this distribution is one over B minus A.

99
00:08:18,670 --> 00:08:25,090
Keep in mind that this is such a simple distribution that will often see this continuous random variable

100
00:08:25,090 --> 00:08:31,120
x written this way with a capital U as the uniform distribution.

101
00:08:32,179 --> 00:08:39,200
Over A to B this interval here A to B, And so then if we have values of A and B, let's say that in

102
00:08:39,200 --> 00:08:47,000
this case A is three and B is five, then we could describe the continuous random variable capital X

103
00:08:47,000 --> 00:08:52,790
as given by the continuous uniform distribution on the interval 3 to 5.

104
00:08:52,790 --> 00:08:59,720
Once we know that we have a continuous uniform distribution for our continuous random variable, then

105
00:08:59,720 --> 00:09:05,870
of course, because this is a standard distribution that we're used to seeing all the time in statistics,

106
00:09:05,870 --> 00:09:11,690
we can unlock mean variance and standard deviation formulas for this kind of distribution.

107
00:09:11,810 --> 00:09:13,850
Which are these values here?

108
00:09:13,850 --> 00:09:19,310
The mean of a continuous uniform distribution is always given by B plus A over two.

109
00:09:19,310 --> 00:09:26,960
So in this case, if A is three and B is five, the mean would be given by five, plus three is eight,

110
00:09:26,960 --> 00:09:28,940
eight divided by two is four.

111
00:09:28,940 --> 00:09:36,800
So the mean the expected value is four, which makes sense because the entire distribution is located

112
00:09:36,830 --> 00:09:44,300
here on this interval A to B and because of the uniform height of the distribution, we expect that

113
00:09:44,300 --> 00:09:50,720
mean to occur right in the center of this rectangle, which in our case is halfway between three and

114
00:09:50,720 --> 00:09:57,760
five or write it for the variance is always given by B minus a quantity squared divided by 12.

115
00:09:57,770 --> 00:10:04,070
This is a fact that we know about all continuous uniform distributions, and so we can use that formula

116
00:10:04,070 --> 00:10:05,630
to quickly find variance.

117
00:10:05,630 --> 00:10:12,650
In our case, that's five minus three is two, two squared is four, four divided by 12 is one over

118
00:10:12,650 --> 00:10:13,250
three.

119
00:10:13,250 --> 00:10:18,170
So the variance is one third or approximately 0.33.

120
00:10:18,170 --> 00:10:22,460
And then of course the standard deviation is always the square root of variance.

121
00:10:22,460 --> 00:10:27,230
So in our case, that's approximately equal to the square root of zero.

122
00:10:28,450 --> 00:10:29,530
.33.

123
00:10:29,530 --> 00:10:34,630
And just because of the fact that we know that this is a continuous uniform distribution for a continuous

124
00:10:34,630 --> 00:10:39,430
random variable, and these are formulas for the mean variance and standard deviation that have already

125
00:10:39,430 --> 00:10:41,860
been established for this kind of distribution.

126
00:10:41,860 --> 00:10:47,200
Once we know we have that kind of distribution, we unlock these and we can quickly get to mean variance

127
00:10:47,200 --> 00:10:50,560
in standard deviation for this continuous random variable.

128
00:10:50,680 --> 00:10:54,060
So that's the idea of a continuous uniform distribution.

129
00:10:54,070 --> 00:10:58,780
We just wanted to make sure that we understood this so that we could contrast it with what we learned

130
00:10:58,780 --> 00:11:05,230
earlier about the discrete uniform distribution when we were talking about discrete random variables

131
00:11:05,230 --> 00:11:10,750
versus this continuous uniform distribution when we're talking about continuous random variables.

