Code covered by the BSD License  

Highlights from
multcov

4.0

4.0 | 1 rating Rate this file 1 Download (last 30 days) File Size: 2.14 KB File ID: #7375

multcov

by Antonio Trujillo-Ortiz

 

06 Apr 2005 (Updated 07 Apr 2005)

Covariance of a multinomial distribution.

| Watch this File

File Information
Description

This m-file returns the covariance of a multinomial distribution with parameters N and P.

The Coariance is:
Covariance = -N × Pi × Pj; i,j = 1,2, ... ,k.

Covariance =
[np1(1-p1) -np1p2 ... -np1pk
    -np1p2 np2(1-p2) ... -np2pk
              . . . . .
              . . . . .
    -np1pk -np2pk ... npk(1-pk)].

It need to inputs n-number of trials, and p-vector of associated probabilities.

It Outputs the C-multinomial covariance matrix.

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.
Comments and Ratings (1)
11 Jul 2006 Abhay Krishna

thanks for that,just one note to say the reference given in all multinomial related files like multrnd,multstat,multcoef,multpdf,multcov,ie the handbook weblink is not working,instead the reference can be found online on
http://www.convertit.com/Go/ConvertIt/Reference/AMS55.ASP

Please login to add a comment or rating.
Updates
07 Apr 2005

It was added an appropriate format to cite this file.

07 Apr 2005

Text was improved.

Tag Activity for this File
Tag Applied By Date/Time
statistics Antonio Trujillo-Ortiz 22 Oct 2008 07:45:09
probability Antonio Trujillo-Ortiz 22 Oct 2008 07:45:09
ultinomial Antonio Trujillo-Ortiz 22 Oct 2008 07:45:09
covariance Antonio Trujillo-Ortiz 22 Oct 2008 07:45:09
multinomial distribution Antonio Trujillo-Ortiz 22 Oct 2008 07:45:09

Contact us at files@mathworks.com