A full house with three aces will beat any other full house dealt in this hand, because only one hand can have three aces, assuming no cards are wild. But even this can still lose to a superior hand — four of a kind or a straight flush.

There’s nothing we can do to reduce the possibility that another player holds four of a kind — if we’re holding a full house then 11 varieties are possible. But by choosing carefully we can minimize the likelihood of a straight flush. Specifically, each of the hands AAA99, AAA88, AAA77, and AAA66 will prevent 13 straight flushes — each ace prevents one, and each spot card prevents five.

These are thus the best to choose; of the 40 possible straight flushes, each leaves only 40 – 13 = 27 straight flushes that can beat us. By contrast, the impressive-looking AAAKK leaves 40 – 6 = 34, or even more if we haven’t covered all four suits.

From Aaron Friedland’s Puzzles in Math and Logic, via Peter Winkler’s Mathematical Mind-Benders.