News for hackers. Stuff that matters.
Re:The Unreasonable Effectiveness of Conditional Probabilities by amluto on Wednesday February 22, 2023 @02:27PM (#34901248)
I agree - the OP’s explanation is terrible. What does this even mean:

> From a fundamentals perspective, the expected number of meals is a function of the probability of finding the fourth toy in any specific meal.

I can barely parse it. The probability of finding the nth toy before the nth meal is 0, so is the answer a function of 0? Or maybe the probability of finding the toy with index 4 in a specific meal is 1/4, and the answer is a function of 1/4?

Anyway, if you drink another coffee and stop reducing your fractions, you get a nicer way to say the answer :) . After getting n different toys, the probability of a duplicate on the next try is n/4, so the probability of a new toy is 1-n/4 = (4-n)/4, and it takes 4/(4-n) draws on expectation to go from n to n+1 toys. So to do from 0 toys to 4 toys takes 4 * (1/4 + 1/3 + 1/2 + 1/1) tries on expectation, because you can just add the expected number of tries for each new toy.

Re:The Unreasonable Effectiveness of Conditional Probabilities by kgwgk on Wednesday February 22, 2023 @03:24PM (#34902092)
>> From a fundamentals perspective, the expected number of meals is a function of the probability of finding the fourth toy in any specific meal.

> I can barely parse it. The probability of finding the nth toy before the nth meal is 0, so is the answer a function of 0?

The probability of finding the fourth toy in the first meal is 0%.

The probability of finding the fourth toy in the second meal is 0%.

The probability of finding the fourth toy in the third meal is 0%.

The probability of finding the fourth toy in the fourth meal is 9.4% or whatever.

The probability of finding the fourth toy in the fifth meal is p5.

Etc.

The expected number of meals is 1 x 0% + 2 x 0% + 3 x 0% + 4 x 9.4% + 5 x p5 + 6 x p6 + ...

Re:The Unreasonable Effectiveness of Conditional Probabilities by kgwgk on Wednesday February 22, 2023 @05:41PM (#34904053)
More precisely:

The probability of finding the fourth toy in the first meal is 0%.

The probability of finding the fourth toy in the second meal is 0%.

The probability of finding the fourth toy in the third meal is 0%.

The probability of finding the fourth toy in the fourth meal is 3/32 = 9.4%.

The probability of finding the fourth toy in the fifth meal is 9/64 = 14.1%.

The probability of finding the fourth toy in the sixth meal is 123/512 = 24.0%.

The probability of finding the fourth toy in the seventh meal is 135/1024 = 12.0%.

The probability of finding the fourth toy in the eight meal is 903/8192 = 11.0%.

The probability of finding the fourth toy in the ninth meal is 1449/16384 = 8.8%.

Etc.

The expected number of meals is 1 x 0% + 2 x 0% + 3 x 0% + 4 x 9.4% + 5 x 14.1% + 6 x 24.0% + 7 x 12.0% + 8 x 11% + 9 x 8.8% + ...