multrnd

Multinomial random sequence.
3.6K 次下载
更新时间 2005/1/26

查看许可证

This m-file generates a random sequence of m simulations of k integers from a multinomial distribution with n trials and k outcomes, where the probability for each simulation is,

n!
------------------------- ×p1^n1×p2^n2×..×pk^nk .
n1!×n2!×..×nk!

Then, a single sample {n1, n2, . . . , nk} have a multinomial joint distribution with parameters n and p1, p2, . . . , pk. The parameter n is called the number of trials; the parameters p1, p2, . . . , pk are called the category probabilities; k is called the number of categories.

File needs to input n-number of trials, p-vector of associated probabilities and m-number of simulations (default = 1).

It outputs X-multinomial random deviates (default) and Y-multinomial probabilities of the generated random deviates (optional).

引用格式

Antonio Trujillo-Ortiz (2025). multrnd (https://www.mathworks.com/matlabcentral/fileexchange/6788-multrnd), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R11
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0

It was added an appropriate format to cite this file.