Sunday, February 27, 2011

Why do I always loose?

The good news is, you don't. Statistically everyone should win the same proportion of times.

A lot of it comes down to conformational bias. When a piece of toast is dropped it lands on the group butter side down 50% of the time, it's basically a coin (arguably it could be higher, but the difference is negligible).  What happens though is that for many of the times that the bread lands buttered side down you pick it up and continue on your way without really noticing. On the other hand when it lands buttered side down it sucks. You make a big deal, quote the line, and have to clean it up.

I believe it anything is over 60% people notice it as an unfair coin. So when a few of the buttered side up are ignored it seems that the bread is favouring the buttered side more.

Now that doesn't mean you can't have a streak, even a really long one. Loosing or winning. Probabilistically it could happen for someone's entire life, although the it would be extremely rare, like one person ever, it's not you, don't worry. Even if you flip a coin 100 times you'd expect to see a string of head (or tails) at least 7 long.

When these streaks happen people often think they are lucky or cursed, but their luck will eventually turn, it's all in the numbers. The thing to remember is that the probability of each instance is fixed, it has nothing to do with anything before. Even though you got a string of 15 heads in a row, the probability on the next one is still 50%.

Thursday, February 24, 2011

How the universe is "normally" distributed

On the average day, nothing is absolute. It's not exactly minus 5 degrees, the air isn't exactly one atmosphere, and gravity isn't even 1g. At any given time there's a random fluctionation around some central point. A distribution around a mean.

The easiest way to see it is when you're making a cake, or whipping cream. A single band forms around the middle of the bowl, with fewer and fewer specs out from the middle. If you were to plot the distribution of these points you would get something like this

This is called the Normal Distribution. This is what "normally" happens. Most things are around some central value, but everything is possible, it's just less and less likely the further you get from the middle. That's why there's whipped cream on your fridge. If you run the beeters for long enough, the one in a million chance can happen, and that rare value way off on the curve is far enough out to leave the bowl and go wizzing across the room to hit your fridge.This is the basis of a large part of statistics. As you can see the probability drops of very quickly. Something called the Empirical rule tells us that we should expect almost 70% of the values within one standard deviation, and a whopping 95% within 2 standard deviations. By the time we get 3 standard deviations out we covered 99.6% of all possible outcomes from the population.

This is how so called anomalies occur. The bulk of observations are pretty close to the middle, occasionally there are some that are slightly off the mean, but once in a blue moon (That's two moons in one month btw) truly crazy stuff happens. We call those outliers.
\tfrac{1}{\sqrt{2\pi\sigma^2}}\,e^{ -\frac{(x-\mu)^2}{2\sigma^2} }
And although the formula for it is rather unpleasant you'll notice that both pi and e (a number like pi) and the square root of two are all part of it. For math types, this is deep. Potentially the three most impotant numbers in science all part of a formula that came out of everyday experience. Pretty awesome. So the next time something truly incredible and strange happens, just remember it's "normal".

Wednesday, February 16, 2011

Calculating without a Calculator

Ever wonder how your grandparents ever survived math class? No I don't mean it's so hard noone could ever survive, and no math wasn't just really easy "back then". But how would someone do a complex mathematical computation without a calculator.

Yes there were slide rulers, but no, I mean before that. So how would one work out something simple like the square root of 71.

There was of course a much higher reliance on personal math skills, most students these days will use their calculator for simple addition. Oh we've all done it, "just to be sure". So that helped of course, things were much faster. But √71 is still hard. One thing we can do is guess. We know 8^2 is 64 and 9^2 is 81, so √71 is probably 8.4ish. We can then do 8.4^2 which 70.56, not big enough, but not by much, so let's try 8.45^2=71.4025, too big, And so on... It takes a while, and some good long multiplication, but it will work, and you can get as many decimals as you need. So there's the solution.

Let's say every day you and a bunch of people are doing this every day, then maybe we could higher someone to do it for you and do them ahead of time. Then evolved Table books. I picked one of these up a few years back called 6 place tables. Pages and pages of numbers. Want √71, go to the square root chapter, scroll to 71, there's your answer to 6 decimal places.

Now this of course only works for simple math, which for most math classes is enough, but what if you're doing higher level math. Well Roynald Fisher, One of the fathers of statistics, had a solution. He employed 30 women that work as his "Calculator". Monday morning, "Find the √37894.2389. Three people per computation then worked and compared ansers for accuracy.

So the next time you're annoyed with Math, just think about how much mathematical computing power you have in that dollar bin calculator. Anyone before 1900 would give their right arm for it.

84 different Burger Combinations Available!

Ever wondered what it would take to make say 80 different burgers? or 39 different ice cream flavours?Well in reality it doesn't take much, not having a any good taste helps. Furthermore it doesn't actually take that many toppings.
Lots of Burgers
What we're looking at is a simple combination formula. Each ingredient can be combined with a certain number of ingredients to make a burger with say 4 toppings.
Where n is the number of available toppings, and r is the number of toppings on the burger. We can further simplify this to encompass all possible combinations, or all possible burgers. Since each topping can be either on or off the burger each topping takes one of two options. Multiple that by the two options of the next topping and you get
So a typical burger joint that offers tomatoes, lettuce, pickles, mustard, relish, mayo, ketchup, onions, cheese and bacon can make an astounding 1024 different burgers. The math is really that simple.


Ok so let's be fair, those are really condiments, and not really different burgers. However to be able to claim 80 different burgers we would only need 7 different fixings.
Similarly Baskin Robbins doesn't need much to claim 39 different flavours. Just Vanilla ice cream and some walnuts, chocolate chips, pecans, caramel and marshmallows makes 32 different flavours. So what we really need to do is measure the available ingredients to properly compare.

This ice cream shop I visited in Nice, France had everything from tomato, to bread, to rose ice cream. Just flavours nothing added, now that's impressive.