pytudes icon indicating copy to clipboard operation
pytudes copied to clipboard

Wordle: Adjust expected_wins for bin size

Open jobevers opened this issue 2 years ago • 0 comments

Let M = 2315 (total number of possible answers) and n = the size of bin for pattern n.

In the original version

P(Guess in 2) = 1/M * Sum(Prob(Guess in 2 | Pattern))
              = 1/M * Sum(1 / n) 

But, by Total Probability, I believe the formula should be:

P(Guess in 2) = Sum(Prob(Guess in 2 | Pattern) * P(Pattern))
              = Sum(1 / n * n / M)
              = 1 / M * Sum(1)

The result is counter-intuitive to me, but the probability of a guess in 2 only depends on the number of (non-empty) bins/partitions that are created from a guess.

Credit to @fitzme for help verifying the math.

jobevers avatar Mar 07 '22 17:03 jobevers