Univariate Discrete Distributions
A univariate discrete distribution is a probability distribution that contains a single random variable. This variable can assume only a finite, or countably infinite, number of values. For example, in a Bernoulli distribution, the random variable X can assume only the value 0 or 1.
Statistics and Machine Learning Toolbox™ offers several ways to work with univariate discrete distributions:
Create a distribution object and use distribution object functions.
Use distribution-specific functions with specified distribution parameters.
Use the generic distribution functions with the specified distribution name and corresponding parameters.
For more information, see Working with Probability Distributions.
Apps
| Distribution Fitter | Fit probability distributions to data |
Tools
| Probability Distribution Function Tool | Interactive density and distribution plots |
| randtool | Interactive random number generation |
Functions
Objects
BinomialDistribution | Binomial probability distribution object |
EmpiricalDistribution | Empirical probability distribution object (Since R2025a) |
NegativeBinomialDistribution | Negative binomial distribution object |
PoissonDistribution | Poisson probability distribution object |
Topics
- Nonparametric and Empirical Probability Distributions
Estimate a probability density function or a cumulative distribution function from sample data.
- 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.
- Empirical Distribution
The empirical distribution is a nonparametric estimate of the cumulative distribution function (cdf) for a sample.
- Geometric Distribution
The geometric distribution models the number of failures before one success in a series of independent trials, where each trial results in either success or failure, and the probability of success in any individual trial is constant.
- Hypergeometric Distribution
The hypergeometric distribution models the total number of successes in a fixed-size sample drawn without replacement from a finite population.
- Multinomial Probability Distribution Objects
This example shows how to generate random numbers, compute and plot the pdf, and compute descriptive statistics of a multinomial distribution using probability distribution objects.
- Multinomial Probability Distribution Functions
This example shows how to generate random numbers and compute and plot the pdf of a multinomial distribution using probability distribution functions.
- Negative Binomial Distribution
The negative binomial distribution models the number of failures before a specified number of successes is reached in a series of independent, identical trials.
- Poisson Distribution
The Poisson distribution is appropriate for applications that involve counting the number of times a random event occurs in a given amount of time, distance, area, and so on.
- Uniform Distribution (Discrete)
The discrete uniform distribution is a simple distribution that puts equal weight on the integers from one to N.
- Maximum Likelihood Estimation
The
mlefunction computes maximum likelihood estimates (MLEs) for a distribution specified by its name and for a custom distribution specified by its probability density function (pdf), log pdf, or negative log likelihood function. - Negative Loglikelihood Functions
Find maximum likelihood estimates using negative loglikelihood functions.