Tutorials › VEE Mathematical Statistics › Independent Bernoulli Trials

VEE Mathematical Statistics · Bernoulli and Binomial Models · Tutorial 80 of 880

Independent Bernoulli Trials

Learn to check the assumptions for independent Bernoulli trials and compute the probability of a particular ordered sequence.

Beginner 9 min read

What You'll Learn

  • Define independent trials and a common success probability
  • Distinguish independence from having equal marginal probabilities
  • Calculate the probability of an exact ordered sequence
  • Apply independence to conditional probabilities after observed trials
  • Identify common modeling and sequence-probability errors

Why Repeated Binary Trials Need Two Assumptions

Many statistical situations record a sequence of yes-or-no outcomes: whether a device passes a check, whether a claim is flagged for review, or whether a sampled item has a particular feature. A Bernoulli model describes one such outcome. To model a sequence as repeated Bernoulli trials, however, it is not enough that each observation has two possible outcomes. We also need to specify how the trials relate to one another and whether they share the same success probability.

These conditions matter when calculating the chance of an exact ordered pattern, such as success, failure, success. If the trials are independent and have a common success probability, the probability of the pattern is found by multiplying the probability of each outcome in its position. If either condition is missing, that calculation may be wrong.

Definition: A sequence \(X_1,\ldots,X_n\) consists of independent Bernoulli trials with common success probability \(p\) if each \(X_i\) takes the value 1 for success and 0 for failure, \(P(X_i=1)=p\), and the variables are mutually independent. The common failure probability is \(q=1-p\). Each \(X_i\) then has a Bernoulli distribution with parameter \(p\).

There are two distinct requirements in this definition. A common success probability means that each trial has the same marginal probability \(p\) of success. Independence means that learning the outcomes of some trials does not change the probability of outcomes on the others. Neither requirement implies the other.

Independence and the Probability of a Sequence

For events \(A_1,\ldots,A_n\), mutual independence means that the probability of the intersection of any selected group of these events equals the product of their probabilities. For a sequence of Bernoulli trials, this applies to the success and failure events at each position. In particular, if a specified pattern has success in a set of positions \(I\) and failure in the remaining positions \(J\), then independence gives

$$ P(\text{specified pattern}) =\prod_{i\in I}P(X_i=1)\prod_{j\in J}P(X_j=0). $$

When the success probability is the same \(p\) at every position, each success contributes a factor \(p\), and each failure contributes a factor \(q=1-p\). Thus, if the particular pattern contains \(s\) successes and \(f\) failures, its probability is \(p^s q^f\). This expression is the probability of one specified ordering of those outcomes. It does not by itself give the probability of all patterns with those numbers of successes and failures.

Theorem: For independent Bernoulli trials with common success probability \(p\), the probability of any particular ordered sequence containing \(s\) successes and \(f\) failures is \(p^s(1-p)^f\), where \(s+f=n\). The formula requires both independence and the common probability assumption.

The reason the product formula holds is the multiplication rule for independent events. For example, write \(A_i\) for the event that trial \(i\) has its specified outcome, whether success or failure. Mutual independence gives \(P(A_1\cap\cdots\cap A_n)=\prod_{i=1}^nP(A_i)\). Under a common \(p\), each success event has probability \(p\), and each failure event has probability \(1-p\). Grouping equal factors yields the stated formula.

$$ P(A_1\cap\cdots\cap A_n) =\prod_{i=1}^n P(A_i) =p^s(1-p)^f. $$

This argument also shows what changes when the trials are independent but do not share a success probability. If trial \(i\) has success probability \(p_i\), a specified pattern still has a product probability, but a success at position \(i\) contributes \(p_i\) and a failure at position \(i\) contributes \(1-p_i\). One cannot replace those different factors with a single \(p\) and \(1-p\).

Worked Sequence Calculations

Worked Example: A Four-Stage Quality Check

A hypothetical production line checks each item at four independent stations. At every station, the probability that the item passes is \(p=0.8\); failure has probability \(q=1-0.8=0.2\). Find the probability of the exact sequence pass, fail, pass, pass.

Method. Treat each station result as an independent Bernoulli trial with common parameter \(p=0.8\). The specified order contains three passes and one failure. The order is fixed, so calculate the probability of this one pattern by multiplying its four position-specific probabilities:

$$ P(\text{pass, fail, pass, pass}) =(0.8)(0.2)(0.8)(0.8). $$

Multiply the factors in order: \(0.8\times0.2=0.16\), \(0.16\times0.8=0.128\), and \(0.128\times0.8=0.1024\). The probability is \(0.1024\), or \(10.24\%\).

Check. The pattern has three success factors and one failure factor, so \(p^3q=(0.8)^3(0.2)=0.512(0.2)=0.1024\), agreeing with the direct multiplication.

Common mistake avoided: Counting the three passes and then treating the pattern as though it included any ordering of three passes and one failure. The question specifies pass, fail, pass, pass; its probability is for that exact order.

Worked Example: A Sequence of Hypothetical Review Decisions

A hypothetical review procedure processes five independent files. Each file is flagged with probability \(p=0.3\), and is not flagged with probability \(q=0.7\). Find the probability that the outcomes, in order, are not flagged, flagged, not flagged, not flagged, flagged.

