1
00:00:00,499 --> 00:00:03,600
An interesting random variable
associated with the Bernoulli

2
00:00:03,600 --> 00:00:06,840
process is the time
of the kth success

3
00:00:06,840 --> 00:00:09,340
or the time of the
kth arrival, depending

4
00:00:09,340 --> 00:00:12,290
on what kind of context
we have in mind.

5
00:00:12,290 --> 00:00:13,700
So the picture is as follows.

6
00:00:13,700 --> 00:00:21,040
The process starts and we wait
until the first arrival occurs,

7
00:00:21,040 --> 00:00:25,380
and the time that it occurs,
we call that time Y1.

8
00:00:25,380 --> 00:00:27,990
Then we keep
observing the process,

9
00:00:27,990 --> 00:00:31,670
and there's a time at which
a second arrival comes.

10
00:00:31,670 --> 00:00:34,080
We call that time Y2.

11
00:00:34,080 --> 00:00:37,660
The process continues, and
there is a certain time

12
00:00:37,660 --> 00:00:40,000
that the third arrival comes.

13
00:00:40,000 --> 00:00:41,740
We call that time Y3.

14
00:00:44,860 --> 00:00:49,390
Now, the time that the
first arrival comes,

15
00:00:49,390 --> 00:00:54,154
this is also what we called T1.

16
00:00:54,154 --> 00:00:56,150
T1 is this length.

17
00:00:56,150 --> 00:00:59,890
It's the time until
the first arrival.

18
00:00:59,890 --> 00:01:04,120
Let us give a name to the
time it takes from the first

19
00:01:04,120 --> 00:01:08,789
to the second arrival,
and we call that time T2,

20
00:01:08,789 --> 00:01:11,670
which is the second
inter-arrival time.

21
00:01:11,670 --> 00:01:15,600
And similarly, we
will call T3 the time

22
00:01:15,600 --> 00:01:19,710
between the second
and the third arrival.

23
00:01:19,710 --> 00:01:23,770
So we define in general Tk to
be the difference between two

24
00:01:23,770 --> 00:01:26,900
consecutive arrival times.

25
00:01:26,900 --> 00:01:29,770
And of course, the time
of the third arrival

26
00:01:29,770 --> 00:01:33,270
is the sum of T1 plus T2
plus T3, the first three

27
00:01:33,270 --> 00:01:34,880
inter-arrival times.

28
00:01:34,880 --> 00:01:39,259
And more generally, Yk is
going to be the sum of these k

29
00:01:39,259 --> 00:01:41,550
inter-arrival times.

30
00:01:41,550 --> 00:01:46,370
So in order to study the random
variable Yk and its properties,

31
00:01:46,370 --> 00:01:48,950
the way that we can
proceed is to understand

32
00:01:48,950 --> 00:01:52,250
first the random variables Ti.

33
00:01:52,250 --> 00:01:55,130
What kind of random
variables are they?

34
00:01:55,130 --> 00:01:58,850
Well, we know that T1, the
time until the first arrival,

35
00:01:58,850 --> 00:02:02,300
has a geometric distribution
with parameter p.

36
00:02:02,300 --> 00:02:04,930
Now, at the time of
the first arrival,

37
00:02:04,930 --> 00:02:07,340
the process starts fresh.

38
00:02:07,340 --> 00:02:10,009
So after this
time, there will be

39
00:02:10,009 --> 00:02:13,550
a sequence of independent
Bernoulli trials,

40
00:02:13,550 --> 00:02:16,040
and T2 will be the number
of Bernoulli trials

41
00:02:16,040 --> 00:02:19,290
it takes until an arrival.

42
00:02:19,290 --> 00:02:23,530
So T2 will also be geometric
with the same parameter, p.

43
00:02:23,530 --> 00:02:26,520
Furthermore, because the
process starts fresh,

44
00:02:26,520 --> 00:02:30,340
whatever happens in the
future after this time

45
00:02:30,340 --> 00:02:33,950
is independent from whatever
happened in the past,

46
00:02:33,950 --> 00:02:38,670
and so the random variable T2
will be independent from T1.

