Unit 12, lesson 74

Bernoulli Processes

How a Bernoulli process orders independent success or failure trials by a time index, why its cumulative count is binomial and its first success time geometric, and how count and waiting time events match.

  • Video 74
  • Bernoulli Processes and Random Walks

A detector is tested over and over, and on each trial it either reports a signal or stays quiet. Two natural questions concern the same run of trials. How many signals appear among the first four trials, and on which trial does the first signal appear? This lesson models the run as a Bernoulli process, answers the first question with a binomial count and the second with a geometric waiting time, and shows how events about the waiting time translate into events about counts.

Key terms

Random process

Definition A random process is a collection of random variables XtX_t, one for each value of an index tt in an index set T\mathcal{T}, all defined on the same sample space Ω\Omega with the same probability PP. The index tt is called the time index. In discrete time the index set is a set of integers such as {1,2,3,… }\{1, 2, 3, \dots\}, and in continuous time it is an interval such as [0,∞)[0, \infty). For each fixed tt the value XtX_t is one random variable. For each fixed outcome ω\omega in Ω\Omega, the values Xt(ω)X_t(\omega), viewed as a function of tt, form a sample path of the process.

In plain words A random process is a whole family of random quantities studied together, so a question can involve several times at once, such as how a later value relates to earlier ones. The time index puts the variables in order. It can count trials, days or seconds.

Example A detector is tested on trials 1,2,3,…1, 2, 3, \dots, and Xi=1X_i = 1 if trial ii reports a signal and Xi=0X_i = 0 otherwise. The sequence X1,X2,…X_1, X_2, \dots is a random process whose time index ii counts trials. The running totals of the same results form a second process on the same sample space. If the first five results are 0,1,0,0,10, 1, 0, 0, 1, the running totals after each of those trials are 0,1,1,1,20, 1, 1, 1, 2.

Bernoulli process

Definition Let 0<p<10 < p < 1. A Bernoulli process with success probability pp is a sequence of random variables X1,X2,…X_1, X_2, \dots that are mutually independent and each have the Bernoulli⁡(p)\operatorname{Bernoulli}(p) distribution, so P(Xi=1)=pP(X_i = 1) = p and P(Xi=0)=1−pP(X_i = 0) = 1 - p for every ii. Together these conditions say that for every n≥1n \ge 1 and every choice of x1,…,xnx_1, \dots, x_n in {0,1}\{0, 1\},

P(X1=x1,…,Xn=xn)=pk(1−p)n−k,\begin{aligned} &P(X_1 = x_1, \dots, X_n = x_n) \\[0.4em] &\quad = p^{k}(1 - p)^{n - k}, \end{aligned}

where k=x1+⋯+xnk = x_1 + \cdots + x_n is the number of ones. The outcome coded 11 is called a success and the outcome coded 00 a failure.

In plain words Every trial has the same chance of success, and no group of trials carries information about the other trials. The product formula needs independence of every finite group of trials, not only of pairs. Success is just the name of the outcome coded 11, and it need not be a good outcome.

Example For a detector with p=0.3p = 0.3, the results no signal, signal, signal, no signal on the first four trials have probability 0.7⋅0.3⋅0.3⋅0.7=0.04410.7 \cdot 0.3 \cdot 0.3 \cdot 0.7 = 0.0441. If a signal on one trial made a signal on the next trial more likely, or if the detector lost sensitivity as the trials went on, the results would not form a Bernoulli process, and the formulas on this page would not be justified for them.

Cumulative count

Definition In a Bernoulli process with success probability pp, the cumulative count after nn trials is

Cn=X1+⋯+Xn,C_n = X_1 + \cdots + X_n,

the number of successes among trials 11 to nn, with C0=0C_0 = 0. For each fixed n≥1n \ge 1 the count has the binomial distribution Cn∼Bin⁡(n,p)C_n \sim \operatorname{Bin}(n, p), so for k=0,1,…,nk = 0, 1, \dots, n

P(Cn=k)=(nk)pk(1−p)n−k,\begin{aligned} &P(C_n = k) \\[0.4em] &\quad = \binom{n}{k} p^{k} (1 - p)^{n - k}, \end{aligned}

with E[Cn]=npE[C_n] = np and Var⁡(Cn)=np(1−p)\operatorname{Var}(C_n) = np(1 - p). The sequence C0,C1,C2,…C_0, C_1, C_2, \dots is itself a random process. It never decreases, and from one trial to the next it rises by 00 or by 11.

In plain words The cumulative count is a running total of successes, and each count includes all earlier trials. The binomial coefficient counts the ways to place kk successes among nn ordered trials, and each placement has the same probability. The count CnC_n and the relative frequency Cn/nC_n / n are different quantities on different scales.

Example With p=0.3p = 0.3 and four trials, there are (42)=6\binom{4}{2} = 6 placements of two signals, so

P(C4=2)=6⋅0.32⋅0.72=0.2646.\begin{aligned} P(C_4 = 2) &= 6 \cdot 0.3^{2} \cdot 0.7^{2} \\[0.4em] &= 0.2646. \end{aligned}

