Friday, May 30, 2014

Solving Problems With the Multinomial Distribution in Excel 2010 and Excel 2013

This is one of the following six articles on Solving Problems With Other Distributions in Excel

Solving Uniform Distribution Problems in Excel 2010 and Excel 2013

Solving Multinomial Distribution Problems in Excel 2010 and Excel 2013

Solving Exponential Distribution Problems in Excel 2010 and Excel 2013

Solving Beta Distribution Problems in Excel 2010 and Excel 2013

Solving Gamma Distribution Problems in Excel 2010 and Excel 2013

Solving Poisson Distribution Problems in Excel 2010 and Excel 2013

 

Overview of the

Multinomial Distribution

The multinomial distribution is a discrete distribution, not a continuous distribution. This means that the objects that form the distribution are whole, individual objects. This distribution curve is not smooth but moves abruptly from one level to the next in increments of whole units.

Excel does not provide the multinomial distribution as one of its built-in functions. Users must generate their own Excel formulas.

The multinomial distribution provides the probability of a combination of specified outputs for a given number of trials that are totally independent. The probability of each of the individual outputs of each of the trials must be known in order to utilize the multinomial distribution to calculate the probability of that unique combination of outputs occurring in the given trials.

The multinomial distribution utilizes Sampling With Replacement. Each sampled object is placed back into the population before the next sample is taken from the population.

Here is the formula for calculating the probability of a multinomial distribution:

P ( X1 = n1, X2 = n2, …, Xk = nk ) =

= [ (n!) / (n1! * n2! * …*nk!) ] * [Pr(Output1)]n1 * [Pr(Output2)]n2 * … * [Pr(Outputk)]nk

An example makes the multinomial distribution easier to understand. An example follows:

Multinomial PDF Problem Solved in

Excel

A box contains 5 red marbles, 4 white marbles, and 3 blue marbles. A marble is sampled at random, its color noted, and then the marble IS REPLACED BEFORE THE NEXT SAMPLE IS TAKEN. 6 marbles are sampled in this manner.

Calculate the probability that out of those 6 sampled marbles, 3 are red, 2 are white, and 1 is blue.

Output1 = Sampled marble is red

Output2 = Sampled marble is white

Output3 = Sampled marble is blue

The population consists of 12 total marbles of which 5 are red, 4 are white, and 3 are blue.

Pr(Output1) = 5/12

Pr(Output2) = 4/12

Pr(Output3) = 3/12

n = total number of trials (marbles sampled) = 6

X1 = Actual Count of Output1 in n trials

X2 = Actual Count of Output2 in n trials

n1 = Hypothetical Count of Output1 in n trials = 3

n2 = Hypothetical Count of Output2 in n trials = 2

n3 = Hypothetical Count of Output2 in n trials = 1

The probability of 3 red, 2 white, 1 blue = P(3 red, 2 white, 1 blue)

= P ( X1 = n1, X2 = n2, …, Xk = nk )

= P ( X1 = 3, X2 = 2, X3 = 3 )

P ( X1 = n1, X2 = n2, …, Xk = nk ) =

= [ (n!) / (n1! * n2! * …*nk!) ] * [Pr(Output1)]n1 * [Pr(Output2)]n2 * … * [Pr(Outputk)]nk

= [ (6!) / (3! * 2! * 1! ) ] * [5/12]3 * [4/12]2 * [3/12]1

= 625 / 5184 = 0.12056 = 12.06%

There is a 12.06 percent probability that out of those 6 sampled marbles, EXACTLY 3 are red, EXACTLY 2 are white, and EXACTLY 1 is blue.

Because the probability of EXACT number of each possible output have been calculated, the multinomial distribution’s PDF (Probability Density Function) has been calculated in this example.

Excel does not provide the multinomial distribution as one of its built-in

functions. Users must generate their own Excel formulas. In this case,

it would be the following:

P( 3 red, 2 white, 1 blue) =

= [ (6!) / (3! * 2! * 1! ) ] * [5/12]3 * [4/12]2 * [3/12]1

= ( FACT(6) / ( FACT(3) * FACT(2) * FACT(1) ) ) * ((5/12)^3) * ((4/12)^2) * ((3/12)^1)
= 0.1206 = 12.06%

 

Binomial Distribution Is the Multinomial Distribution With k = 2

The multinomial distribution is a generalization of the binomial distribution. When k = 2, the multinomial distribution is the binomial distribution. The following example demonstrates this:

Calculate the probability that 15 flips of a fair coin (p = 0.5) will produce EXACTLY 4 heads (and therefore EXACTLY 11 tails).

The flipping of a coin is considered sampling with replacement because the probability of obtaining a specific output (heads for example) remains constant during every trial.

Solve with the binomial distribution’s PDF in Excel as follows:

X = 4

n = 15

p = 0.5

Pr(X=4;n=15,p=0.5)

= BINOM.DIST(X,n,p,FALSE) = BINOM.DIST(4,15,0.5,FALSE) = 0.0417

Solve with the multinomial distribution’s PDF in Excel as follows:

Output1 = Heads from a single trial (coin flip)

Output2 = Tails from a single trial

Pr(Output1) =0.5

Pr(Output2) =0.5

n = total number of trials (coin flips) = 15

X1 = Actual Count of Output1 in n trials

X2 = Actual Count of Output2 in n trials

n1 = Hypothetical Count of Output1 in n trials = 4

n2 = Hypothetical Count of Output2 in n trials = 11

P ( X1 = n1, X2 = n2, …, Xk = nk ) =

= [ (n!) / (n1! * n2! * …*nk!) ] * [Pr(Output1)]n1 * [Pr(Output2)]n2 * … * [Pr(Outputk)]nk

= [ (15!) / (4! * 11!) ] * [0.5]4 * [0.5]11

= 0.0417

 

Excel Master Series Blog Directory

Statistical Topics and Articles In Each Topic

 

No comments:

Post a Comment