47
00:02:38,670 --> 00:02:41,800
And then by a
similar argument, T3

48
00:02:41,800 --> 00:02:45,110
will be independent
from T1 and T2

49
00:02:45,110 --> 00:02:49,990
and will also have the same
geometric distribution.

50
00:02:49,990 --> 00:02:53,390
Based on these
properties, we can now

51
00:02:53,390 --> 00:02:56,730
go ahead and calculate
properties of Yk.

52
00:02:56,730 --> 00:02:59,530
Yk is the sum of
random variables.

53
00:02:59,530 --> 00:03:01,810
The expected value
of Yk is the sum

54
00:03:01,810 --> 00:03:04,030
of the expected
values of the Ts.

55
00:03:04,030 --> 00:03:07,320
Each one of the Ts has
a geometric distribution

56
00:03:07,320 --> 00:03:09,270
with parameter p,
and in particular

57
00:03:09,270 --> 00:03:12,000
has a mean of 1 over p.

58
00:03:12,000 --> 00:03:15,410
By adding those means, we
obtain that the mean of Yk

59
00:03:15,410 --> 00:03:16,740
is k over p.

60
00:03:16,740 --> 00:03:19,730
Similarly, the
variance of Yk will

61
00:03:19,730 --> 00:03:21,960
be equal to the sum
of the variances

62
00:03:21,960 --> 00:03:26,620
of the Tis, the reason being
that the Tis are independent,

63
00:03:26,620 --> 00:03:28,660
and so to find the
variance of the sum,

64
00:03:28,660 --> 00:03:31,350
it's enough to just
add the variances.

65
00:03:31,350 --> 00:03:34,220
And we have a formula for
the variance of a geometric,

66
00:03:34,220 --> 00:03:36,980
and using that formula
and multiplying it by k,

67
00:03:36,980 --> 00:03:39,450
we obtain the variance of Yk.

68
00:03:39,450 --> 00:03:43,890
Finally, we would like to
calculate the PMF of Yk.

69
00:03:43,890 --> 00:03:47,430
So we would like to find
this probability here,

70
00:03:47,430 --> 00:03:53,130
the probability that Yk takes
on a specific value equal to t.

71
00:03:53,130 --> 00:03:55,610
Notice that in this
argument, we're

72
00:03:55,610 --> 00:03:58,610
thinking of k as a
fixed, given number.

73
00:03:58,610 --> 00:04:02,840
For example, we're interested in
the time of the fifth arrival.

74
00:04:02,840 --> 00:04:05,790
This is a random variable that
can take different values,

75
00:04:05,790 --> 00:04:08,510
t, and we want to
find the probabilities

76
00:04:08,510 --> 00:04:10,400
of those different values, t.

77
00:04:10,400 --> 00:04:15,140
So think of k as being fixed and
t as a parameter that varies,

78
00:04:15,140 --> 00:04:17,310
and we want to carry
out this calculation

79
00:04:17,310 --> 00:04:20,269
for all possible choices of t.

80
00:04:20,269 --> 00:04:22,320
Now, what is this event here?

81
00:04:22,320 --> 00:04:29,360
This is the event that the
kth arrival occurs at time t.

82
00:04:29,360 --> 00:04:33,720
So this means that at time
t, we have an arrival.

83
00:04:33,720 --> 00:04:36,409
But for this to be
the kth arrival,

84
00:04:36,409 --> 00:04:43,090
we must have k minus 1
arrivals in the previous time

85
00:04:43,090 --> 00:04:50,100
slots, of which there's
t minus 1 of them.

86
00:04:50,100 --> 00:04:52,695
The probability that
Yk is equal to t

87
00:04:52,695 --> 00:04:56,070
is the probability that
these two events happen, k

88
00:04:56,070 --> 00:05:01,010
minus 1 arrivals in t minus
1 slots and one arrival

89
00:05:01,010 --> 00:05:04,200
at slot number t.

90
00:05:04,200 --> 00:05:06,080
So we are looking
at the probability

91
00:05:06,080 --> 00:05:09,220
that these two events occur.

