Category Archives: Geekdom

MegaMillions

1 in 135,145,920

Those are the odds of winning the mega lottery jackpot tonight. The jackpot is roughly $376,900,000 right now*. I wanted to know how many games of roulette you’d have to win before you’d have the same odds as winning the lottery. My next obvious question: if you won every time would you have more or less money than if you’d won the lottery?
*$376M is the cash return. The payment over time is the more popularly advertised value of $600M

A few assumptions:
1. This is a no limit roulette table
2. You bet all your winnings on the next winning color every time (no green!)
3. Luck is very much your lady tonight

Playing either red or black on a roulette wheel will return a 48.6% win rate.

So 0.486^x = 1/135,145,920 should tell us how many spins!

what’s the result? twenty six spins!
Actually not exactly twenty six spins, that’d be amazingly coincidental.
26 spins is 1/140,429,063
Close enough for MikeDiDonato.com!

Let’s see which option has a better return on investment:

A lottery ticket costs $2.00.
Each roulette win gives you 2:1 odds.

26 wins in a row would return $67,108,864
Sounds like you should head to the convenience store instead of the casino tonight.

But then again… how many more spins would surpass the $376M?
Twenty nine spins (total $536,870,912)- although one more correct call would put you over a billion… it is worth it? Just one more spin? What do ya say?

Halloween Candy Trial

Happy Halloween everybody!

This year I had been planning to dress up as Clippy, the helpful persistant Microsoft Paper Clip, but the halloween party I was invited to ended up getting canceled. Such a shame, as I had been looking forward to walking up to people and trying to help them with various tasks that they weren’t doing.

“Hi. It looks like you might be trying to dip your chip into your beer. Would you like some help?”
“Oh, hello there. It looks like you’re trying to write a text to an exgirlfriend. Would you like help?”

Anyway, I didn’t end up dressing up and instead I just gave candy away at home – but why not use this as an opportunity for a one on one battle between two different candy bars.

SNICKERS VS TWIX CAGE MATCH

I bought two boxes of the largest candy bars I could find in two varieties: Snickers and Twix

When the kids came to the door, I offered them a choice of one or the other. What happened?!? First, let’s run basic stats on the candy bars.

Snickers: 3.29oz (93.3g)
Package Dimensions: 150mm x 32mm x 27mm
Calories: 280
Approx Density: 717kg/m^3

Twix: 1.79oz (50.7g)
Package Dimensions: 120mm x 45mm x 20mm
Calories: 250
Approx Density: 469kg/m^3

Notes: At 150mm in length the snickers is much more of a king sized bar than the twix. The packaging also seems more densely packed because they don’t need to split the candy bar into two different bars like Twix.

Hypothesis:
With the significant size and density advantage of the Snickers coupled with the far superior branding strategy, I submit that more snickers will be taken by Halloween trick or treaters.

Data Gathered:
Snickers taken: 23
Twix taken:23

Conclusion:
WHOA! I was WAY OFF. Against all odds, the Twix were chosen with the same frequency as the Snickers! What a shocker! While the tally is a statistical dead heat, I think Twix pulled off a BIG win here. Volume of chocolate is a major factor and that Twix defeated Snicker’s size advantage is very telling. My highly unscientific experiment suggests that Twix is the preferred candy bar.

A few potential areas of error in my study:

1. The boxes came in different sizes. I had 24 snickers and 36 twix. As the snickers began to dwindle down there was the potential that a kid might have been socially pressured not to take the last remaining Snickers. However, countering this suggestion, when goaded to take the last one, a tiny superhero retorted “No way, I want a Twix”
2. I’m fairly certain that a vampire grabbed two Snickers while I was distracted by a princess that was struggling up the stairs. My data might be flawed.
3. One parent took a candy bar. Who does that?!? Parents, the candy is for the kids!
4. As everyone knows, a sample size less than 30 is pretty weaksauce. T-Statistics are sooooo amateur.

SIDESWIPED!

The downside to this week’s vacation was unquestionably a car accident. While at dinner in Wellfleet, Ma (at an excellent place called Winslow’s Tavern – I strongly recommend it), a car knocked off my drivers side mirror while I was parked and then left the scene of the crime.

