Main Content

Binomial Distribution

Fit, evaluate, and generate random samples from binomial distribution

Statistics and Machine Learning Toolbox™ offers several ways to work with the binomial distribution.

  • Create a probability distribution object BinomialDistribution by fitting a probability distribution to sample data or by specifying parameter values. Then, use object functions to evaluate the distribution, generate random numbers, and so on.

  • Work with the binomial distribution interactively by using the Distribution Fitter app. You can export an object from the app and use the object functions.

  • Use distribution-specific functions with specified distribution parameters. The distribution-specific functions can accept parameters of multiple binomial distributions.

  • Use generic distribution functions (cdf, icdf, pdf, random) with a specified distribution name ('Binomial') and parameters.

To learn about the binomial distribution, see Binomial Distribution.

Objects

BinomialDistributionBinomial probability distribution object

Apps

Distribution FitterFit probability distributions to data

Functions

expand all

Create BinomialDistribution Object

makedistCreate probability distribution object
fitdistFit probability distribution object to data

Work with BinomialDistribution Object

cdfCumulative distribution function
gatherGather properties of Statistics and Machine Learning Toolbox object from GPU (Since R2020b)
icdfInverse cumulative distribution function
iqrInterquartile range of probability distribution
meanMean of probability distribution
medianMedian of probability distribution
negloglikNegative loglikelihood of probability distribution
paramciConfidence intervals for probability distribution parameters
pdfProbability density function
plotPlot probability distribution object (Since R2022b)
proflikProfile likelihood function for probability distribution
randomRandom numbers
stdStandard deviation of probability distribution
truncateTruncate probability distribution object
varVariance of probability distribution
binocdfBinomial cumulative distribution function
binopdfBinomial probability density function
binoinvBinomial inverse cumulative distribution function
binostatBinomial mean and variance
binofitBinomial parameter estimates
binorndRandom numbers from binomial distribution
mleMaximum likelihood estimates
distributionFitterOpen Distribution Fitter app
disttoolInteractive density and distribution plots
plotPlot probability distribution object (Since R2022b)
qqplotQuantile-quantile plot
randtoolInteractive random number generation

Topics

  • Bernoulli Distribution

    The Bernoulli distribution is a discrete probability distribution with only two possible values for the random variable.

  • Binomial Distribution

    The binomial distribution models the total number of successes in repeated trials from an infinite population under certain conditions.