A random experiment with only two possible outcomes (that we call "success" and "failure") is called a Bernoulli trial.

We now define a numerical variable based on one such Bernoulli trial.

Definition

If there is an event \(A\) for which \(P(A) = \pi\), and a random variable \(X\) is defined by

\[ X = \begin {cases} 1 & \quad \text{if } A \text{ is a success}\\[0.5em] 0 & \quad \text{if } A \text{ is a failure} \end {cases} \]

then \(X\) has a Bernoulli distribution with parameter \(\pi\),

\[ X \;\; \sim \; \; \BernoulliDistn(\pi) \]

\(X\) is therefore a discrete random variable with probability function:

\[ p(x) = \begin {cases} \pi & \quad \text{if } x = 1\\[0.5em] (1 - \pi) & \quad \text{if } x = 0\\[0.5em] 0 & \quad \text{otherwise} \end {cases} \]

Although a single Bernoulli trial is too simple to be of much practical importance, situations often arise that can be treated as sequences of independent Bernoulli trials, all of which have the same probability of success.