Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • Notebook Assistant + LLM Kit

    All-in-one AI assistance for your Wolfram experience

  • Compute Services
  • System Modeler
  • Finance Platform
  • Wolfram|Alpha Notebook Edition
  • Application Server
  • Enterprise Private Cloud
  • Wolfram Engine
  • Wolfram Player
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Core Technologies of Wolfram Products

  • Wolfram Language
  • Computable Data
  • Wolfram Notebooks
  • AI & Linguistic Understanding

Deployment Options

  • Wolfram Cloud
  • wolframscript
  • Wolfram Engine Community Edition
  • Wolfram LLM API
  • WSTPServer
  • Wolfram|Alpha APIs

From the Community

  • Function Repository
  • Community Paclet Repository
  • Example Repository
  • Neural Net Repository
  • Prompt Repository
  • Wolfram Demonstrations
  • Data Repository
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

  • Data & Computational Intelligence
  • Model-Based Design
  • Algorithm Development
  • Wolfram|Alpha for Business
  • Blockchain Technology
  • Education Technology
  • Quantum Computation

Wolfram Consulting

Wolfram Solutions

  • Data Science
  • Artificial Intelligence
  • Biosciences
  • Healthcare Intelligence
  • Sustainable Energy
  • Control Systems
  • Enterprise Wolfram|Alpha
  • Blockchain Labs

More Wolfram Solutions

Wolfram Solutions For Education

  • Research Universities
  • Colleges & Teaching Universities
  • Junior & Community Colleges
  • High Schools
  • Educational Technology
  • Computer-Based Math

More Solutions for Education

  • Contact Us
Learning & Support

Get Started

  • Wolfram Language Introduction
  • Fast Intro for Programmers
  • Fast Intro for Math Students
  • Wolfram Language Documentation

More Learning

  • Highlighted Core Areas
  • Demonstrations
  • YouTube
  • Daily Study Groups
  • Wolfram Schools and Programs
  • Books

Grow Your Skills

  • Wolfram U

    Courses in computing, science, life and more

  • Community

    Learn, solve problems and share ideas.

  • Blog

    News, views and insights from Wolfram

  • Resources for

    Software Developers

Tech Support

  • Contact Us
  • Support FAQs
  • Support FAQs
  • Contact Us
Company
  • About Wolfram
  • Career Center
  • All Sites & Resources
  • Connect & Follow
  • Contact Us

Work with Us

  • Student Ambassador Initiative
  • Wolfram for Startups
  • Student Opportunities
  • Jobs Using Wolfram Language

Educational Programs for Adults

  • Summer School
  • Winter School

Educational Programs for Youth

  • Middle School Camp
  • High School Research Program
  • Computational Adventures

Read

  • Stephen Wolfram's Writings
  • Wolfram Blog
  • Wolfram Tech | Books
  • Wolfram Media
  • Complex Systems

Educational Resources

  • Wolfram MathWorld
  • Wolfram in STEM/STEAM
  • Wolfram Challenges
  • Wolfram Problem Generator

Wolfram Initiatives

  • Wolfram Science
  • Wolfram Foundation
  • History of Mathematics Project

Events

  • Stephen Wolfram Livestreams
  • Online & In-Person Events
  • Contact Us
  • Connect & Follow
