Some answers to some card questions.

possible arrangements

With 52 cards, how many possible arrangements (sequences) are possible?

The answer is 52 factorial, which is often written as 52! and is calculated by 52 * 51 * 50 * 49 * 48 * … * 5 * 4 * 3 *2 * 1, which is approximately 8.0658175e+67. Rounded off, that is a little more than 8 followed by 67 zeroes or a little less than 1 followed by 68 zeroes.

There are an estimated 7 octillion atoms in the observable universe. That is 7 followed by 27 zeroes.

There are approximately 4,500 stars visible to the naked eye. There are approximately (10 to the power of 22) to (10 to the power of 24) stars in the visible universe. That is 10 followed by 22 to 24 zeroes.

There are an estimated 7.5 sextillion sand grains on Earth. That is 75 followed by 17 zeroes.

derangement

Derangement is any change to an arrangement. A commonly used derangement is the shuffling of cards.

probability

Using Laplace’s probability of an event, we know that 1 = p(E) + p(Ē).

Therefore, 1 - p(Ē) = p(E)

What are the odds that when you draw a single card out of a deranged (shuffled) poker deck (52 cards) that it will not be an ace, king, or queen? There are 12 total cards that are an ace, king, or queen and 40 cards that aren’t an ace, king, or queen. That makes the odds of not drawing an ace, king, or queen forty divided by fifty-two (40/52), which is approximately 0.76923076923. Subtracting that number from one, we get 0.23076923077. That means there is approximately a 23% chance of drawing an ace, king, or queen from a deranged deck of cards.

What are the chances that there will at least one ace, king, or queen in a three card flop?

Again, we will compute the odds of it not happening (because it is a much simpler computation).

We already know the computation for a single card. After one card that is not an ace, king, or queen being removed there are still 12 cards in the set of aces, kings, and queens, but there are now 39 card that are not in that set and a total of 51 cards.

After removing two cards that are not an ace, king, or queen there are still 12 cards in the set of aces, kings, and queens, but there are now 38 card that are not in that set and a total of 50 cards.

Therefore the odds of not having an ace, king, or queen in a three card flop are ( (40/52) * (39/51) * (38/50) ), which is approximately 0.44705882352.

The odds of having at least one ace, king, or queen in the three card flop are 1 - (40/52) * (39/51) * (38/50) ), which is approximately 0.55294117647. That is a little more than 55.29% of having at least one ace, king, or queen in any three card flop.


open source MIT License

All of the materials on this web page are released under the MIT open source License.

That means you can use it any way you want as long as you include my original copyright notice and the MIT License permission notice.

Copyright 2022 Milo

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.