multstat

Multinomial mean, variance and standard deviation.
2.2K Downloads
Updated 7 Apr 2005

View License

This m-file returns the mean, variance and standard deviation of the multinomial distribution with parameters N and P. The Expected Value (i.e., averages):

Expected Value = m = Sum(Xi × Pi), the sum is over all i's. Expected value is another name for the mean and (arithmetic) average.

The Variance is:
Variance = s2 = v = Sum[Xi2 × Pi] - m2, the sum is over all i's. The variance is not expressed in the same units as the expected value. So, the variance is hard to understand and to explain as a result of the squared term in its computation. This can be alleviated by working with the square root of the variance, which is called the Standard (i.e., having the same unit as the data have) Deviation:
Standard Deviation = s = (Variance) ½

File needs to input x-vector of the interested values and p-vector of associated probabilities.

It outputs m-multinomial mean value (default), v-multinomial variance value (optional) and s-multinomial standard deviation value (optional).

Cite As

Antonio Trujillo-Ortiz (2025). multstat (https://www.mathworks.com/matlabcentral/fileexchange/6787-multstat), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R11
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0

Text was improved.