The Boston Diaries

The ongoing saga of a programmer who doesn't live in Boston, nor does he even like Boston, but yet named his weblog/journal “The Boston Diaries.”

Go figure.

Monday, January 05, 2009

1/2 of a 2/3 spherical cow …

Today's post is a simple question.

Let's say, hypothetically speaking, you met someone who told you they had two children, and one of them is a girl. What are the odds that person has a boy and a girl?

Consider your answer carefully, without doing a web search, or reading the comments to this post. Don't cheat—but be prepared to explain your reasoning, because the solution might surprise you.

It's almost like some kind of conspiracy or something.

Coding Horror: The Problem of the Unfinished Game

That, and the follow-up post, plus a few threads on various commentary sites can be summed up with the following result:

The odds are 1/2, except, of course, when it's 2/3.

A lot of virtual ink has been spilled over this, but I think I have this down now. I wrote a program to simulate this problem and doing so has clarified the result (nothing like picking a few million pairs of virtual kids and seeing actual numbers).

It goes like this. Assume a spherical cow … oh wait, wrong problem. Assume an even 50% chance of having a boy or a girl. Take 100 families with two kids. There are four cases to contend with, boy/boy (25%, or 25 out of a 100 families), boy/girl (25%, or again, 25 out of 100 families), girl/boy (25%) and girl/girl (the remaining 25%). But in three of the four cases (75%) there is at least one girl. And out of those 75 families, 50 of them (or 66% of 75, or 2/3) will have a boy.

And thus, that's how we end up with 1/2 of a 2/3 spherical cow.

Obligatory Picture

[The future's so bright, I gotta wear shades]

Obligatory Contact Info

Obligatory Feeds

Obligatory Links

Obligatory Miscellaneous

You have my permission to link freely to any entry here. Go ahead, I won't bite. I promise.

The dates are the permanent links to that day's entries (or entry, if there is only one entry). The titles are the permanent links to that entry only. The format for the links are simple: Start with the base link for this site: https://boston.conman.org/, then add the date you are interested in, say 2000/08/01, so that would make the final URL:

https://boston.conman.org/2000/08/01

You can also specify the entire month by leaving off the day portion. You can even select an arbitrary portion of time.

You may also note subtle shading of the links and that's intentional: the “closer” the link is (relative to the page) the “brighter” it appears. It's an experiment in using color shading to denote the distance a link is from here. If you don't notice it, don't worry; it's not all that important.

It is assumed that every brand name, slogan, corporate name, symbol, design element, et cetera mentioned in these pages is a protected and/or trademarked entity, the sole property of its owner(s), and acknowledgement of this status is implied.

Copyright © 1999-2024 by Sean Conner. All Rights Reserved.