Picking the winner of this $100 Amazon gift cert from survey responders

Remember this survey? https://link.webropolsurveys.com/S/94D53F822AB0FDD9
It’s all about how you use Beeminder and was made by researchers in Finland who, btw, would still be grateful if more of you took it. But you’ll have to do so out of the goodness of your hearts now because we’re picking the winner of our bribe from the list of 30 people who filled it out and included an email address.

The bribe was a $100 Amazon gift certificate. So we need to randomly pick one of these folks. Actually I checked how I announced this and I never promised to pick randomly. So I started thinking about ways we could pick based on merit (forum contributions?) or who pays us the most money. Then a little angel popped up on my shoulder who was not happy with that line of reasoning at all. I’ll spare you all his moralizing but, here’s the funny part: I acquiesced and started typing RandomInteger[{1,30}] in Mathematica but then a meta-angel popped up on the first angel’s shoulder and pointed out that if the first angel was needed to convince me not to pick my BFF out of the list then why should anyone trust me to draw randomly?

Long story short (alright, short story needlessly drawn out by anthropomorphizing every intermediate thought I had along the way), I decided it would be interesting or fun or fair or whatever rationalization for my nerdery is handy, to not only randomize but to prove I was randomizing. How to do that? I got the idea from the xkcd about geohashing. I just commit to the ordering of people (below) and then use tomorrow’s Dow opening price to construct a random number from 1 to 30 like so:

Mod[Hash["19614.81", "MD5"], 30] + 1

That “19614.81” was today’s (2016-12-08) Dow opening so I’ll just replace that with tomorrow’s and we’ll have our winner! (Today that would’ve chosen #4, Doug.) [1] After all that build-up I presume someone will double-check me to make sure I don’t cheat.

PS: Oh hey, a little devil appeared on my other shoulder and suggests that the winner should have to read this and correctly determine that they are in fact the winner, with the procedure repeating every business day until someone succeeds. (With disqualification for wrong claims, of course.) Oh, whoops, the angel just slapped him and said “no techie favoritism!”. Never mind that then.

Here’s the list of candidates:

  1. Adam
  2. Scott
  3. Dan
  4. Doug
  5. Jay
  6. Nevan
  7. Jessie
  8. Robin
  9. Will
  10. Michele
  11. Stefan
  12. Josh H
  13. Josh P
  14. Clarissa
  15. Lawrence
  16. Vladimir
  17. Neil
  18. Anna
  19. Bryan
  20. Tom
  21. Allison
  22. Jason
  23. Nick
  24. Adrian
  25. Noah
  26. Israel
  27. Melissa
  28. Louis
  29. David
  30. Jen

Good luck!


[1] WolframAlpha will compute this if you ask, for example, “md5 hash of 19614.81” and then click the integer form to get a new query with that number and append “mod 30” and then add 1. I don’t know how to put parens around things in WolframAlpha to get it to nest different computations.

2 Likes

Drum roll… The Dow opening today (2016-12-09) was 19684.26 so

Mod[Hash["19684.26", "MD5"], 30] + 1

returns 27 so Melissa is the winner! :tada: :confetti_ball: :exclamation:

(Assuming she replies to my email informing her. I better be creative about the subject line. “You’ve just won a $100 Amazon gift certificate” is the kind of thing that would go from my eyeballs to my fingers hitting the spam button without it ever entering my conscious brain.)

I won! I won! Thank you!

And for all who wondered, the subject line was suitably enticing and creative. Although it’s funny… I spent a split second cursing my priority inbox filter for putting a regular old beeminder email in my priority inbox. So it made the surprise even sweeter!

1 Like

I would have:

  • chosen a random 256-bit value (expressed as hex, to make life easier)
  • revealed the hash of the value
  • the next day, concatenated that value with the output of the NIST randomness beacon (and, sure, the Dow opening, why not), hashed all that together to choose the winner, and revealed the value and the winner.

This scheme is secure even if someone can manipulate the Dow opening value to choose the winner. There are more sophisticated schemes where multiple parties precommit to secrets and the winner is random so long as even one party is not colluding with the others.

1 Like

I love that there’s an elegant way to make this robust to any amount of manipulation short of everyone colluding!

I’m ok with living on the edge though and presuming a hash of the Dow can be universally trusted as a random number. I hadn’t known about the NIST randomness beacon, which is super cool, but I actually feel like the Dow hash is more trustworthy. Just in the sense that, if you also hadn’t heard of the NIST randomness beacon then you’d have to take the time to make sure I didn’t fabricate that whole site. The Dow opening you can just google. And running it through a hash makes it perfectly random despite the high day-to-day correlation. Also I bet it would be cheaper for a determined adversary to hack what NIST reports than to manipulate the Dow. It would take a lot of capital to nudge the Dow by a penny and much more to nudge it adaptively as it bounces around for its own reasons, getting it to land where you needed it to.

1 Like