In: Statistics and Probability
n chips manufactured, two of which are defective. k chips randomly selected from n for testing.
Q1. What is Pr(a defective chip is in k selected chips) ?
n persons at a party throw hats in a pile, select at random.
Q2. What is Pr(no one gets own hat) ?
Q3. Plot Pr (no one gets own hat) in the Y-axis and n=[1,1000] in the X-axis (~pmf)
1) The number of ways chips can be selected out of chips is .
2)We know different men can draw hats in ways.
Let the event be the event that -th man picks his own hat. He can get his hat in ways.
Cardinality, and
Generally,
Now, .
Generally,
More generally,
Using inclusion exclusion principle, the probability that at least one person draws his/her hat is
The probability,
3) The above probability is plotted for using R.
n <- 20
p <- array(dim=n-1)
for(i in 1:n-1)
{
p[i] =0
for (j in 2:(i+1))
{
p[i]=p[i]+(-1)^j/factorial(j)
}
}
plot(1:1)
dev.new()
x <- 2:n
plot(x, p,col="blue", lwd=2, xlab="number of people", ylab =
"Probability ", main="PMF")
We can see that converges to
.