binocdf
Binomial cumulative distribution function
Description
computes a binomial cumulative distribution function at each of the values iny
= binocdf(x
,n
,p
)x
using the corresponding number of trials inn
and the probability of success for each trial inp
.
x
,n
, andp
can be vectors, matrices, or multidimensional arrays of the same size. Alternatively, one or more arguments can be scalars. Thebinocdf
function expands scalar inputs to constant arrays with the same dimensions as the other inputs.
Examples
Input Arguments
Output Arguments
More About
Alternative Functionality
binocdf
is a function specific to binomial distribution. Statistics and Machine Learning Toolbox™ also offers the generic functioncdf
, which supports various probability distributions. To usecdf
, specify the probability distribution name and its parameters. Alternatively, create aBinomialDistribution
probability distribution object and pass the object as an input argument. Note that the distribution-specific functionbinocdf
is faster than the generic functioncdf
.Use theProbability Distribution Functionapp to create an interactive plot of the cumulative distribution function (cdf) or probability density function (pdf) for a probability distribution.