Jump to content

Probability Question

Featured Replies

If I have x number of balls in a lottery, how many times will I have to draw a ball at random and replace it before I draw a ball that has already been drawn once before?

 

I developed an algorithm to solve this, I think it works, not entirely sure. But I was wondering how to solve it algebraicly, here is my algorithm:

 

t = number of balls in lottery
x = 1
n = 0

while (x>0.5) {
   n = n + 1
   x = x * (t - n + 1) / t
}

Answer = n

the question is badly worded. and the answer is x+1 if we assume you mean "have to draw a ball that has been drawn before". obviously, by the pigeon hole principle in x+1 draws there is at elast one repetition, and in x draws it is possible to get each balle xactly once.

 

however, you might mean "draw with probability freater than 1/2 a balll that has been drawn before, and that is a simple exercise in probability (geometric i think).

  • Author

Yes, sorry matt. You are right, drawn with a probabilitiy greater than half. Would you care to show me how you would solve this?

  • Author

[math]\frac{n!}{n^n}[/math]

But how does that help?

 

EDIT: OK, perhaps this is better, but I how would I then solve for n?

 

[math]\frac{t!}{t^n.(t-n)!}<0.5[/math]

  • Author
that is a simple exercise in probability (geometric i think).

 

Is it harder than you realised or have you moved on?

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.