Wolfram|Alpha
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • Notebook Assistant + LLM Kit
    • Compute Services
    • System Modeler
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Application Server
    • Enterprise Private Cloud
    • Wolfram Engine
    • Wolfram Player
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • AI & Linguistic Understanding
    • Deployment Options
      • Wolfram Cloud
      • wolframscript
      • Wolfram Engine Community Edition
      • Wolfram LLM API
      • WSTPServer
      • Wolfram|Alpha APIs
    • From the Community
      • Function Repository
      • Community Paclet Repository
      • Example Repository
      • Neural Net Repository
      • Prompt Repository
      • Wolfram Demonstrations
      • Data Repository
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions

    We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

    WolframConsulting.com

    Wolfram Solutions

    • Data Science
    • Artificial Intelligence
    • Biosciences
    • Healthcare Intelligence
    • Sustainable Energy
    • Control Systems
    • Enterprise Wolfram|Alpha
    • Blockchain Labs

    More Wolfram Solutions

    Wolfram Solutions For Education

    • Research Universities
    • Colleges & Teaching Universities
    • Junior & Community Colleges
    • High Schools
    • Educational Technology
    • Computer-Based Math

    More Solutions for Education

    • Contact Us
  • Learning & Support

    Get Started

    • Wolfram Language Introduction
    • Fast Intro for Programmers
    • Fast Intro for Math Students
    • Wolfram Language Documentation

    Grow Your Skills

    • Wolfram U

      Courses in computing, science, life and more

    • Community

      Learn, solve problems and share ideas.

    • Blog

      News, views and insights from Wolfram

    • Resources for

      Software Developers
    • Tech Support
      • Contact Us
      • Support FAQs
    • More Learning
      • Highlighted Core Areas
      • Demonstrations
      • YouTube
      • Daily Study Groups
      • Wolfram Schools and Programs
      • Books
    • Support FAQs
    • Contact Us
  • Company
    • About Wolfram
    • Career Center
    • All Sites & Resources
    • Connect & Follow
    • Contact Us

    Work with Us

    • Student Ambassador Initiative
    • Wolfram for Startups
    • Student Opportunities
    • Jobs Using Wolfram Language

    Educational Programs for Adults

    • Summer School
    • Winter School

    Educational Programs for Youth

    • Middle School Camp
    • High School Research Program
    • Computational Adventures

    Read

    • Stephen Wolfram's Writings
    • Wolfram Blog
    • Wolfram Tech | Books
    • Wolfram Media
    • Complex Systems
    • Educational Resources
      • Wolfram MathWorld
      • Wolfram in STEM/STEAM
      • Wolfram Challenges
      • Wolfram Problem Generator
    • Wolfram Initiatives
      • Wolfram Science
      • Wolfram Foundation
      • History of Mathematics Project
    • Events
      • Stephen Wolfram Livestreams
      • Online & In-Person Events
    • Contact Us
    • Connect & Follow
  • Wolfram|Alpha
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
BinomialDistribution
  • See Also
    • BernoulliDistribution
    • MultinomialDistribution
    • HypergeometricDistribution
    • GeometricDistribution
    • NegativeBinomialDistribution
    • BetaBinomialDistribution
    • PoissonDistribution
    • NormalDistribution
    • Binomial
  • Related Guides
    • Discrete Univariate Distributions
    • Bounded Domain Distributions
    • Urn Model Distributions
    • Distributions in Reliability Analysis
    • Distributions in Communication Systems
    • Parametric Statistical Distributions
    • Functions Used in Statistics
  • Tech Notes
    • Discrete Distributions
    • See Also
      • BernoulliDistribution
      • MultinomialDistribution
      • HypergeometricDistribution
      • GeometricDistribution
      • NegativeBinomialDistribution
      • BetaBinomialDistribution
      • PoissonDistribution
      • NormalDistribution
      • Binomial
    • Related Guides
      • Discrete Univariate Distributions
      • Bounded Domain Distributions
      • Urn Model Distributions
      • Distributions in Reliability Analysis
      • Distributions in Communication Systems
      • Parametric Statistical Distributions
      • Functions Used in Statistics
    • Tech Notes
      • Discrete Distributions

BinomialDistribution[n,p]

represents a binomial distribution with n trials and success probability p.

Details
Details and Options Details and Options
Background & Context
Examples  
Basic Examples  
Scope  
Applications  
Properties & Relations  
Possible Issues  
Neat Examples  
See Also
Tech Notes
Related Guides
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • BernoulliDistribution
    • MultinomialDistribution
    • HypergeometricDistribution
    • GeometricDistribution
    • NegativeBinomialDistribution
    • BetaBinomialDistribution
    • PoissonDistribution
    • NormalDistribution
    • Binomial
  • Related Guides
    • Discrete Univariate Distributions
    • Bounded Domain Distributions
    • Urn Model Distributions
    • Distributions in Reliability Analysis
    • Distributions in Communication Systems
    • Parametric Statistical Distributions
    • Functions Used in Statistics
  • Tech Notes
    • Discrete Distributions
    • See Also
      • BernoulliDistribution
      • MultinomialDistribution
      • HypergeometricDistribution
      • GeometricDistribution
      • NegativeBinomialDistribution
      • BetaBinomialDistribution
      • PoissonDistribution
      • NormalDistribution
      • Binomial
    • Related Guides
      • Discrete Univariate Distributions
      • Bounded Domain Distributions
      • Urn Model Distributions
      • Distributions in Reliability Analysis
      • Distributions in Communication Systems
      • Parametric Statistical Distributions
      • Functions Used in Statistics
    • Tech Notes
      • Discrete Distributions

