## Content

### Bernoulli trials

The module Discrete probability distributions discusses the idea of a sequence of independent trials, where each trial has the same probability of success $$p$$. This structure leads to a number of random variables with different distributions. In that module, the trials structure is used to introduce the geometric distribution. Because of the general importance of the trials structure, we examine it systematically in this module.

The central idea is a Bernoulli trial — named after Jacob Bernoulli (1655–1705), who was one of a family of prominent mathematicians. A Bernoulli trial is a random procedure that can have one of two outcomes, which are arbitrarily labelled 'success' and 'failure'.

#### Example: Tetris

The following random procedure is considered in the module Probability .

During a game of Tetris, we observe a sequence of three consecutive pieces. Each Tetris piece has one of seven possible shapes: $$\mathtt{I}, \mathtt{J}, \mathtt{L}, \mathtt{O}, \mathtt{S}, \mathtt{T}, \mathtt{Z}$$. So in this random procedure, we can observe a sequence such as $$\mathtt{JLL}$$, $$\mathtt{ZOS}$$, $$\mathtt{ZSZ}$$, $$\mathtt{III}$$ and so on.

For each sequence of three pieces, we may ask: Does it contain at least one $$\mathtt{Z}$$? The sequence of three pieces is the test or 'trial'. A sequence of three pieces containing a $$\mathtt{Z}$$ is regarded as a success, and one without a $$\mathtt{Z}$$ as a failure.

From the point of view of this question, it does not matter what the other shapes in a sequence are. All we are concerned about is whether or not the sequence has a $$\mathtt{Z}$$.

A Bernoulli trial has a corresponding Bernoulli random variable, which counts the number of successes in a single trial. The only possible values of this random variable are zero and one; the random variable takes the value one if a success occurs, and the value zero if a failure occurs.

Let $$X$$ be a Bernoulli random variable with parameter $$p$$, where $$0 < p < 1$$. The probability function $$p_X(x)$$ of $$X$$ is given by $p_X(x) = \Pr(X=x) = \begin{cases} p &\text{if } x = 1, \\ 1-p &\text{if } x = 0. \end{cases}$ The mean of this random variable is \begin{align*} \mu_X = \mathrm{E}(X) &= \sum x\, p_X(x) \\ &= \bigl(0 \times (1-p)\bigr) + \bigl(1 \times p\bigr)\\ &= p. \end{align*} The variance of $$X$$ is equal to $$p(1-p)$$, a result obtained as follows: \begin{align*} \mathrm{var}(X) &= \sum (x-\mu_X)^2 p_X(x) \\ &= (0-p)^2 (1-p) + (1-p)^2 p \\ &= p(1-p)\bigl(p+(1-p)\bigr) \\ &= p(1-p). \end{align*}

Bernoulli random variables arise in a way that occurs very widely indeed. Suppose we are interested in a population of 'units', in which the proportion of units with a particular characteristic is $$p$$. Here a 'unit' may be a person, an animal, a plant, a school, a business, or many other entities, according to the population under study. We take a random sample of units from the population, and observe whether or not each unit has this characteristic of interest.

If the population is infinite, or so large that we can regard it as effectively infinite, then sampling without replacement is the same as sampling with replacement, and if each unit is sampled independently from all the others, the probability of any single sampled unit having the characteristic is equal to $$p$$. If we define 'success' as 'having the characteristic of interest', then each observation can be regarded as a Bernoulli trial, independent of the other observations, with probability of success equal to $$p$$. The importance of this insight is that it is so widely applicable. Here are some examples:
• A political poll of voters is carried out. Each polled voter is asked whether or not they currently approve of the Prime Minister.
• A random sample of schools is obtained. The schools are assessed on their compliance with a suitable policy on sun exposure for their students.
• A random sample of police personnel are interviewed. Each person is assessed as to whether or not they show appropriate awareness of different cultures.
• A random sample of drivers are drug tested, and it is recorded whether or not they are positive for recent methamphetamine use.
• A random sample of footballers is chosen and their record of injuries assessed, according to whether or not they have had more than three episodes of concussion.

Consideration of these examples suggests that we are interested in the number of successes, in general, and not just the examination of individual responses. If we have $$n$$ trials, we want to know how many of them are successes.

Next page - Content - Binomial random variables