I’ve started blogging about the technologies and processes we are using to build and maintain the Open Democracy Manitoba websites.

Time Lapse of an incredibly detailed hand-drawn city scape. More drawings on Ben Sack’s Portfolio site.

## SHE, HE, THEY

THEY had just met.

HE, wearing suit, tie; briefcase in hand.

SHE, wearing flower-print dress, necklace; purse in hand.

"You remind me", says HE, "of you".

“So I am told”, says SHE, “by you”.

THEY begin to walk.

HE, holding HIS briefcase like it was HER hand.

SHE, holding HER purse like it was HIS hand.

THEY walk without speaking for some time. Hand in hand in mind.

HE opens HIS mouth to say something. Nothing comes out.

SHE sees HIS open mouth and it makes HER yawn.

S

i

d

e

w

a

y

s glances.

"Look!", says SHE as SHE points.

THEY watch as a crane lowers a steeple onto a now finished church.

“Complete”, says HE.

THEY play at being cranes. What fun it is to dream of strength and amazement.

"Do you think that you might love me?", says SHE.

“How can that be?”, says HE.

“Love at first sight”, says SHE.

Silence. Deep breathes. Pupils widen. Corners of lips curl.

"What does love feel like?", says HE.

“Like the opposite of a stomach ache”, says SHE, “only more pleasant.”

"I feel full", says HE, "but I think that is lunch."

THEY play at being lovers.

What fun it is to dream.

* * *

*I wrote this over a decade ago and stumbled across it today while doing some digital house-cleaning. What fun it is to dream. :)*

Circus performer Angelica Bongiovonni dances with a Cyr wheel in Cirque Éloize. [via: thekidshouldseethis]

**Related:** Etereas - Brecken Rivara & Tiana Zoumer dance with hula hoops.

*"A hula hoop floats amidst a stunning location of México city. As it moves, a dancer appears and plays with the hoop. Every movement creates lines, impressive shapes and lights that float in the space as if being drawn to gradually create an impressive sculpture in movement."*

## Has Anyone Ever Flipped Heads 76 Times in a Row?

This article makes for a good companion piece to my post on dice probabilities.

Soon we find out that Guildenstern [in the play Rosencrantz and Guildenstern are dead] has flipped 76 coins, and all of them have come up heads. “A weaker man,” he remarks, “might be moved to re-examine his faith, if in nothing else at least in the law of probability.”

The article goes on to conclude that it’s unlikely that anyone has actually flipped 76 heads in a row. The logic is as follows:

If a coin is flipped 76 times there are 2 to the power of 76 different possible outcomes. That’s over 75 *sextillion* possibilities. (If it helps, you can think of these flips as a binary number composed of 76 bits.) So the chance of flipping 76 heads is incredibly rare. 1 in 75 sextillion rare.

However, a fun paradox arises: Can I not flip a coin 76 times and then state that based its rarity (1 in 75 sextillion) that I doubt this particular sequence has ever been flipped, **even though it just has?!**

Perhaps, but it’s important to note that this only works for ordered *sequences* of coin flips, not the ratio of heads to tails within. This distinction is important because many different sequences can lead to the same heads to tails ratio.

For example, if on my first flip I get tails followed by 75 heads, this is a 1 in 75 sextillion sequence. Compare this with the probability of flipping one tails *anywhere amongst* 75 heads. Since the lone tails could appear on any of the 76 flips, the probability is 76 in 75 sextillion.

As the heads to tails ratio approaches 50/50, the odds get much better. A sequence containing 38 heads and 38 tails should be tossed once every 11 attempts (approximately). This is due to the large number of sequences within the 75 sextillion that contain an equal number of heads and tails.

**References:**

## Lines Allude a Circle

Lines, lines, lines. Over the past week or so I’ve been working on a computer program (see above) that can generate images similar to my dad’s engravings (see below).*

I’m not quite done, but the eventual goal is to transfer an image generated by this process to a copper plate by way of the etching process in order to print the image to paper.

*When the above program has finished, you can click it to start the process again.*

Earlier versions of this program can be seen here:

- First Line Intersection Test (Hover mouse over image.)
- Sketching Lines (No circle in centre.)
- Alluded Circle (Similar to the above program but larger and not as smoothly animated.)

* Truthfully I was trying to create an algorithm for something else and stumbled across one that created dad-like images.

Data in Data out. Footage of birds, “processed to extend the moment captured to show trails of where the animal has been / will be.”

## Reading and Listening in 2013

I read nineteen books this past year, one more than in 2012, and three more than 2011. Only one of the books was read on my Kobo, the rest were deadtree.

### Books Read in 2013