92
00:05:09,220 --> 00:05:13,460
Now this event, k minus 1
arrivals in t minus 1 slots,

93
00:05:13,460 --> 00:05:15,480
is an event that's
completely determined

94
00:05:15,480 --> 00:05:19,860
by whatever happens in the
first t minus 1 time slots,

95
00:05:19,860 --> 00:05:22,830
whereas the event of an
arrival at slot time t

96
00:05:22,830 --> 00:05:26,210
refers to whatever happens
during slot time t.

97
00:05:26,210 --> 00:05:29,900
Because of our assumptions on
the Bernoulli process, whatever

98
00:05:29,900 --> 00:05:34,080
happens during these
t minus 1 time slots

99
00:05:34,080 --> 00:05:38,270
is independent from what
happens in slot number t.

100
00:05:38,270 --> 00:05:42,140
So the probability of
these two events happening,

101
00:05:42,140 --> 00:05:46,170
because of independence,
will be the probability

102
00:05:46,170 --> 00:05:54,370
of the first event happening,
k minus 1 arrivals in time

103
00:05:54,370 --> 00:06:03,160
t minus 1, times the probability
of an arrival at time t.

104
00:06:08,980 --> 00:06:13,840
Now, the first probability is
given by the binomial formula.

105
00:06:13,840 --> 00:06:18,630
In t minus 1 time slots, we
want to have k minus 1 arrivals.

106
00:06:18,630 --> 00:06:20,960
And the binomial
formula gives us

107
00:06:20,960 --> 00:06:26,370
an exponent, p to this
power times 1 minus p

108
00:06:26,370 --> 00:06:28,510
to the power that's the
difference of these two

109
00:06:28,510 --> 00:06:30,920
numbers, which is t minus k.

110
00:06:30,920 --> 00:06:33,280
And then finally, we
multiply with the probability

111
00:06:33,280 --> 00:06:36,930
of an arrival at time
t, which is equal to p.

112
00:06:36,930 --> 00:06:41,100
This p will cancel the
exponent of minus 1 up here

113
00:06:41,100 --> 00:06:44,820
and leads us to this
formula for the probability

114
00:06:44,820 --> 00:06:48,490
that the kth arrival
happens at time t.

115
00:06:48,490 --> 00:06:52,085
Notice the range of
the random variable Yk.

116
00:06:52,085 --> 00:06:56,780
The kth arrival cannot
happen before time k.

117
00:06:56,780 --> 00:07:00,320
You need at least k time
slots to obtain k arrivals,

118
00:07:00,320 --> 00:07:03,890
so this probability
will be positive

119
00:07:03,890 --> 00:07:08,560
only starting at time
k and for future times.

120
00:07:08,560 --> 00:07:12,220
So this random variable
Yk, in general,

121
00:07:12,220 --> 00:07:17,000
will have a PMF of this form.

122
00:07:17,000 --> 00:07:25,790
It's zero for ts smaller than k,
and then at time k, in general,

123
00:07:25,790 --> 00:07:28,340
it's going to be
a positive entry.

124
00:07:28,340 --> 00:07:32,300
And for future values
of t, it will also

125
00:07:32,300 --> 00:07:34,020
have positive entries.

126
00:07:34,020 --> 00:07:38,320
And this PMF extends
all the way to infinity

127
00:07:38,320 --> 00:07:42,240
because it is possible
that the kth arrival takes

128
00:07:42,240 --> 00:07:46,520
an arbitrarily
long time to occur.

129
00:07:46,520 --> 00:07:49,770
If we consider different
values of k, of course

130
00:07:49,770 --> 00:07:52,350
we will get a different PMF.

131
00:07:52,350 --> 00:07:57,990
The PMF of Y3 is different
than the PMF of Y2.

132
00:07:57,990 --> 00:08:01,160
And the PMF of Y3
will generally sit

133
00:08:01,160 --> 00:08:06,100
to the right of the PMF of
Y2 because the third arrival

134
00:08:06,100 --> 00:08:10,867
generally will take longer to
occur than the second arrival.