BinomialDistribution

BinomialDistribution[n,p]

represents a binomial distribution with n trials and success probability p.

Details

  • The probability for value in a binomial distribution is for integers from 0 to n. »
  • BinomialDistribution allows n to be any non-negative integer.
  • BinomialDistribution allows n and p to be dimensionless quantities. »
  • BinomialDistribution can be used with such functions as Mean, CDF, and RandomVariate. »

Background & Context

  • BinomialDistribution[n,p] represents a discrete statistical distribution defined at integer values and parametrized by a non-negative real number p, . The binomial distribution has a discrete probability density function (PDF) that is unimodal, with its peak occurring at the mean . The parameters n and p determine the height, horizontal location, and skewness of the PDF.
  • The study of the binomial distribution dates back to the early eighteenth century to the work of James Bernoulli, thus making it one of the oldest distributions to be studied. The binomial distribution is designed to model the action of flipping n (fair or unfair) coins that are independent and equal and are sampled independently and sequentially with replacement. Traditionally, p is thought of as the probability with which the experiment "succeeds", whereas is the probability of "failure". In the coin flip analogy, the value corresponds to flipping a fair coin.
  • Despite being defined very simply, the binomial distribution serves as the basis for a number of more complicated mathematical concepts. For example, the binomial distribution can be thought of as the distribution of successes resulting from a finite n-stage Bernoulli process of having probability of success p (i.e. a discrete-time stochastic process consisting of a finite sequence of random variables, each of which is independent and identically distributed (i.i.d.) according to BernoulliDistribution[p]). Similarly, the binomial distribution is the slice distribution (SliceDistribution) of a binomial process (BinomialProcess), a discrete-time, discrete-state stochastic process consisting of a finite sequence of i.i.d. random variables following a binomial distribution, the time between which follows a geometric distribution (GeometricDistribution). Moreover, many real-world scenarios can be modeled as binomial processes, e.g. the probability of rolling a particular value among n (fair or unfair) dice. Surprising connections between the binomial distribution have also been discovered in the study of emigration patterns and in certain queueing models.
  • RandomVariate can be used to give one or more machine- or arbitrary-precision (the latter via the WorkingPrecision option) pseudorandom variates from a binomial distribution. Distributed[x,BinomialDistribution[n,p]], written more concisely as xBinomialDistribution[n,p], can be used to assert that a random variable x is distributed according to a binomial distribution. Such an assertion can then be used in functions such as Probability, NProbability, Expectation, and NExpectation.
  • The probability density and cumulative distribution functions may be given using PDF[BinomialDistribution[n,p],x] and CDF[BinomialDistribution[n,p],x]. The mean, median, variance, raw moments, and central moments may be computed using Mean, Median, Variance, Moment, and CentralMoment, respectively. These quantities can be visualized using DiscretePlot.
  • DistributionFitTest can be used to test if a given dataset is consistent with a binomial distribution, EstimatedDistribution to estimate a binomial parametric distribution from given data, and FindDistributionParameters to fit data to a binomial distribution. ProbabilityPlot can be used to generate a plot of the CDF of given data against the CDF of a symbolic binomial distribution and QuantilePlot to generate a plot of the quantiles of given data against the quantiles of a symbolic binomial distribution.
  • TransformedDistribution can be used to represent a transformed binomial distribution, CensoredDistribution to represent the distribution of values censored between upper and lower values, and TruncatedDistribution to represent the distribution of values truncated between upper and lower values. CopulaDistribution can be used to build higher-dimensional distributions that contain a binomial distribution, and ProductDistribution can be used to compute a joint distribution with independent component distributions involving binomial distributions.
  • BinomialDistribution is related to a number of other statistical distributions. For example, BinomialDistribution[1,p] is precisely the same as BernoulliDistribution[p] on the values and , and the sum of n independent variables distributed according to BernoulliDistribution[p] is distributed according to BinomialDistribution[n,p]. Similarly, BinomialDistribution[t,p] has the same PDF as BinomialProcess[p][t], a property due to the fact that BinomialDistribution[t,p] is precisely SliceDistribution[BinomialProcess[p],t]. BinomialDistribution[n,p] is also the limiting distribution for several distributions. In particular, BinomialDistribution[n,p] converges to NormalDistribution[μ,σ] for fixed p as n tends to Infinity where and and converges to a discretized PoissonDistribution[p] as n tends to Infinity and p tends to 0, while HypergeometricDistribution[n,p] limits to BinomialDistribution[n,p] as p tends to Infinity. BinomialDistribution is a two-variable case of MultinomialDistribution, is a constituent piece of BetaBinomialDistribution, and has a natural relationship with NegativeBinomialDistribution.