No signals has probability 0.74=0.24010.7^4 = 0.2401, so at least one signal has probability 0.75990.7599. The expected count is E[C4]=1.2E[C_4] = 1.2, which is not a possible count, and the variance is Var⁡(C4)=0.84\operatorname{Var}(C_4) = 0.84. The relative frequency C4/4C_4/4 has mean 0.30.3.

First success time

Definition In a Bernoulli process with success probability pp, the first success time is

T=min⁡{n:Xn=1},T = \min\{n : X_n = 1\},

the number of the first trial that succeeds. The event {T=k}\{T = k\} requires failures on trials 11 to k−1k - 1 and a success on trial kk, so by independence

P(T=k)=(1−p)k−1pP(T = k) = (1 - p)^{k - 1} p

for k=1,2,3,…k = 1, 2, 3, \dots. This is the geometric distribution on {1,2,3,… }\{1, 2, 3, \dots\}, and E[T]=1/pE[T] = 1/p. The event that no trial ever succeeds is contained in {Cn=0}\{C_n = 0\} for every nn, so its probability is at most (1−p)n(1 - p)^n for every nn. It is therefore 00, and TT is finite with probability 11. Some books record instead the number of failures before the first success. That variable is T−1T - 1, it takes the values 0,1,2,…0, 1, 2, \dots, and its mean is (1−p)/p(1 - p)/p.

In plain words Count the trials up to and including the first success. For k≥2k \ge 2, a first success on trial kk and a first success by trial kk are different events. The first puts the earliest success exactly at trial kk, while the second allows it at any of the trials 11 to kk.

Example With p=0.3p = 0.3, the first signal comes on trial 33 with probability 0.72⋅0.3=0.1470.7^2 \cdot 0.3 = 0.147. It comes by trial 33 unless the first three trials all fail, so P(T≤3)=1−0.73=0.657P(T \le 3) = 1 - 0.7^3 = 0.657. The mean waiting time is 1/0.3=10/3≈3.331/0.3 = 10/3 \approx 3.33 trials, and the mean number of failures before the first signal is 7/3≈2.337/3 \approx 2.33. The two conventions differ by exactly one trial, so state which one is in use before quoting a mean or a formula.

Count and waiting time events

Definition For every n≥1n \ge 1, the first success time and the cumulative count satisfy the event identities

{T>n}={Cn=0},{T≤n}={Cn≥1},\begin{gathered} \{T > n\} = \{C_n = 0\}, \\[0.4em] \{T \le n\} = \{C_n \ge 1\}, \end{gathered}

so P(T>n)=(1−p)nP(T > n) = (1 - p)^n and P(T≤n)=1−(1−p)nP(T \le n) = 1 - (1 - p)^n. Also {T=n}={Cn−1=0}∩{Xn=1}\{T = n\} = \{C_{n-1} = 0\} \cap \{X_n = 1\}. For integers m,n≥0m, n \ge 0 the conditioning event {T>m}\{T > m\} has probability (1−p)m>0(1 - p)^m > 0, and since {T>m+n}\{T > m + n\} is contained in {T>m}\{T > m\},

P(T>m+n∣T>m)=(1−p)m+n(1−p)m=(1−p)n.\begin{aligned} &P(T > m + n \mid T > m) \\[0.4em] &\quad = \frac{(1 - p)^{m + n}}{(1 - p)^{m}} \\[0.4em] &\quad = (1 - p)^{n}. \end{aligned}

This equals P(T>n)P(T > n), which is the memoryless property of the geometric waiting time.

In plain words A count question fixes a number of trials and asks how many successes occur. A waiting question fixes a number of successes, here one, and asks when it occurs. Waiting longer than nn trials is the same event as having no success in the first nn trials. So every event about the first success time can be written with counts, while a count event such as {C4=2}\{C_4 = 2\} is not determined by the first success time alone. Memorylessness says that after a run of failures the remaining wait has the same distribution as a fresh start, so in a Bernoulli process a success is never overdue. It rests on the independence of the trials and the constant pp.

Example With p=0.3p = 0.3, the first signal comes after trial 44 exactly when the first four trials have no signal, which has probability 0.74=0.24010.7^4 = 0.2401. Given that the first five trials all failed, the chance that the wait lasts more than three further trials is

P(T>8)P(T>5)=0.780.75=0.343,\frac{P(T > 8)}{P(T > 5)} = \frac{0.7^{8}}{0.7^{5}} = 0.343,

the same as P(T>3)=0.343P(T > 3) = 0.343 for a fresh start. If the chance of a signal grew after each quiet trial, the trials would not form a Bernoulli process, and the remaining wait would depend on how long the wait had already lasted.

Disjoint blocks of trials

Definition A block of trials is a set of trial numbers, and blocks are disjoint when no trial belongs to two of them. In a Bernoulli process, the counts of successes in disjoint blocks are mutually independent, because each count is a function of the trials in its own block and the trials are mutually independent. A block of mm trials has a Bin⁡(m,p)\operatorname{Bin}(m, p) count wherever it lies. Cumulative counts overlap instead. For 1≤m<n1 \le m < n,

Cn=Cm+(Cn−Cm),C_n = C_m + (C_n - C_m),

