AI Glossary / Data science and analytics / Advanced

Bernoulli trial

Definition

A Bernoulli trial is a random experiment whose recorded outcome has two possibilities, conventionally called success and failure. If success has probability p, failure has probability 1 − p. The labels describe the event being counted, not whether the outcome is desirable. A single trial can be represented by a variable taking value 1 for success and 0 for failure.

What it means

The model is a building block for questions with a yes-or-no outcome. Did a randomly selected request meet the response target? Did an eligible visitor register within a defined period? Was an inspected item defective? Each question needs a precise observation unit and a clear rule for the two outcomes.
The underlying situation may be complicated even though the recorded result is binary. A visitor might read several pages, return later or encounter an error. Reducing that history to registration or no registration can be useful, but it deliberately leaves other information out. Missing or unresolved observations should not silently become failures.

How it works

Specify the event counted as success and model its probability p. The corresponding Bernoulli variable has expected value p and variance p(1 − p). Its expectation is a probability-weighted average, not a possible fractional outcome of one trial.
When a fixed number n of trials are independent and share the same success probability, their total successes follow a binomial distribution. These are additional conditions for the repeated-trial model. Binary outcomes alone do not establish independence or a common probability.
Check the sampling and observation process before applying that extension. Repeated visits from one person, shared service outages or changing eligibility can create dependence or different probabilities. The individual outcomes can remain binary even when the simple binomial model is unsuitable.

Three practical examples

  • A quality reviewer selects one article at random and records whether it contains a broken reference link. Defining a broken link as success makes the event easy to count, despite it being an undesirable result.
  • A website records whether one eligible visitor completes registration within seven days. The deadline and eligibility define the trial.
  • A simulation generates one yes-or-no event with a chosen probability to explore uncertainty in a planning scenario. The chosen probability is a modeling assumption, not evidence that the real system behaves that way.

Think of it this way

A Bernoulli trial resembles a single switch that ends in one of two recorded states. Probability describes uncertainty, not a partly activated switch. Repeating the experiment adds another question: whether the switches behave independently and under the same probability, which cannot be assumed merely because each has two states.

Worked example

Suppose a fictional simulation models an eligible visitor registering with probability p = 0.3. Define X = 1 for registration and X = 0 otherwise. Then P(X = 1) = 0.3 and P(X = 0) = 0.7. The expected value is 0.3 and the variance is 0.3 × 0.7 = 0.21.
Now assume three independent visitors with the same probability. The chance that exactly one registers is 3 × 0.3 × 0.7 × 0.7 = 0.441, or 44.1%. The factor of three counts the possible positions of the one registration. The expected number of registrations is 3 × 0.3 = 0.9, although the observed count must be 0, 1, 2 or 3.
If all three visitors experience the same outage, the independence assumption may fail. The 44.1% calculation would then need reassessment. These invented probabilities are not a website forecast or an empirical estimate.

Illustrative case study

In a fictional project, Rowan Learning wants to analyze whether readers complete an introductory exercise. The first dataset treats every page visit as a separate trial and records no completion when no event is found. Analysts notice that some readers visit repeatedly and that tracking failures create missing outcomes.
The team defines one eligible reader's first exercise attempt as its observation unit, sets a completion window and separates unknown results from confirmed non-completions. It also reviews whether shared classroom sessions and changes to the exercise could affect independence or the probability of completion.
Rowan now has a clearer binary outcome definition and a documented basis for choosing an analysis. It does not claim that these changes automatically make every observation independent. This fictional case illustrates preparing data for modeling.

Common misconceptions and mistakes

Two outcomes do not imply equal probabilities. A Bernoulli trial can have any success probability between zero and one. Success also need not be beneficial: a defect or missed deadline may be the event of interest.
A collection of binary observations is not automatically binomial. A fixed trial count, independence and a common success probability are required for the standard binomial model. Sampling without replacement from a small finite population can violate those assumptions.
The observed proportion of successes estimates a probability under an appropriate sampling model; it is not guaranteed to equal the underlying p. A small sample with no successes does not prove that success is impossible.

Business use

Bernoulli modeling supports clear definitions for binary outcomes in experiments, quality checks and operational analysis. Establish what counts as one trial, when observation ends and how unknown outcomes are handled before calculating rates.
Keep the probability model separate from the business judgment. A completion indicator may be measurable without capturing learning quality, customer benefit or long-term retention. When combining trials, inspect dependence and differences between groups. More observations do not repair a systematically incorrect outcome definition or a biased sample.

People also ask

Is a Bernoulli trial the same as a binomial experiment?

A single Bernoulli trial corresponds to the one-trial case; a standard binomial experiment counts successes across a fixed number of independent trials with common p.

Can p be unknown?

Yes. It can be estimated from suitable data, with uncertainty.

Does a success after several failures become more likely?

Not under independent trials with unchanged p. Different processes may behave differently.

Check your understanding

Why can the expected count be 0.9?

Answer: Expectation averages over possible repetitions; one observed count remains an integer.

Does recording yes or no prove independence?

Answer: No. The data-generating process determines dependence.

Why separate unknown outcomes?

Answer: Treating them as failures changes the event definition and may bias the measured rate.

Related terms

  • Binomial distribution
  • Probability
  • Independence
  • Expected value
  • Variance
  • Bernoulli distribution
  • binary outcome
  • indicator variable
  • sample proportion

Learn next

Calculate probabilities for a few independent trials with a chosen p. Then describe a real binary measurement and identify which assumptions would need evidence before using a binomial model.

More in Data science and analytics

  • BADIR - BADIR is Aryng's proprietary analytics framework for moving from a business question to a recommendation.
  • Bar chart - A bar chart displays values using rectangular bars whose lengths represent magnitude on a shared numerical scale.
  • Base effect - A base effect is the influence of the comparison period's value on a reported rate of change.
  • Binary variable - A binary variable has two possible substantive values, often represented as 0 and 1 or as two category labels.
  • Boolean - Boolean refers to a logical value or expression with the two truth values true and false.
  • Box plot - A box plot summarizes the distribution of numerical data using a median, quartiles and whiskers.

Sources

OpenStax, Statistics, Binomial Distribution: Bernoulli trials, repeated-trial assumptions and success/failure conventions. https://openstax.org/books/statistics/pages/4-3-binomial-distribution-optional Penn State, STAT 504, Introduction to Discrete Data: indexed teaching text consulted for the distinction between Bernoulli observations and binomial counts; direct retrieval was unavailable. https://online.stat.psu.edu/stat504/Lesson01 The registration probabilities and Rowan Learning case are original illustrations, not empirical findings.

Previous: Bernoulli Naive Bayes Next: Bessel's correction

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer