# What are the odds of finding 20 needles in 270 haystacks?

December 1, 2004 7:40 AM Subscribe

Suppose there are 20 objects hidden in a collection of 270 haystacks. What are your odds of searching 100 haystacks (assuming that if you choose to search a haystack with an object in it, you'll find that object) without finding an object? My discrete math skillz have eroded to the point where any attempt to work this out myself yields preposterous numbers..

As a follow up to this - what are the chances that you would not find one of those 20 objects after unrolling 100 haystacks over an 8 hour period?

posted by GrumpyMonkey at 7:44 AM on December 1, 2004

posted by GrumpyMonkey at 7:44 AM on December 1, 2004

can you have more than one object in a single haystack?

posted by andrew cooke at 7:47 AM on December 1, 2004

posted by andrew cooke at 7:47 AM on December 1, 2004

No, those minus signs should be division signs.

If I do my math right, that gives you 4x10-12 (4 times 10 to the minus 12th power).

posted by Doohickie at 7:49 AM on December 1, 2004

If I do my math right, that gives you 4x10-12 (4 times 10 to the minus 12th power).

posted by Doohickie at 7:49 AM on December 1, 2004

COBRA!, i know what you did last night last night.

posted by naxosaxur at 7:51 AM on December 1, 2004

posted by naxosaxur at 7:51 AM on December 1, 2004

At the end there were only 12 objects to find, since 8 of the objects were removed by others and not replaced. That hurts the odds and needs to be reflected.

posted by smackfu at 7:52 AM on December 1, 2004

posted by smackfu at 7:52 AM on December 1, 2004

God, I felt bad for her. I would have given up about hour two.

I can only think there must have been one, she just missed it. I can't imagine how hard it would be to search in the dark.

posted by dual_action at 7:53 AM on December 1, 2004

I can only think there must have been one, she just missed it. I can't imagine how hard it would be to search in the dark.

posted by dual_action at 7:53 AM on December 1, 2004

Listen, dude. Stop fucking around with probabilites and just get out there with a pitchfork. You'll find those objects.

posted by vraxoin at 7:53 AM on December 1, 2004

posted by vraxoin at 7:53 AM on December 1, 2004

I was dumbstruck that they could not find a clue packet after eight hours of unrolling the bales.

(For those who don't watch, the question refers to a challenge in this week's episode of "The Amazing Race")

posted by briank at 7:54 AM on December 1, 2004

(For those who don't watch, the question refers to a challenge in this week's episode of "The Amazing Race")

posted by briank at 7:54 AM on December 1, 2004

If there can be one and only one object per haystack, then the chances of finding an object in any random stack would be 20/270 (0.074). The chances of picking a random stack and NOT finding an object then would be 1-0.074= 0.925 (good chances). The chances of this happening twice would be 0.925 squared (0.857), for three stacks would be 0.925 cubed and so on. If I'm right the chances of choosing 100 haystacks and not finding simngle object would be (1-(20/270))^100=4.54e-4, or something like 0.00045. Not very likely

posted by golo at 7:57 AM on December 1, 2004

posted by golo at 7:57 AM on December 1, 2004

I found it distinctly unfair to end an elimination leg with a pure luck challenge. They've done that before, and it just infuriates me.

(still one of the best shows, though)

posted by pardonyou? at 7:57 AM on December 1, 2004

(still one of the best shows, though)

posted by pardonyou? at 7:57 AM on December 1, 2004

250/270 x 249/269 x 248/268 x ... x 151/171 = 3.8 x 10-9(3.8 times 10 to the minus 9th power)

posted by Doohickie at 7:58 AM on December 1, 2004

posted by Doohickie at 7:58 AM on December 1, 2004

smackfu's right, but I wanted to leave out that complication until the easier version was worked out.

And only one object per haystack, andrew cooke.

It's important to me to work this out, because my wife had ten bucks riding on Lena and Kristy, and I'm trying to console her with the knowledge that she's the victim of a statistical freak accident.

posted by COBRA! at 7:59 AM on December 1, 2004

And only one object per haystack, andrew cooke.

It's important to me to work this out, because my wife had ten bucks riding on Lena and Kristy, and I'm trying to console her with the knowledge that she's the victim of a statistical freak accident.

posted by COBRA! at 7:59 AM on December 1, 2004

golo: With each haystack checked, the denominator decrements by one. For each pick, there are (n-20)/n possible good picks, and n goes from 270 to 171 (one hundred trials)

posted by Doohickie at 8:00 AM on December 1, 2004

posted by Doohickie at 8:00 AM on December 1, 2004

*250/270 x 249/269 x 248/268 x ... x 151/171 = 3.8 x 10-9(3.8 times 10 to the minus 9th power)*

That's the construction I was using, but that can't be right, can it? That seems outlandish. I guess it

*was*outlandish, though.

posted by COBRA! at 8:02 AM on December 1, 2004

if it's a single object per haystack, then you have 250 haystacks without objects, at first. so the probability of picking an "empty" haystack is 250/270. the probability of picking another is then 249/269. and so on. so the final total probability (for 100 haystacks) is (250x249x...151)/(270x269x...171) which is (250!/150!)*(170!/270!). which is about 1 in 16000. so you are very likely to find an object.

and it doesn't matter how many hours it takes.

posted by andrew cooke at 8:02 AM on December 1, 2004

and it doesn't matter how many hours it takes.

posted by andrew cooke at 8:02 AM on December 1, 2004

Yep, I agree with andrew cooke.... 1 chance in 16,223. I ran the numbers wrong the last time.

I think we have an answer.

posted by Doohickie at 8:06 AM on December 1, 2004

I think we have an answer.

posted by Doohickie at 8:06 AM on December 1, 2004

pardonyou?: I agree with you completely, but plenty of other teams have been eliminated due to pure luck (such as slow cab drivers and airplane delays). OK, back to the math.

posted by gyc at 8:07 AM on December 1, 2004

posted by gyc at 8:07 AM on December 1, 2004

Thanks Doohickie. Apparently I was thinking of choosing 100 stacks at a time, not choosing one by one and checking their contents before continuing.

posted by golo at 8:20 AM on December 1, 2004

posted by golo at 8:20 AM on December 1, 2004

In terms of probability, it's my understanding that it doesn't matter whether you choose 100 stacks at a time or if you choose one and check before continuing. (Well, assuming you don't accidentally pick a stack you already chose.)

posted by box at 8:25 AM on December 1, 2004

posted by box at 8:25 AM on December 1, 2004

However, it's still a real world problem and I think she might have missed one or two of the clues in bales she unrolled (at one point her sister told her to look around in the already unrolled stacks which she did listlessly) what with the fatigue and the panic and the running around, so that fuzzies the odds. (as Dual_Action points out)

As long as we're on the topic that screamy dude with the died blue hair at the back of his head needs to be fired out of a cannon into a pit of rats with herpes. I want to find his wife and pay for her divorce lawyer even though I'm poor.

posted by Divine_Wino at 8:28 AM on December 1, 2004

As long as we're on the topic that screamy dude with the died blue hair at the back of his head needs to be fired out of a cannon into a pit of rats with herpes. I want to find his wife and pay for her divorce lawyer even though I'm poor.

posted by Divine_Wino at 8:28 AM on December 1, 2004

andrew cooke's got it. Another way of arriving at the solution: there are C(250, 100) unique selections of 100 haystacks that have no hidden item (where C(., .) is a binomial coefficient). There are C(270, 100) total unique selections of 100 haystacks. So the probability of not finding an item is C(250, 100) / C(270, 100) = (250!/100!/150!) / (270!/100!/170!) = (250!/150!)*(170!/270!)

posted by Galvatron at 8:35 AM on December 1, 2004

posted by Galvatron at 8:35 AM on December 1, 2004

There is an additional assumption being made that if you search a haystack, then you are guaranteed to find the object hidden within it.

Of course, this is completely untrue, hence "needle in a haystack".

This complication shortens the odds of not finding a single clue.

posted by saintsguy at 9:17 AM on December 1, 2004

Of course, this is completely untrue, hence "needle in a haystack".

This complication shortens the odds of not finding a single clue.

posted by saintsguy at 9:17 AM on December 1, 2004

This was on in the background last night while we were applying for mortgage refinancing. My contribution to the financial pursuit went something like this:

"She's still fucking looking . . . still looking . . . oh my God, the old people caught up to them . . . it's dark now."

posted by yerfatma at 9:17 AM on December 1, 2004

"She's still fucking looking . . . still looking . . . oh my God, the old people caught up to them . . . it's dark now."

posted by yerfatma at 9:17 AM on December 1, 2004

*As long as we're on the topic that screamy dude with the died blue hair at the back of his head needs to be fired out of a cannon into a pit of rats with herpes.*

Send the guy with the two little bundles of hair on his forehead with them. And I'm very worried that the old couple and the father/daughter team will get eliminated and there will be no one to root for.

posted by Mayor Curley at 9:37 AM on December 1, 2004

You can always watch and root for Bolo to spontaneously combust. It's going to happen.

posted by COBRA! at 9:58 AM on December 1, 2004

posted by COBRA! at 9:58 AM on December 1, 2004

I dunno the answer to the math problem, but who knew wathching pro wrestlers trying to count stuffed animals and non-stick bakeware could be so damn entertaining!

posted by spilon at 2:42 PM on December 1, 2004

posted by spilon at 2:42 PM on December 1, 2004

Here's a game that let's you relive Lena's search from the comfort of your own home.

posted by amarynth at 12:57 PM on December 7, 2004

posted by amarynth at 12:57 PM on December 7, 2004

This thread is closed to new comments.

Do I pass the test?

posted by Doohickie at 7:44 AM on December 1, 2004