Binomial Distribution

Maths: Statistics for machine learning

2 min read

Published Oct 22 2025, updated Aug 17 2026


40
0
0
0

Machine LearningMathsNumPyPandasPythonStatistics

The Binomial Distribution represents the probability of getting k successes in n independent Bernoulli trials,
where each trial has the same probability of success p.


In simple terms:

“If you repeat a yes/no experiment n times, what’s the probability of getting exactly k yes outcomes?”




Formula: Probability Mass Function (PMF)

Binomial PMF Formula

Where:

  • X = number of successes
  • n = number of trials
  • k = specific number of successes (0 ≤ k ≤ n)
  • p = probability of success
  • number of ways to choose k successes:
Binomial Number Ways Formula

The sum of all probabilities = 1:

Binomial sum all ways Formula

Examples:

  • Coin toss - number of heads in 10 tosses
  • Email opens - number of users who open email
  • Loan approvals - number of approvals
  • Product purchase - number of buyers

Binomial Distribution

A bar chart showing the probability of getting 0, 1, 2, …, n successes, with the highest bar near the mean (np).

Example (n=10, p=0.5):

  • Mean = 5 → distribution is centred around 5 successes
  • Symmetrical since p=0.5
  • Shape becomes skewed when p ≠ 0.5 (right- or left-skewed)





In Machine Learning

  • Modelling count of successes - e.g., number of customers who convert
  • Feature probability modelling - Discrete count features (e.g., binary outcomes repeated n times)
  • Bernoulli → Binomial extension - Multiple independent binary outcomes
  • Evaluation metrics - Used in hypothesis testing and confidence intervals for proportions
© 2025 SimpleSteps.guide
AboutFAQPoliciesContact
Maths: Statistics for machine learning | Binomial Distribution | SimpleSteps.guide