About Me

My photo
Feel free to drop me a line at laura.nunn@gmail.com

Sunday, February 03, 2013

House of cards

Maths has never been my strong suit.  Since leaving school, I've not yet found a situation where I've needed to calculate the third side of a right-angled triangle, or the circumference of a circle, much less use simultaneous quadratic equations to... well, God knows what actually.  Simultaneous quadratic equations may actually be the world's least useful things.

Apart from Thames Water customer services, obviously.

In Real Life, I have probably only ever used the following maths:

  • Addition
  • Subtraction
  • Percentages
Most, if not all of which was taught prior to age 11.  So there we go.  Secondary school maths completely irrelevant.

Anyway, because we lead exciting and glamorous lives, one of TheBloke (TM)'s and my favourite pastimes is to play simultaneous games of Freecell.

For those of you who don't know what Freecell is... well never mind.  It's basically a kind of card game.  A bit like Patience.

The version we use allows you to input a game number between 1 and 1,000,000.  If we both enter the same number, we can effectively play against each other, and see who finishes first.  Not that I am competitive.

If you don't enter a number, the computer will randomly generate a game for you.

Earlier this week, TheBloke (TM) shouted out the number of the game his computer had randomly generated for him, and I went to select my game... only to notice that my computer had by itself selected the exact same game!

Freaky.  Time to play the lottery?

Anyway, maths bods - help me out.  My failure to pay attention in class in maths means I can't quite work out the statistics.  What are the chances of us getting the exact same game?

Is it one in a million (i.e. it's exactly as likely I will get - for example - game 2233 as it is that TheBloke (TM) does), or is it one in a million to the power of a million?

Either way, I think this all goes to prove that my life is empty.  Send chocolate.

4 comments:

RDelayed said...

Set of possible values 1.. 1000000
Number of possible values 1,000,000
Number of choices 2
Probability of choice 1 being 2233 = 1/1,000,000

Each choice is independent as the first choice does not remove that number from the set of available numbers. Unlike selecting cards from a deck.

Probability of the second choice being 2233 = 1/1,000,000

So if you are specifically looking for a particular value and you want to pick it twice the probability is
1/1,000,000 * 1/1,000,000 or
1x10-6 * 1x10-6 = 1x10-12

However that is not what we have here because you didn't specify a particular value in the first choice step.
So if we assume then that the first step is equivalent to picking a number and that the second step is trying to select that number in the set the probability is just that of making one choice in the set for a particular value.
Probability of 2233 once = 1x10-6 (One in a million)

This of course assumes that the random number generator in the software you are using is completely random which is NOT a valid assumption since it will more likely be based on an algorithm that approximates randomness. Usually these sorts of algorithms generate similar outputs given similar inputs. So running it at nearly the same time on similar hardware will give a similar number. So the actual probability will be higher that one in a million. However I don't know the variables involved so can't calculate it.

Anonymous said...

RDelayed - er WHAT?
It's one in a million. Easy. Laura, you should take up roulette.

Laura said...

Is it though?

Taking the (admittedly large) assumption that the number generator is totally random...

If it's the same odds for TheBloke (TM) and I to get game 2233, what about if a third person also got the same game. Or a fourth? Or six of us?

Surely by this logic, the odds should still be one in a million - but it feels a lot less...

Nearly bought a lottery ticket, but figured we'd already had our one-in-a-million that week.

L x

Jack said...

Computers can't actually do random. They often use the internal clock to generate numbers so if the time on the laptops was the same that could be it?