where CmC_m and the count Cn−CmC_n - C_m of trials m+1m + 1 to nn are independent. The cumulative counts CmC_m and CnC_n themselves are dependent, since

Cov⁡(Cm,Cn)=Var⁡(Cm)=mp(1−p)>0.\begin{aligned} &\operatorname{Cov}(C_m, C_n) \\[0.4em] &\quad = \operatorname{Var}(C_m) \\[0.4em] &\quad = mp(1 - p) > 0. \end{aligned}

In plain words Counts that use different trials carry no information about each other. A cumulative count includes every earlier trial, so two cumulative counts share their common trials, and knowing the earlier count changes the probabilities for the later one. Independence of the trials does not carry over to every quantity built from them.

Example With p=0.3p = 0.3, the counts in trials 11 to 44 and in trials 55 to 88 are independent, and each is Bin⁡(4,0.3)\operatorname{Bin}(4, 0.3). Both are zero with probability 0.74⋅0.74=0.78≈0.05760.7^4 \cdot 0.7^4 = 0.7^8 \approx 0.0576, which matches P(C8=0)P(C_8 = 0) computed directly. The cumulative counts C4C_4 and C8C_8 are dependent. Four signals in the first four trials has probability 0.34=0.0081>00.3^4 = 0.0081 > 0, and given that event, the event C8≤3C_8 \le 3 is impossible, although P(C8≤3)≈0.806P(C_8 \le 3) \approx 0.806. Their covariance is Cov⁡(C4,C8)=4⋅0.3⋅0.7=0.84\operatorname{Cov}(C_4, C_8) = 4 \cdot 0.3 \cdot 0.7 = 0.84.

Check yourself

  1. A Bernoulli process has success probability p=0.2p = 0.2. Find the probability of no successes in the first five trials, the probability that the first success comes on trial 55, and the probability that the first success comes by trial 55. Which of these events are stated with the count C5C_5 and which with the waiting time TT?
Show the answer

No successes in five trials is the count event {C5=0}\{C_5 = 0\}, with probability 0.85=0.327680.8^5 = 0.32768. A first success on trial 55 needs four failures followed by a success, so P(T=5)=0.84⋅0.2=0.08192P(T = 5) = 0.8^4 \cdot 0.2 = 0.08192. The first success comes by trial 55 exactly when at least one of the first five trials succeeds, so P(T≤5)=1−0.32768=0.67232P(T \le 5) = 1 - 0.32768 = 0.67232. The first event is a count event. The other two are waiting time events, and the third can be rewritten as the count event {C5≥1}\{C_5 \ge 1\}.

  1. In the same process the first four trials have all failed. A classmate says a success on trial 55 is now more likely than 0.20.2 because it is overdue. Find P(T=5∣T>4)P(T = 5 \mid T > 4) and compare it with P(T=5)P(T = 5).
Show the answer

The conditioning event has probability P(T>4)=0.84=0.4096>0P(T > 4) = 0.8^4 = 0.4096 > 0, and {T=5}\{T = 5\} is contained in {T>4}\{T > 4\}, so

P(T=5∣T>4)=0.081920.4096=0.2.\begin{aligned} &P(T = 5 \mid T > 4) \\[0.4em] &\quad = \frac{0.08192}{0.4096} = 0.2. \end{aligned}

The chance is still 0.20.2, the same as for any single trial, so the classmate is wrong. The unconditional probability P(T=5)=0.08192P(T = 5) = 0.08192 is smaller because it also requires the four failures, which in this question have already happened. In a Bernoulli process past failures do not make a success overdue.

  1. With p=0.2p = 0.2, compute P(C2=2,C5=2)P(C_2 = 2, C_5 = 2) and compare it with the product P(C2=2) P(C5=2)P(C_2 = 2)\,P(C_5 = 2). Are C2C_2 and C5C_5 independent? Are C2C_2 and C5−C2C_5 - C_2 independent?
Show the answer

The event {C2=2,C5=2}\{C_2 = 2, C_5 = 2\} says that trials 11 and 22 succeed and trials 33, 44 and 55 fail, so it equals {C2=2}∩{C5−C2=0}\{C_2 = 2\} \cap \{C_5 - C_2 = 0\}. The two block counts are independent, so

P(C2=2,C5=2)=0.22⋅0.83=0.02048.\begin{aligned} &P(C_2 = 2, C_5 = 2) \\[0.4em] &\quad = 0.2^{2} \cdot 0.8^{3} = 0.02048. \end{aligned}

Separately, P(C2=2)=0.04P(C_2 = 2) = 0.04 and P(C5=2)=(52) 0.22⋅0.83=0.2048P(C_5 = 2) = \binom{5}{2}\, 0.2^2 \cdot 0.8^3 = 0.2048, whose product is 0.0081920.008192. The joint probability differs from the product, so C2C_2 and C5C_5 are dependent. Knowing that the first two trials succeeded forces C5≥2C_5 \ge 2. The counts C2C_2 and C5−C2C_5 - C_2 use the disjoint blocks of trials 11 to 22 and 33 to 55, so they are independent.

How this lesson connects