Multinomial Distribution - To Simulate A Multinomial Distribution

To Simulate A Multinomial Distribution

Various methods may be used to simulate a multinomial distribution. A very simple one is to use a random number generator to generate numbers between 0 and 1. First, we divide the interval from 0 to 1 in k subintervals equal in size to the probabilities of the k categories. Then, we generate a random number for each of n trials and use a logical test to classify the virtual measure or observation in one of the categories.

Example

If we have :

Categories 1 2 3 4 5 6
Probabilities 0.15 0.20 0.30 0.16 0.12 0.07
Superior limits of subintervals 0.15 0.35 0.65 0.81 0.93 1.00

Then, with a software like Excel, we may use the following recipe:

Cells : Ai Bi Ci ... Gi
Formulae : Alea =If($Ai<0.15;1;0) =If(And($Ai>=0.15;$Ai<0.35);1;0) ... =If($Ai>=0.93;1;0)

After that, we will use functions such as SumIf to accumulate the observed results by category and to calculate the estimated covariance matrix for each simulated sample.

Another way with Excel, is to use the discrete random number generator. In that case, the categories must be label or relabel with numeric values.

In the two cases, the result is a multinomial distribution with k categories without any correlation. This is equivalent, with a continuous random distribution, to simulate k independent standardized normal distributions, or a multinormal distribution N(0,I) having k components identically distributed and statistically independent.

Read more about this topic:  Multinomial Distribution

Famous quotes containing the words simulate and/or distribution:

    I have come to believe ... that the stage may do more than teach, that much of our current moral instruction will not endure the test of being cast into a lifelike mold, and when presented in dramatic form will reveal itself as platitudinous and effete. That which may have sounded like righteous teaching when it was remote and wordy will be challenged afresh when it is obliged to simulate life itself.
    Jane Addams (1860–1935)

    The question for the country now is how to secure a more equal distribution of property among the people. There can be no republican institutions with vast masses of property permanently in a few hands, and large masses of voters without property.... Let no man get by inheritance, or by will, more than will produce at four per cent interest an income ... of fifteen thousand dollars] per year, or an estate of five hundred thousand dollars.
    Rutherford Birchard Hayes (1822–1893)