Hacker News new | ask | show | jobs
by mherdeg 5431 days ago
Just to quickly follow up: the answer that the system accepts as correct is roughly the answer I get when I compute the answer to the question "if I pick an item at random from the list of 250 items, what is the probability that that item appears to be a special and actually is not a special"?

I say "roughly" because they're almost the same order of magnitude, but still off by a few insignificant digits.

I wonder whether that has something to do with either of these assumptions I made:

[3] No two items have the same code.

[4] Five DISTINCT randomly chosen items are "specials" (it is not possible for today's specials to be the first item on the list five times).

1 comments

That's curious. I initially tried a solution like this and got a result that differed from the expected result by a small amount. I discarded this solution and looked for others when rajatsuri said the first part of q2 assumes that the customer has already picked items that appear to be available.

Edit: By turning the 2 assumptions you mentioned on or off, I am only able to produce answers that are slightly too large or slightly too small. I wonder what the correct question is...