Products

Banche Popolari Unite Analyzes Credit Risk Using MATLAB

"The numerical computation and visualization capabilities of MATLAB are incredible! We can implement up to 100,000 simulations to hundreds of thousands of positions and relative aggregations quickly." - Roberto Modafferi, Banche Popolari Unite

Toyota Racing Development Makes Faster and More Efficient Engineering Decisions with MATLAB

"We get more data than we can possibly sift through. MATLAB is our workhouse for viewing, sharing, and processing that data." - Skip Essma, Toyota Racing Development

Statistics Toolbox

Description

Probability Distributions

Statistics Toolbox provides functions and graphical tools to work with parametric and nonparametric probability distributions. With these tools, you can:

  • Fit distributions to data.
  • Use statistical plots to evaluate goodness of fit.
  • Compute key functions such as probability density functions and cumulative distribution functions.
  • Generate random and quasi-random number streams from probability distributions.

Fitting Distributions to Data

The Distribution Fitting Tool in the toolbox enables you to fit data using predefined univariate probability distributions, a nonparametric (kernel-smoothing) estimator, or a custom distribution that you define. This tool supports both complete data and censored (reliability) data. You can exclude data, save and load sessions, and generate MATLAB code.

statistics 62112 wm stat fig16 w
Visual plot of distribution data (left) and summary statistics (right). Using the Distribution Fitting Tool, you can estimate a normal distribution with mean and variance values (16.9 and 8.7, respectively, in this example).

Additionally, you can create multivariate probability distributions, including Gaussian mixtures and multivariate normal, multivariate t, and Wishart distributions. You can use copulas to create multivariate distributions by joining arbitrary marginal distributions using correlation structures.

See the complete list of supported distributions.

With the toolbox, you can specify custom distributions and fit these distributions using maximum likelihood estimation.

Evaluating Goodness of Fit

Statistics Toolbox provides statistical plots to evaluate how well a dataset matches a specific distribution. The toolbox includes probability plots for a variety of standard distributions, including normal, exponential, extreme value, lognormal, Rayleigh, and Weibull. You can generate probability plots from complete datasets and censored datasets. Additionally, you can use quantile-quantile plots to evaluate how well a given distribution matches a standard normal distribution.

Statistics Toolbox also provides hypothesis tests to determine whether a dataset is consistent with different probability distributions. Specific tests include:

  • Chi-Square goodness-of-fit tests
  • One-sided and two-sided Kolmogorov-Smirnov tests
  • Lilliefors tests
  • Ansari-Bradley tests
  • Jarque-Bera tests

Analyzing Probability Distributions

Statistics Toolbox provides functions for analyzing probability distributions, including:

  • Probability density functions
  • Cumulative density functions
  • Inverse cumulative density functions
  • Negative log-likelihood functions

Generating Random Numbers

Statistics Toolbox provides functions for generating pseudo-random and quasi-random number streams from probability distributions. You can generate random numbers from either a fitted or constructed probability distribution by applying the random method.

statistics 62113 wm stat fig17 w
MATLAB code for constructing a Poisson distribution with a specific mean and generating a vector of random numbers that match the distribution.

Statistics Toolbox also provides functions for:

  • Generating random samples from multivariate distributions, such as t, normal, copulas, and Wishart
  • Sampling from finite populations
  • Performing Latin hypercube sampling
  • Generating samples from Pearson and Johnson systems of distributions

You can also generate quasi-random number streams. Quasi-random number streams produce highly uniform samples from the unit hypercube. Quasi-random number streams can often accelerate Monte Carlo simulations because fewer samples are required to achieve complete coverage.