Friday, June 16, 2017

using a coin as a 7-sided die

This method doesn't result in evenly distributed probabilities, but I've found it useful all the same. I want to have a random rest-and-fasting day every week, so how can I randomly select one day out of seven to be that special day? An idea came to me: I can use a regular old coin! The coin-toss method works this way:

1. Let heads = Sunday through Wednesday (4-day range).
2. Let tails = Wednesday through Saturday (4-day range).
3. First toss (or 2 out of 3) determines which half of the week will contain the special day.
4. Second toss: let heads = first two days; let tails = second two days.
5. Third toss: let heads = the 1st of the 2 remaining days; let tails = the 2nd.

Et voilĂ !

How this works in a practical sense:

1. I flip the coin; it comes up heads, so I know my special day will be S, M, T, or W.
2. I flip the coin again; it comes up tails, so now I know my special day will be T or W.
3. I flip the coin a third time; it's heads, so I know my special day will be T.

And there we go. On the designated day, I'll take a break from working out, but I'll also fast.

Of course, by doubling up on Wednesday, I increase the chance that Wednesday will be my "random" day (i.e., Wednesday will always make it past the first coin toss). If you can think of a better way to select randomly from among seven days with equal probability, let me know in the comments, and I might even adopt your method.


Charles said...

I always go to for my randomness needs.

Kevin Kim said...

I'll check it out. Thanks.

TheBigHenry said...

Go to:

set lower limit = 1
set upper limit = 7
press enter

This generates a random integer between 1 and 7, inclusive.

It is based on the algorithm [integer = random X 7 + 1], where "integer" is truncated, and "random" is a machine-generated random number between 0.0 and 1.0, exclusive of the endpoints.

Your coin-toss method will choose Wednesday twice as often as any other day.

Kevin Kim said...


You're right about the coin-toss method, of course. I'll check out the site you've recommended. Charles's site claims to employ "true randomness" through the constant checking of atmospheric disturbances.

TheBigHenry said...

"True randomness" is a meaningless expression. There are many practical measures of randomness that can compare the efficacy of various random number generators. But the "truth" of any such generator is a relative term.

In any case, I don't think your application requires any sort of strenuous search for the ultimate random number generator.

Download a random number generator app for your smartphone, then use the algorithm I specified to pick your random day of the week.

TheBigHenry said...

Here is a way to simplify your "coin toss" scheme by using a 6-sided die:

For week #1 arbitrarily eliminate one weekday, let's say Sunday (but any other choice will do). Roll the die (1-6) to determine your off-day from (M, T, W, T, F, S). Suppose you roll a 3. Then your off-day for week #1 will be Wednesday.

For week #2 you eliminate Wednesday from your choices, namely (M, T, T, F, S, S). Suppose you roll a 5. Then your off-day for week #2 will be Saturday.

For week #3 you eliminate Saturday from your choices, etc.

In the long run and on average, each day of the week will be chosen at random with equal probability. Moreover, your off-day will always be a different day of the week from the previous week.


Kevin Kim said...

Excellent idea, Henry. Thanks.