Since I happen to be deep within a spell of justice books, let’s take this hit-and-run as an opportunity to analyze why situations such as these are so frustrating.

The immediate reaction to something like this is anger. Anger at the perpetrator, anger at myself for not pulling more tightly into my parallel parking spot and even anger at my waitress for not getting me the bill sooner so that I could have avoided the hit altogether.

But that’s rash emotive response. Let’s try and look at it more analytically. The perpetrator was reported by witnesses as being a woman driving a silver honda. Let’s call her Ronda. Why does Ronda’s action trigger my anger response?

The obvious answer is that because Ronda drove away I am now responsible to pay for my car… actually, not even my car. It really comes down to me paying an insurance deductible.

But the injustice is deeper than a $500 deductible. I’m emotionally frustrated more by this than I would be a $500 brake job. I feel as if I have been violated. It isn’t the money as much as Ronda not taking ownership of the damage she inflicted that truly furrows my brow.

Still, is my anger justified?

Immanuel Kant’s theory of justice centers to a fair extent around the motive of an act. It is Kant’s belief that when something happens, anything really, we should act out of duty. Not self righteousness but duty. Kant argues that any act of good nature is only truly just if its done out of duty without any tie to personal benefit. That time you gave an elderly woman your seat to better favor your social standings to your date? Yeah, you get no moral credit for that action. Kant says motive is the top dog. By Kant’s reasoning, Ronda should have left her contact information for me out of pure duty – nothing more. Not out of empathy or apology, simply out of duty towards society. But she didn’t.

Why didn’t she?

This first step to understanding my emotions involves trying to dig into Ronda’s motive. My reaction would be dramatically different if Ronda was rushing to a hospital to get her pregnant daughter medical attention. But in fact, we know this was not the case because when I left the restaurant I inadvertently saw Ronda in her silver honda inspecting her car as it was pulled over before she drove off.

Oh the fury! This was a fully intentional hit and run! Kant would be reeling!

Well, probably. We can’t discount other motives. Perhaps she can’t pay for such an accident because she needs to feed her family. This motive would certainly lesson the accident’s sting.

BUT, if Ronda burned me intentionally, we totally have a right to be angry. There’s two levels of anger. Anger at the lack of restorative justice, and anger at the lack of retributive justice.

That $500? That’s restorative injustice. I was wronged in such a way that I can not seek reparation for the damages. If Ronda had left a note, I would have been financially compensated. This is the blander of the two injustices.

The insult lies in retributive justice. This is a lot like the old adage “an eye for an eye.” The punishment should equate with the crime. Rhonda should be punished for the unfairness that was imposed upon me. Ronda’s action violated my freedoms by forcing me to visit a police station twice, miss some time at work getting my car to a shop and, of course, there’s the dollars spent fixing the vehicle. And yet there is no retribution. Ronda got off free.

How repugnant.

I think these compensatory arguments provide a nice summary of the distaste for such a situation. That said, I’m no expert. If any of you folks have a better understanding of the philosophy or psychology (Theresa?), I encourage you to add to the conversation.

Hanging with Geeks.

I have been sucked into the glory of Zynga games.

Zynga is a gaming company that focuses on simple social media games. My favorites include the hits:
Words with Friends
Scramble with Friends
and
Hanging with Friends

Words with Friends? Scrabble.
Scramble with friends? Boggle.
Hanging with Friends? Hangman.

Let’s talk about Hanging with Friends (HwF) for a minute. It’s a simple simple game. You have a certain number of guesses to guess a word. Zynga does strategy right by reducing the number of guesses for the longer words (because there are obviously more letters per word that are correct). For each word you guess incorrectly, you lose a balloon. Once you lose five balloons, you lose.

When it’s your turn to make a word, you’re given 12 random letters from which you can craft the word your opponent must guess. But… are they random letters? If I knew the letter distribution, I’d have a better ability to guess my opponents words.

So I recorded 12 letters per game for 100 games. 1,200 letters.

The letters (in chunks of 20 games)

The first obvious conclusion: There are always four vowels.