- The Confusion - Neal Stephenson
- Travels in the Scriptorium - Paul Auster
- The Black Tower - P.D. James
- Zen and the Art of Motorcycle Maintenance - Robert M. Pirsig
- Lila - Robert M. Pirsig
- A Feast of Crows - George R.R. Martin
- Outliers - Malcolm Gladwell
- Split Infinity - Piers Anthony
- Inferno - Dan Brown
- Snow Crash - Neal Stephenson
- Virtual Light - William Gibson
- The Yiddish Policemen’s Union - Michael Chabon
- Man’s Search for Meaning - Viktor Frankl
- The Alchemist - Paulo Coelho (re-read)
- Dirk Gently’s Holistic Detective Agency - Douglas Adams
- The Diamond Age - Neal Stephenson
- Inheritance - Christopher Paolini
- Bluebeard - Kurt Vonnegut
- The Westing Game - Ellen Raskin

Read in this order. The only dud was Piers Anthony’s Split Infinity. The best of the lot were the three Stephenson novels (fan boy alert!) and Viktor Frankl’s search for meaning. Adams and Vonnegut provided the laughs. Following Snow Crash with Virtual Light highlighted the shared themes of corporate/religious nation-states, virtual worlds, and oddly, messenger culture. Zen and Lila remain fascinating fourteen years later, although I’ve switched which of the two I prefer.

### Incomplete Reads

- The Unconsoled - Kazuo Ishiguro
- The Annotated Turing - Charles Petzold

I’ll attempt The Annotated Turing again. I might have enjoyed The Unconsoled in a different time and place, but I filled yearly postmodern-dream-world quota with Travels in the Scriptorium.

### Audio Lectures

In 2013 I listened to sixty hours of lectures across five courses. Most of these lectures were heard while running outside in both summer and winter months.

- General Philosophy - Oxford - Peter Millican 7hrs
- Psychology - Yale - Paul Bloom 18.5hrs
- Ancient Greek History - Yale - Donald Kagan 20hrs
- Physics and Philosophy - Oxford - Ankita Anirban 1.5hrs
- How We Learn - TGC - Monisha Pasupathi 11.5hrs

### A New Year

This year I’ll read the thirty-six short stories featured in A Day’s Read, an audio course from The Great Courses. I also hope to read more non-fiction than in past years.

### Currently Reading and Listening

- Good Omens - Terry Pratchett & Neil Gaiman
- No Death, No Fear - Thích Nhất Hạnh
- Practical Object-Oriented Design in Ruby - Sandi Metz
- Great Minds of the Eastern Intellectual Tradition - The Great Course - Audio Lectures

## Stuff Dutch People Like

My sister Colleen wrote a book. Her book, Stuff Dutch People Like, is an exploration of the quirky culture of her adopted homeland the Netherlands. It’s based on her blog of the same name. The book is already selling very well in the Netherlands. I am incredibly proud of my little sister!

Although she lives in Amsterdam (and has for the past decade) she’s having a book launch here in Winnipeg this Wednesday, January 8th at 7 p.m. at McNally Robinson (Grant Park Mall). **You should come**, especially if you are Dutch, are of Dutch ancestry, or are married to a Dutch expat. I can’t promise you any stroopwafles, liquorice, or hagelslag, but I assure you it will be gezellig. *I may even wear my red pants.*

My daughter and I found a new favourite video. *We love it.*

## Probability of Dice Rolls in Settlers of Catan

**A few weeks back I played a game of Settler of Catan where an 8 was only rolled once.** This is *a pretty big deal* if you know how the game is played.

In Settlers of Catan, each turn begins with a player rolling two 6-sided dice. The *sum* of this roll determines the game play. The full rules of the game aren’t important for this post, just the fact that players hedge their play based on the probabilities of specific sums occurring. According to these probabilities an 8 should roll, on average, every 7.2 turns. *In our game it took 72 turns to roll an 8!* For the players who had hedged their fortunes on 8s, this was a crushing blow.

After the game we spent some time discussing the rarity of a game such as this. Many felt that only rolling one 8 in 72 turns was incredibly rare. I argued that it wasn’t as rare as we might think. I then took the position that we couldn’t have a logical discussion about these kind of games since randomness was involved. I was wrong, we have probability theory.

Let’s explore probability theory to learn how rare this game really was.

### Single Die Probabilities

When rolling a single 6-sided die, the chance of rolling any side is equal. Since there are six sides to the die, each side has a 1 out of 6 chance of rolling. If, say, we were to roll a single die 600 times, each side would appear on average 100 times.

In probability theory terms this is called a uniform distribution.

### Dice Sum Probabilities

Things get more interesting when pairs of dice are thrown and summed, as in Settlers. In this situation certain sums are more likely to appear than others. This is because there are more possible die-side combinations for certain sums.

The following chart shows this distribution of sums. Notice that the sum of two uniform distributions (each die) makes a triangular distribution.

Shown in this image are the 36 possible outcomes of rolling 2 dice. Six of these combos sum to a 7 while only one of them sums to a 2. It should therefore be apparent that in a game of Settlers, 7s are rolled more often than 2s. *If you don’t believe me, grab a pair of dice and start rolling while keeping track of the sums.*

Looking at this chart we see that 5 of the 36 possible combinations sum to an 8. As such, an 8 should roll on average 5 times every 36 rolls, or as I stated earlier, once every 7.2 rolls (5/36).

### Simulating Dice Rolls

I coded the following visualization to demonstrates these dice-sum probabilities. In this program virtual 6-sided dice-throws are simulated using a pseudorandom number generator. In total over 3000 virtual dice are thrown before the programs resets.

The left-hand graph above shows how often each virtual die lands on a specific side, 1 through 6. Since there is an equal probability of each side appearing, the columns in this graph should all be approximately the same height. This is the uniform distribution I mentioned earlier.

The right-hand graph above shows these same dice-rolls grouped in pairs and summed, just like in a game of Settlers. As the number of rolls increases, this graph of sum-occurrences begins to resemble the triangular distribution shown in picture of the dice sum combos above.

### Randomness is Tricky

Based on these dice-sum probabilities, how often should an 8 roll in 72 turns? Well, if the chance of rolling an 8 is 5 out of 36 (or 13.9%) then in 72 turns an eight should roll *on average* 10 times. Why? Because 13.9% of 72 is 10.

Notice that throughout this post I’ve been using the phrase “on average” when talking about expected dice rolls? That’s the key to our mystery. Yes, based on the probabilities, an 8 should be rolled 13.9% of the time. However, each roll is random and independent from all previous rolls. So with *enough rolls* these probabilities will be true, but for a small sampling of rolls they may not be. Grab two dice and roll them 36 times, a sum of 8 won’t *always* show up exactly 5 times. Such is chaos.

The next visualization demonstrates just this effect. Each refresh of the graphs represents another possible 72-roll game of Settlers. *With a sample size of 72 pairs of dice the graphs are often far from ideal.* In some games dice-sides are far from uniform, and the dice sums do not always follow the expected triangular probability distribution.

### Our Crazy Game

So how rare was our game? I used the AnyDice programming language (which is an amazing tool btw) to find out.

output 72d (2d6 = 8)

This program calculates the odds of rolling any number of 8s in a game of 72 rolls of 2 six-sided dice. Based on the output of this program the odds of rolling only one 8 in a 72 turn game of Settlers is 0.0245020661348%. In other words, a game like this could be expected once every 4,081 games.

Truthfully, since our game went to 79 rolls it was more like a 1 out of 10,594 game. Had no eights rolled in the entire 79 roll game, it would have been a 1 out of 135,000 game. Rare, but still possible. *Such is chaos.*

### UPDATE (18/12/2013): What About The Sequence of No-8 Rolls?

After reading this post, a friend who was at the game suggested that the odds were actually far worse than I calculated, if you take the order of the rolls into account. His argument being that a run of 71 no-8 rolls is a 1 in 40,813 event. See calculation below*.

While this is true, it’s important to note that we are now talking about two different probabilities.

- Probability of
**a sequence**of 71 no-8 rolls: 1 in 40,813 - Probability of rolling only one 8
**anywhere**in 79 rolls: 1 in 10,594

### Resources and Further Reading

Before I started writing this blog post I wrote a Ruby program to simulate the roll of dice in Settlers using the truly random data from Random.org.

**I referenced the following sites while writing this post:**

- Understanding Probability
- Dice Odds for Settlers of Catan
- These dice are driving me crazy!
- Central Limit Theorem
- Two Dice Roll Calculator
- Triangle Distribution - The Sum of Random Variables

***Example Probability Calculation:** The odds of rolling no 8s in a game of 71 turns.

The probability of *not* rolling an 8 is 1 minus the probability *of* rolling an 8.

1 - 5/36 = 31/36

We multiply the probability of *not* rolling an 8 with itself 71 times (31/36 to the power of 71) to find our answer.

The odds are 0.00245020661348% which is

1 out of 40,813.

**Attributions:** The header image for this post was found on enjoyneer.blogspot.ca. The dice-sum probability image was found on rosalind.info. I wrote the two programs in this post using the Processing language and they are hosted on OpenProcessing.org.

Everything is a Remix Case Study: The iPhone

I met a robot at a ballet once by Isabela Dos Santos.

Ever felt the urge to play Settlers of Catan, but the game itself was not close at hand? Follow these Instructable on Pen and Paper Catan.

I am eagerly awaiting the arrival of three copies of Robot Turtle.

Lastly, for BIT students who wonder why they take a stats course:

Also:

An MRI scan of a banana flower. More MRI scans of fruit can be found at Inside Insides.

Existential Star Wars by George Lucas and Jean-Paul Sartre.