FUNCTION REFERENCE

prob.BinomialDistribution

Binomial probability distribution for the number of successes in N trials.

Binomial probability distribution for the number of successes in N trials.

Syntax

pd = makedist('Binomial', 'N', N, 'p', p)

Syntax

pd = fitdist(x, 'Binomial', 'NTrials', N)

Fitting requires a single positive integer N shared by all observations in x.

Stores trial count N and success probability p. Supports pdf, cdf, icdf, random, mean, std, var, median, paramci and negloglik.

Example

pd = makedist('Binomial', 'N', 10, 'p', 0.5); class(pd)   % 'prob.BinomialDistribution'

Example

pd = fitdist([0; 1], 'Binomial', 'NTrials', 1); pd.p   % 0.5000

Differences from MATLAB: Truncation via truncate() is not supported yet.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.