So how were the four hundred vowels split in my sampling?

A: 65
E: 134
I: 81
O: 71
U: 49

Not an even distribution but this is certainly not surprising. In fact, my original hypothesis was that the letter distribution of HwF would match the letter distribution in Words with Friends (WwF).

Words with Friend’s vowel distribution (per 108 letters):

A: 9
E: 13
I: 8
O: 8
U: 4

Conveniently, the math works out so that there are a total of 40 vowels in a game of words with friends, and there are 400 in my HwF sampling. How close are these numbers when normalized? Pretty close.

Format:
Letter: My sampling vs. WwF Letter distribution

A: 65 vs 90
E: 134 vs 130
I: 81 vs 80
O: 71 vs 80
U: 49 vs 40

Does the same hold true for the consonants? (WwF numbers are normalized)

B: 23 vs 27
C: 29 vs 27
D: 61 vs 67
G: 57 vs 40
H: 53 vs 53
J: 10 vs 13
K: 9 vs 13
L: 69 vs 53
M: 29 vs 27
N: 61 vs 67
P: 21 vs 27
Q: 11 vs 13
R: 57 vs 80
S: 77 vs 67
T: 92 vs 93
V: 33 vs 27
W: 23 vs 27
X: 11 vs 13
Y: 30 vs 27
Z: 15 vs 13

Fascinating. It’s pretty close (with exceptions like G, R, and S). I’ll leave it up to the statisticians amongst you to calculate the significance and confidence interval of my sample per the target.

What does this tell us? Well, if I’m correct in my assumption you’d never see more instances of a letter than could appear in a scramble game. You’d never see two Z’s or two Q’s show up in your letter selection.

For my sampling, this is accurate

This chart shows the number of times a letter has appeared multiple times in a single game. For example there are 2 instances in my sampling where three S’s showed up in the word building box. Never have I seen two K’s or two J’s appear.

Below each letter, are the total number of that letter in the WwF game. It matches fairly well, though in my HwF games I’ve never seen more than 3 of any one letter. This might be a limitation, or just chance. Keep an eye out in your games. If you ever find an instance with multiple Z’s or J’s let me know!! I’d love to hear it. OR, if you ever get four of the same letter (including vowels) – I’d be interested.

This has been a fun experiment.

The Clay Oven. Part 2: Baking.

After something like 6 weeks of construction, you can bet that we were ready to bake.

First things first, fires can be annoying. It’s easy to start a fire with paper and kindling, but keeping it roaring is not a task at which I am particularly adept. For this reason, we purchased a product called “envirologs.” These are essentially logs made out of compacted paper that burn really well. They lite up immediately and will burn for about 2-3 hours. Hopefully as my fire skills improve I’ll be able to cheapen out my fuel source.

Flames aplenty!

At times, the fire was so fierce flames would billow out of the arch.

Billowing flames!

And obviously, since I’m kinda geeky, I had borrowed a thermal camera from work for oven analysis.

The dome.

The inside of the dome.

Whoa that's hot!

Please note: these temperatures are Celsius. Wait, celsius? Heck yeah it’s Celsius! 600°C is over 1,100°F. Awesome!!

But… there was a problem. The inside of the dome was definitely reaching impressive temperatures but the firebrick cooking surface wasn’t that hot at all. The theory here was that with the fresh air streaming into the oven along the base of the arch was keeping the cooking surface coolish.

Shaun L. to the rescue.

Shaun looked for tips online and found the key suggestion: As the log falls into embers, spread those embers across the base of the oven. Let the embers pre-heat the brick. Then brush those aside and get to cookin.

Embers

Thermal profile of the embers

With this new strategy in place, it was time to cook some pizza.

Mmmmmm

Thermal Pizza

Those last two shots are pretty interesting. Basically, the top of the pizza is cooking beautifully from the radiant heat off the dome. But the bottom wasn’t hot enough, and wasn’t crisping up the way that I wanted. On the first day of cooking, the best we did was cook a pizza in 5 minutes. Yeah… that’s pretty fast, but not as fast as the experts. And the result was weak – literally weak. The pizza when held would droop dramatically. It didn’t have the crispiness to support its weight.

