One Binary Outcome, One Probability Parameter

Code the event before calculating

A Bernoulli random variable records one binary outcome. Conventionally, the event of interest is coded 1 and its complement is coded 0.


If the probability of 1 is p, the probability mass function is P(X = 1) = p and P(X = 0) = 1 − p. The word single matters: a count across a collection of trials is a related but distinct model.

Mean and variance come from the coding

Because X is either 0 or 1, X² = X. Therefore E(X) = p and Var(X) = E(X²) − [E(X)]² = p(1 − p).


The mean is the long-run proportion of observations coded 1, whereas variance measures the spread of individual 0/1 outcomes. A likely event can have a small variance because repeated outcomes are then less variable.

Recoding complements the mean and preserves the spread

If Y = 1 − X, the event coded 1 becomes the complementary event. Its mean is 1 − p, and its variance remains p(1 − p). Write the coding in words before substituting a probability; that small step prevents assigning the original event probability to a reversed indicator.

Useful checks

Probabilities must lie from 0 through 1 and sum to 1 across the two outcomes. Bernoulli variance is nonnegative and never exceeds one quarter. These checks catch common errors such as using p itself as a variance or treating a parameter as though it were an observed outcome.

A quality-control record defines X = 1 when a randomly chosen circuit passes its final test and X = 0 when it fails. If the chance of a pass is p, which statement correctly describes X?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

A delivery is on time with probability 0.72. Let Y = 1 for an on-time delivery and Y = 0 otherwise. What is Var(Y)?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

A device-failure indicator F has P(F = 1) = 0.18. An analyst instead defines R = 1 − F, where R = 1 means the device survives. What are E(R) and Var(R)?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors