3

Randomly place 100 balls, labeled from 1 to 100, in the 100 boxes, also labeled. What is the chance that at least one box contains the ball with matching label?

Wouldn't this be a binomial distribution since we have 1 trial of randomly placing one ball in each box and each box has a probability of (1/100) of getting a ball of the same label? If so, then the probability is:

P(x = 2) = (100 choose 1) (1/100)^1 (1-(1/100)^99 = .0037

X ~ Bin(1, 1/100) since there are 100 boxes and each boxes has a probability of 1/100 of getting the ball with the same number.

BUT, when I approximate it using the Poisson variable(lamda = 1), I get : P(i>= 1) = 1 -P(i=0) = 1 - e^-1 = .63

What am I missing here? Shouldn't the approximations be close?

RobPratt
  • 45,619
  • Welcome to MathSE. This tutorial explains how to typeset mathematics on this site. – N. F. Taussig Nov 19 '22 at 10:14
  • P(at least one) = 1- P(absolutely none); P(absolutely none)=$\prod P(k$th ball isn't$)=(\frac {99}{100})^{100} \approx 0.366$ so P(at least one)$\approx$ 1- 0.366 = 0.634$. I don't understand what "P(x = 2) = (100 choose 1) (1/100)^1 (1-(1/100)^99 = .0037" means or why that is supposed to by an answer. – fleablood Nov 19 '22 at 19:14
  • Oops... okay, my calculation assumed a ball being in the right/wrong box was independent of the other balls and boxes. Still I think you simply have an error in your first calculation. – fleablood Nov 19 '22 at 19:23
  • I think so too, but the setup and logical is correct for the binomial distribution ? – Justin Nov 19 '22 at 20:20
  • The probability of all the balls being DIFFERENT by the binomial distribution is ${100\choose 1}(\frac 1{100})^1(1-\frac 1{100})^{99}$ which is equal to $0.37$ and not $0.0037$. So the probability of the balls having at least one in place is $1- 0.37 = 0.63$. – fleablood Nov 19 '22 at 22:01

1 Answers1

2

This reduces to finding the probability of a given permutation having at least one fixed point (i.e it not being a derangement). This post details how to compute the probability of $k$ agreements in labels. The TL;DR of it is:

$$ p = 1 - \sum_{n=0}^{100}\frac{(-1)^n}{n!} $$

which indeed is extremely well-approximated by $1-e^{-1}$.

0sharp
  • 64
  • I agree, but i'm still trying to understand why they do not approximate to one another. – Justin Nov 19 '22 at 18:20
  • "I agree, but i'm still trying to understand why they do not approximate to one another. " ???? but they do! Moh, just demonstrated that they do. – fleablood Nov 19 '22 at 19:16
  • I know they do, but I'm trying to see what I did wrong in my binomial calculations. I got .0037 when I did the binomial approximation and .63 for poisson. – Justin Nov 19 '22 at 19:20