Examples

open all close all

Basic Examples  (3)

Probability mass function:

Cumulative distribution function:

Mean and variance of a binomial distribution:

Scope  (8)

Generate a sample of pseudorandom numbers from a binomial distribution:

Compare its histogram to the PDF:

Distribution parameters estimation:

Estimate the distribution parameters from sample data:

Compare a density histogram of the sample with the PDF of the estimated distribution:

Skewness:

The distribution is symmetric for :

The distribution becomes symmetric for large n:

Kurtosis:

The limiting value is the value of kurtosis of the standard NormalDistribution:

Different moments with closed forms as functions of parameters:

Moment:

CentralMoment:

FactorialMoment:

Closed form for symbolic order:

Cumulant:

Hazard function:

Quantile function:

Use dimensionless Quantity to define BinomialDistribution:

Applications  (12)

CDF of BinomialDistribution is an example of a right-continuous function:

A basketball player has a free-throw percentage of 0.75. Simulate 10 free throws:

Find the probability that the player hits 2 out of 3 free throws in a game:

Find the probability that the player hits the last 2 of 5 free throws:

Find the expected number of hits in a game with n free throws:

A baseball player is a 0.300 hitter. Simulate 5 at bats:

Find the expected number of hits if the player comes to bat 3 times:

A drug has proven to be effective in 30% of cases. Find the probability it is effective in at least 3 of 4 patients:

Find the expected number of successes when applied to 500 cases:

The number of heads in n flips with a fair coin can be modeled with BinomialDistribution:

Show the distribution of heads for 100 coin flips:

Compute the probability that there are between 60 and 80 heads in 100 coin flips:

Now, suppose that for an unfair coin the probability of heads is 0.6:

The distribution and the corresponding probabilities have changed:

A machine produces parts, with 1 in 10 defective:

Compute the probability that at most 1 of 5 parts is defective:

An airplane engine fails with probability p; compute the probability that no more than 2 of 4 fail:

Compute the probability that no more than 1 of 2 fails:

Decide when the choice of four engines is better than two engines:

A system uses triple redundancy with three microprocessors and is designed to operate as long as one processor is still functional. The probability that a microprocessor is still functional after seconds is . Find the probability that the system is still operating after seconds:

With mean time to failure for each processor , find out when the system functions with a probability of less than 99%:

Expressed in years:

Gary Kasparov, chess champion, plays in a tournament simultaneously against 100 amateurs. It has been estimated that he loses about 1% of such games. Find the probability of losing 0, 2, 5, and 10 games:

Use a Poisson approximation to compute the same probabilities:

Perform the same computation when he is playing 5 games, but with stronger opposition so that his loss probability is 10% instead:

In this case the Poisson approximation is less accurate:

A packet consisting of a string of n symbols is transmitted over a noisy channel. Each symbol has probability of incorrect transmission. Find n such that the probability of incorrect packet transmission is less than :

Compute the same limit using a Poisson approximation:

Find the probability that out of n customers need a service if each uses it with probability p:

Compute the probability that more than (capacity) simultaneous service requests are made:

Compute the probability of getting service if and for different capacities :

Find the smallest capacity that provides a 99.9% probability of getting service:

Two players roll dice. If the total of both numbers is less than 10, the second player is paid 4 cents; otherwise the first player is paid 9 cents. Is the game fair?:

The game is not fair, since mean scores per game are not equal:

Find the probability that after n games the player at the disadvantage scores more:

The probability exhibits oscillations:

The maximum of probability is attained at :

Properties & Relations  (9)

Binomial distribution is closed under addition:

BinomialDistribution[n,p] converges to a normal distribution as :

Relationships to other distributions:

BinomialDistribution with is equivalent to BernoulliDistribution:

The sum of n independent variables with BernoulliDistribution is binomial distributed:

BinomialDistribution is the infinite population limit of HypergeometricDistribution:

BinomialDistribution approaches the PoissonDistribution for large n and small p:

A marginal of bivariate multinomial distribution is a binomial distribution:

Confirm by comparing probability mass functions:

BetaBinomialDistribution is a mixture of BinomialDistribution and BetaDistribution:

Possible Issues  (3)

BinomialDistribution is not defined when p is not between zero and one:

BinomialDistribution is not defined when n is not a positive integer:

Substitution of invalid parameters into symbolic outputs gives results that are not meaningful:

Neat Examples  (1)

Construct a polynomial approximation of on the interval from 0 to 1 following Bernstein:

Approximation of is constructed as the expectation of , where is a binomial random variate with parameters and so that the mean of equals :

Plot the original function and its approximations:

See Also

BernoulliDistribution  MultinomialDistribution  HypergeometricDistribution  GeometricDistribution  NegativeBinomialDistribution  BetaBinomialDistribution  PoissonDistribution  NormalDistribution  Binomial

Tech Notes

    ▪
  • Discrete Distributions

Related Guides

    ▪
  • Discrete Univariate Distributions
  • ▪
  • Bounded Domain Distributions
  • ▪
  • Urn Model Distributions
  • ▪
  • Distributions in Reliability Analysis
  • ▪
  • Distributions in Communication Systems
  • ▪
  • Parametric Statistical Distributions
  • ▪
  • Functions Used in Statistics

History

Introduced in 2007 (6.0) | Updated in 2016 (10.4)

Wolfram Research (2007), BinomialDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/BinomialDistribution.html (updated 2016).

Text

Wolfram Research (2007), BinomialDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/BinomialDistribution.html (updated 2016).

CMS

Wolfram Language. 2007. "BinomialDistribution." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/BinomialDistribution.html.

APA

Wolfram Language. (2007). BinomialDistribution. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BinomialDistribution.html

BibTeX

@misc{reference.wolfram_2025_binomialdistribution, author="Wolfram Research", title="{BinomialDistribution}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/BinomialDistribution.html}", note=[Accessed: 01-May-2026]}

BibLaTeX

@online{reference.wolfram_2025_binomialdistribution, organization={Wolfram Research}, title={BinomialDistribution}, year={2016}, url={https://reference.wolfram.com/language/ref/BinomialDistribution.html}, note=[Accessed: 01-May-2026]}

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • Notebook Assistant + LLM Kit
  • Compute Services
  • System Modeler

  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps

  • Wolfram Engine
  • Wolfram Player

  • Volume & Site Licensing
  • Server Deployment Options
  • Consulting
  • Wolfram Consulting
  • Repositories
  • Data Repository
  • Function Repository
  • Community Paclet Repository
  • Neural Net Repository
  • Prompt Repository

  • Wolfram Language Example Repository
  • Notebook Archive
  • Wolfram GitHub
  • Learning
  • Wolfram U
  • Wolfram Language Documentation
  • Webinars & Training
  • Educational Programs

  • Wolfram Language Introduction
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Books

  • Wolfram Community
  • Wolfram Blog
  • Public Resources
  • Wolfram|Alpha
  • Wolfram Problem Generator
  • Wolfram Challenges

  • Computer-Based Math
  • Computational Thinking
  • Computational Adventures

  • Demonstrations Project
  • Wolfram Data Drop
  • MathWorld
  • Wolfram Science
  • Wolfram Media Publishing
  • Customer Resources
  • Store
  • Product Downloads
  • User Portal
  • Your Account
  • Organization Access

  • Support FAQ
  • Contact Support
  • Company
  • About Wolfram
  • Careers
  • Contact
  • Events
Wolfram Community Wolfram Blog
Legal & Privacy Policy
WolframAlpha.com | WolframCloud.com
© 2026 Wolfram
© 2026 Wolfram | Legal & Privacy Policy |
English