Code covered by the BSD License  

Highlights from
multpdf

Be the first to rate this file! 1 Download (last 30 days) File Size: 2.61 KB File ID: #6785

multpdf

by Antonio Trujillo-Ortiz

 

24 Jan 2005 (Updated 28 Jan 2005)

Multinomial probability density function.

| Watch this File

File Information
Description

This m-file returns the multinomial probability density function value with parameters N and P at the values in X. Note that the density function is zero unless X is an integer.

Let {X1, X2, . . . , Xk}, k > 1, be a set of random variables, each of which can take the values 0, 1, . . . , n. Suppose there are k nonnegative numbers {p1, p2, . . . , pk} that sum to one, such that for every set of k nonnegative integers {n1, . . . , nk} whose sum is n, P( X1 = n1 and X2 = n1 and . . . and Xk = nk ) =

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

Then {X1, X1, . . . , Xk} 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 x-vector of the interested values.

It output the multinomial probability density value.

MATLAB release MATLAB 5.3 (R11)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Updates
26 Jan 2005

It was added an appropriate format to cite this file.

28 Jan 2005

Text was improved.

Tag Activity for this File
Tag Applied By Date/Time
statistics Antonio Trujillo-Ortiz 22 Oct 2008 07:40:07
probability Antonio Trujillo-Ortiz 22 Oct 2008 07:40:07
multinomial Antonio Trujillo-Ortiz 22 Oct 2008 07:40:07
probability density function Antonio Trujillo-Ortiz 22 Oct 2008 07:40:07
distribution Antonio Trujillo-Ortiz 22 Oct 2008 07:40:07

Contact us at files@mathworks.com