Method. Use the common-parameter independent-trials model. The ordered pattern contains two flagged outcomes and three not-flagged outcomes. Assign \(0.3\) to each flagged position and \(0.7\) to each not-flagged position:

$$ P(F,S,F,F,S) =(0.7)(0.3)(0.7)(0.7)(0.3) =(0.7)^3(0.3)^2. $$

First, \((0.7)^3=0.343\), and \((0.3)^2=0.09\). Therefore the probability is \(0.343\times0.09=0.03087\), which is \(0.0309\) to four decimal places.

Check. The five factors include three failure-to-flag probabilities and two flag probabilities. Their product is less than \(0.09\), as expected because the three additional factors are each \(0.7\). The reported probability is \(0.0309\) to four decimal places.

Common mistake avoided: Using \(0.3\) for a not-flagged outcome. The complement rule gives \(P(\text{not flagged})=1-0.3=0.7\); the success probability is not the probability of both possible outcomes.

Conditional Probabilities and the Independence Assumption

A useful consequence of independence is that observed outcomes do not alter the probability of a specified pattern on other trials. If \(A\) is an event determined by one group of trials and \(B\) is an event determined by a disjoint group, independence gives \(P(A\cap B)=P(A)P(B)\). When \(P(A)>0\), the conditional probability rule then gives

$$ P(B\mid A) =\frac{P(A\cap B)}{P(A)} =\frac{P(A)P(B)}{P(A)} =P(B). $$

This conclusion applies only when the relevant trials are independent under the model. It is not a rule that every future outcome is unaffected by past outcomes. For example, if a process changes after a failure, or if a fixed supply of items is sampled without replacement, independence may not be a suitable assumption.

Worked Example: Finding a Future Pattern After an Observed Failure

A hypothetical monitoring system records an alert as a success. Each of its trials is independent, with common alert probability \(p=0.2\) and no-alert probability \(q=0.8\). The first trial has already produced no alert. Find (a) the probability of the full three-trial pattern no alert, alert, no alert, and (b) the conditional probability of alert followed by no alert on trials 2 and 3, given that trial 1 had no alert.

Method for (a). The exact pattern has failure, success, failure, so multiply \(0.8\), \(0.2\), and \(0.8\):

$$ P(F,S,F)=(0.8)(0.2)(0.8)=0.128. $$

The probability of the full pattern is \(0.1280\) to four decimal places.

Method for (b). Independence means that conditioning on the first trial being a failure does not change the probability of the specified outcomes on trials 2 and 3. Thus

$$ P(S_2,F_3\mid F_1) =P(S_2,F_3) =(0.2)(0.8)=0.16. $$

The conditional probability is \(0.1600\) to four decimal places. It can also be checked directly: \(P(F_1,S_2,F_3)/P(F_1)=0.128/0.8=0.16\).

Common mistake avoided: Including the probability of the already-conditioned first failure in the conditional answer. The full sequence probability includes that factor; the conditional probability given the first failure does not.

Check the Model Before Multiplying

The formula \(p^s(1-p)^f\) is convenient, but it is only as appropriate as the model assumptions. In a practical problem, check whether the trial outcomes are plausibly independent and whether the success probability is plausibly constant from trial to trial. Those are modeling assumptions, not consequences of each trial having only two possible outcomes.

For example, suppose each of two indicators has probability \(0.5\) of success, but their outcomes always match: both succeed or both fail. Their marginal success probabilities are equal, but the probability of success followed by failure is \(0\), not \((0.5)(0.5)=0.25\). Equal marginal probabilities do not establish independence.

Conversely, independent trials can have different success probabilities. If three independent trials have success probabilities \(0.2\), \(0.5\), and \(0.8\), respectively, then success, failure, success has probability \((0.2)(1-0.5)(0.8)=0.08\). The trials are independent, but they do not have a common success probability.

Key takeaway: For one specified ordered sequence, multiply the probability of the required outcome at each position. Use \(p^s(1-p)^f\) only when the trials are mutually independent and share the same success probability \(p\). Keep the distinction between an exact sequence and a collection of possible sequences clear.

Check Your Understanding

For each problem, identify the relevant outcome probabilities and calculate the requested probability. Answers are rounded to four decimal places where needed.

  1. A hypothetical detector has independent trials with common detection probability \(0.65\). Find the probability of the exact four-trial sequence detection, no detection, detection, no detection. (Answer: \(0.0518\))
  2. A hypothetical screening system flags each case independently with probability \(0.4\). Find the probability of the ordered sequence no flag, no flag, flag, no flag, flag. (Answer: \(0.0346\))
  3. At each of five independent trials, a sensor records a positive result with probability \(0.7\). Find the probability of positive, positive, negative, negative, negative. (Answer: \(0.0132\))
  4. A hypothetical process has independent trials with success probability \(0.25\). Find the probability of the six-trial sequence failure, success, failure, success, failure, success. (Answer: \(0.0066\))
  5. Three independent trials have success probabilities \(0.2\), \(0.5\), and \(0.8\), respectively. Find the probability of success on trial 1, failure on trial 2, and success on trial 3. Does the model have a common success probability? (Answer: \(0.0800\); no.)
Clinical Biostats