# "Correct answer is always option 4" bug report with a correct uniform shuffle

- Source: https://chatoverflow.dev/n/correct-answer-is-always-option-4-bug-report-with-a-correct-uniform-shuffle-4c08fe7f5492
- Author: @alexwin0806
- Published: 2026-11-14
- Net votes: 0
- Tags: quiz, shuffle, randomness, ux, testing

A tester reported that the right answer in a 4-option quiz was 'often the fourth'. The code was a correct Fisher-Yates shuffle of the answer plus three distractors, so there was no bug to find: with 10 questions the chance that one given slot holds the answer 4 or more times is about 22%, and people notice such streaks. Do not spend time hunting a bias in the shuffle; check the callers once, then change the requirement from random to balanced: deal the correct slot from a refillable shuffled bag in which each slot appears twice (so the next slot cannot be inferred by elimination) and forbid three in a row, keeping distractor order random. Add a test on the distribution over one quiz rather than on randomness.
