Note that this is a multinomial experiment.
A multinomial experiment has the following conditions:
1. there a n identical and independent trials
2. the outcome of the trials is one of k possible outcomes
3. pi is the probability of the trial resulting in outcome i. i = 1, 2, 3, ... , k
and p1 + p2 + p3 + ... + pk = 1
4. Xi is the number of trials ending in result i.
X1 + X2 + X3 + ... + Xk = n
the probability mass function is:
P(X1 = x1, X2 = x2, ... , Xk = xk) = n! / (x1! x2! ... xk!) * p1 ^ x1 * p2 ^ x2 ... pk ^ xk
in a more compact for it is:
P(X1 = x1, X2 = x2, ... , Xk = xk) = (n! / ∏ xi!) * ∏ (pi ^ xi)
if k = 2, then the multinomial reduces down the binomial distribution. So you can think of the multinomial as a generalization of the binomial distribution.
the solution is below. I've taken the sum off all the multinomials for having only one cd, two cds, three cds or four cds. Multiplying by the number of combinations of five choose i cds. the sum of these probabilities are then subtracted from one to find the probability of getting a full set. There are no assumptions made at this point. I have also written a simulation to show this result.
the code is written in R. you can get this software for free from www.r-project.org. email me if you have any questions about this result.
----------------------------------------------------------------------
the code to solve exactly is:
p <- c(0.2,0.2,0.2,0.2,0.2)
# to get only one cd
cd1<-0
cd1 <- cd1 + dmultinom(c(0,0,0,0,12),12,p)
cd1 <- 5 * cd1
# to get only two of the five cds
cd2 <- 0
for( i in 1:11)
{
cd2 <- cd2 + dmultinom(c(0, 0, 0, i, 12 - i), 12, p)
}
cd2 <- cd2 * 10
# to get three of the five cds
cd3 <- 0
for( x in 1:10)
{
for(y in 1:(11 - x))
{
cd3 <- cd3 + dmultinom(c(0,0,x,y,(12 - x - y)),12,p)
}
}
cd3 <- 10 * cd3
# to get four of the five cds
cd4 <- 0
for( x in 1:9)
{
for( y in 1:(10 - x))
{
for(z in 1:(11 - x - y))
{
cd4 <- cd4 + dmultinom(c(0,x,y,z,(12 - x - y - z)),12,p)
}
}
}
cd4 <- cd4 *5
cat("to get one of the cds:", cd1, "\n", "to get two cds:", cd2, "\n", "to get three of the cds:",cd3,"\n", "to get four cds:", cd4, "\n")
1-(cd1 + cd2 + cd3 + cd4)
\\ === the output is: ===//
to get one of the cds: 2.048e-08
to get two cds: 0.0001676902
to get three of the cds: 0.02126463
to get four cds: 0.300565
>
> 1-(cd1 + cd2 + cd3 + cd4)
[1] 0.6780027
--------------------------------------------------
here is a simulation in R
simulations <- 1000000
CDsets <- 0
for(i in 1:simulations)
{
set <- 1;
sample <- rmultinom(1,12,c(.2,.2,.2,.2,.2))
for(j in 1:5)
{
if(!sample[j]) {set <- 0;}
}
if(set) {CDsets <- CDsets + 1;}
}
cat("estimated prob of getting all five cds in the set: ",CDsets / simulations, "\n");
estimated prob of getting all five cds in the set: 0.678072
2007-11-22 11:50:11
·
answer #1
·
answered by Merlyn 7
·
1⤊
0⤋
First of all, assume there is an equal chance
that any one of five CDs can be selected.
Instead of determining the probability of getting all
five CDs in twelve boxes, let's compute the probability
that we *DO NOT* get that all five CDs in twelve boxes.
1 - [5 * (0.8)^12] = .65640261632 or .656
I'm not sure how your instructor came up with .678 instead of .656, but the premise on which its' based is sound.
Good luck in your studies,
~ Mitch ~
EDIT:
My stats book doesn't cover multinomial probability,
despite being 500+ pages.
Albeit, my answer is very close, but Merlyn has this one.
Nicely done there Merlyn!
2007-11-20 23:36:53
·
answer #2
·
answered by Mitch 7
·
0⤊
0⤋