BUT! One helpful solution was clear: Sweep out a more direct line of ash and stick the pizza deeper into the oven. We did this on Wednesday night with much better results: 3 minute pizzas with improved crispy. Awesome!

I’m going to continue to adjust my cooking techniques an a quest for the ultimate pizza. Still, I’m quite pleased with the quality of the food coming out of my oven.

A big thanks to everyone who helped build it, especially Jen, Shaun, Brian, and Kev. Huge help those four. Here’s to pizza!!

The Oxford and the Shatner Comma

As I’d mentioned in one of my turning 30 posts a few weeks back, one of my goals for the year is to master the comma. I struggle with this punctuation more than I’d care to admit. In an effort to spread the learning of the comma let’s take a look at some history and the infamous serial comma.

History! etymonline.com says that the word comma is derived from Latin where it means “short phrase” or “clause in a sentence.”

This University of Wisconsin site talks a little bit about the trends and rules that have developed for the comma after its initial adoption into written word which Wikipedia puts at around the 3rd century BC.

the long-term trend has been toward greater regularization in developing and applying the rules as well as toward a reduction in the comma’s frequency of use. Still the comma remains the most frequently used punctuation mark—and undoubtedly the most frequently misused.

Which brings me to the serial comma (often called the Oxford or Harvard comma). The serial comma is a comma that is used in lists. As an example: Some letters of the alphabet are A, B, C, and D. See that comma after the C? That’s the serial comma. Some people love it, other people hate it. Neither the New York Times nor the Economist use it… but MLA standards and Oxford both use it. Well… kind of. Oxford’s public affairs guide issued a statement recently that recommended leaving out the famed Oxford comma, but the official Oxford Manual of Style still recommends its usage. So while the jury is still out, perhaps the general trend is that the serial comma is disappearing from usage.

As a final point, I’d like to make reference to JK Elemenopee’s excellent find: The Shatner Comma. Apparently amidst all of the Oxford comma confusion writer Everett Maroon twitted the following: “Professor friend o mine is against losing the Oxford comma, but wishes his students would lose the Shatner comma. You, know, what, he means.”

Awesome.

Party Scrabble

Perhaps the most pretentious way to play scrabble is Party Play on an iPad. You lay the iPad on the table, and it acts as the board. Meanwhile, the players each see their own rack on their respective iPhones. The iPhones connect to the iPad via Bluetooth and everyone can have a wildly thrilling electronic night of scrabble.

Shaun, Darcy, Sarah, Brian, and I participate in Maximum Scrabble Dorkiness

Scrabble for the iPad costs about about 10 bucks, but the comedic value alone makes it worth it. Since purchasing this app a few weeks ago, I’ve played three times. Twice with friends at the House of Rock*, and once with Shaun while waiting for my turn at the open mic. It’s fun knowing that wherever I am, I am always prepared for a rogue game of Scrabble.

*Note: we have two editions of the real scrabble board at the HoR. But I’m fairly certain that hereafter these will be no more than dust magnets.

Burritos, an exercise in simple mathematics.

Ryan Schenk sent out an e-mail this weekend to document his mathematical approach at optimizing burrito filling.

Let’s take a look at his work:

Sheet 1

Sheet 2

End result?

Pi*((.816*dT)/(2*Pi))^2 * 2 * sqrt( (dT/2)^2 – (.816*dT/2)^2)

or roughly 0.031*dT^3
(where dT is the diameter of the Tortilla.)

It should be noted that this is the theoretical maximum. Experimental results are forthcoming.

Still, what does this mean in layman’s terms?

Basically, the optimal filling ratio is a square with dimensions in a ratio of ~8.1:5.7 laid out with the longer dimension NORMAL to the axis of wrapping (wrappation axis)

SAY WHAT?!?!

It’s true! I have been wrapping my burritos completely wrong! Readers, for heaven’s sake, don’t pack your burritos long, pack them wide! WIDE! This is the key to maximum filling.

Who knew?!

Math knew.

UPDATE: better scans and a third page of calculations
burrito 1.
burrito 2.
burrito 3.