Thursday 29 July 2010

Monty Hall Solution

If you haven't done so already, take a look at my previous post and try to work it out on your own then come back to this one. The intuitive answer would be that since there are now only 2 doors to chose from each has a 50/50 chance of winning, however that is actually wrong, the correct answer is sticking gives a 1/3 chance of winning but switching gives a 2/3 chance of winning, there are several different ways to explain this and I will have a go myself before giving up and linking elsewhere.

The shortest analysis would be to say that the door the player chooses has a 1/3 probability and the other two combined have 2/3, then when one door is opened revealing a goat the 1st door still has a probability 1/3, the open door changes to zero leaving the remaining door with a probability of 2/3.

A more developed analysis takes a closer look at all the possibilities, for the sake of this we will call the doors A, B and C, say the car is behind C (the contestant is unaware) there is a 1/3 chance of the contestant selecting each door initially, so the total probability of all options that start with each door choice is still 1/3. If the contestant chooses A first the host will open B or C, but C has the car so his only choice is to open B in this situation accounting for 1/3 of the total switching would win and sticking would lose. If the contestant chooses B first the host will open A or C, but C has the car so his only choice is to open A so again we have a situation covering 1/3 of total possibilities in which switching would win and sticking would lose. Now consider the contestant chooses C, the host can open either A or B at random, each has half of the initial 1/3 probability of outcomes where the contestant started with C, so both the contestant choosing C then the host opening A and the contestant choosing C then the host opening B have a 1/6 probability and will result in loss for a switch but a win for a stick, adding up all the probabilities we get 2/3 situations switching wins and 1/3 switching loses.

It may also help to imagine playing with say 100 doors, in this case we can all agree the first guess has a chance of 1/100, then the host opens all other doors except one revealing 98 goats and leaving two closed doors one with the car and one with a goat, hopefully the change in the scale helps illustrate how switching is beneficial.

Still not convinced, try it for yourself, get a friend and 3 playing cards from the same pack but with one that stands out, say a pair of reds and the ace of spades, the objective of the contestant is to pick the ace. You play the host and your friend plays the contestant, lay them face down get your friend to pick one, then turn over a red and ask if they want to stick or swap and compare several say 10+ trials where they swap to the same number where they stick, once they know the game you can swap places, maybe make it a competition one of you use one strategy and one use the other and see who comes off best. To make it a little more interesting make it into a drinking game, when the player wins the host drinks when the player loses they drink. Just remember 10 is a small sample so it is possible that you will not be able to tell the difference, if that is the case continue for a while and it will clear up.

This has a few pictures to help follow the argument.
Remember it is best if you truly understand what I'm getting at here so have a think about it, maybe come back in a day or so for another attempt. Admittedly is a hard concept and many people you would expect to be able to make sense of it struggle so admitting you don't quite get it is fine too just as long as your honest about it, it is certainly better than blindly rejecting my argument because you don't understand or even blindly accepting just because I look like I know what I'm talking about.

Monday 26 July 2010

The Monty Hall Problem

The Monty Hall problem is an interesting bit of probability based on a game show and named after the presenter of the show. At the final stage of the game the contestant is presented with three doors, behind one is the main prize and behind each of the other pair is a goat. The contestant picks a door at random, then one of the other doors is opened revealing a goat, the contestant is then given the option to stick with their first choice or swap to the other unopened door. The question is, statistically which provides the better chance of winning, sticking or swapping?
The answer and explanation will appear later in the week. An interesting thing to note is that when this was first posed there was a lot of argument amongst experts in the field since it requires some outside the box thinking.

Tuesday 13 July 2010

Those crazy catholics are at it again

Someone just posted this on facebook. In short it means that the catholic church considers child rape and allowing a woman to become a priest as equivalent crimes, both in the most severe category.

Regardless of if someone believes the bible or not this is entirely unreasonable, although the arguments are very different. For the non believer child rape is one of the most horrific and mentally scarring acts anyone can commit and deserves just about any punishment that can be thrown at the criminal, while a woman priest is a non issue, if she wants to let her.

From the christian point of view however woman preachers are condemned by the bible. (1 Timothy 2:11-14, Titus 1:6-9) The first of those says women may not teach or have power over men because man came first then women came along and screwed everything up, the second is instructions that the preacher may only have one wife, amongst other things, and repeatedly specifies he, a very clear implication.
Now for the main event, what does the bible say about rape? Deuteronomy 20:13-14 and Numbers 31:11-18 clearly states that when invading any female who is a virgin, regardless of age should be kept alive to do whatever you want with. Deuteronomy 22:28-29 say if you rape a virgin you must marry her for life.

So any true christian should condemn woman preachers but view child rape as entirely acceptable. Almost sounds like the bible was written by a bunch of sexist, bronze aged old gits rather than being the perfect, timeless work of an all knowing god.

The most unplesant character in all fiction

If I was to describe a fictional character as " jealous and proud of it; a petty, unjust, unforgiving control-freak; a vindictive, bloodthirsty ethnic cleanser; a misogynistic, homophobic, racist, infanticidal, genocidal, filicidal, pestilential, megalomanical, sadomasochistic, capriciously malevolent bully." everyone who is unfamiliar with that quote would agree the character is pure evil, yet this quote refers to the god of the old testament, which both Jews and Christians (also Muslims, at least in part) hold as the unchanging perfect word of god, so lets see if we can find verses to justify each of those claims.

Proud of his jealousy - Exodus 20:4-5(god admits he will act on his jealousy)
Exodus 34:14(bragging about being jealous)

Petty - Leviticus 24:16(Blasphemy is punishable by death)
Numbers 11:1(death for complaining)

Unjust - Deutoronomy 22:28-29(rape a virgin you must marry her for life)
Job 2:3(ruining the faithful for no reason)

Unforgiving - Isaiah 14:21(punishment for earlier generations crimes)

Control freak - Genesis 3:22-23(stops humans becoming like gods)
Proverbs 3:5(just do what god says)

Vindictive - Genesis 3:14-19(the penalty for eating the wrong fruit)

Bloodthirsty - Jeremiah 51:20-22(go kill things for god)
Genesis 4:3-5(animals make better sacrifices than fruit)

Ethnic cleanser - Joshua 8:24-25(wiping out a city)
Jeremiah 50:21(another massive cull of foreigners)

Misogynistic - Exodus 21:2-7(male slaves serve 6 years, females permanently) G19:6

Homophobic - Leviticus 20:13(if a man lies with a man kill both)
Leviticus 18:22(man on man sex is bad)

Racist - Deuteronomy 23:3(none of this race may enter gods congregation)

Infanticidal - 2 Kings 2:23-24(god cooperates with his prophets wish to kill 42 children who called a bald man........bald.
Isaiah 13:16(when pillaging a city the preferred method of killing infants is beating them on rock)

Genocidal - Deutoronomy 13:15(kill everything in the city)
Deuteronomy 20:16-17(kill all members of these tribes, including cattle)

Filicidal - Leviticus 20:9(cursing your parents punished by death)
Deutoronomy 21:18-21(kill disobedient children)

Pestilential - Exodus 9:14-15(makes Egypt sick)
Exodus 9:25(wiping out crops)

Megalomanical - Exodus 10:27(god has spent the past 2 chapters directly controlling the pharaoh so he can abuse Egypt)

Sadomasochistic - Unfortunately the only masochistic bible verses I can find are in the new testament, but looking at the rest of the list sadistic is pretty well sorted and have spent too much time on this already to find any more verses proving what a dick the old testament god is.

Capricious - 1 Samuel 18:1-3(gay is fine)
Genesis 19:33-36(god deliberately saved them when he destroyed their city for being perverse)

Malevolent - Genesis 22:9-12(an all knowing god orders Abraham to sacrifice his son, then stops him at the last minute just to see if he would do it.)

A bully - 1 Chronicles 16:25(ruling by fear)
Leviticus 25:17(more fear)

And a few bonus points that didn't really fit in, god created evil (Isaiah 45:7), god lies (Genesis 2:17) beating slaves is ok if they don't die on the spot(Exodus 21:20-21)

For those Christians thinking ohhh its only the old testament that doesn't apply any more
1) Jesus thinks it does(Matthew 5:17)
2) The whole book is supposed to be the perfect unchanging word of god, thats just not compatible with picking your favourite bits and ignoring the rest.
3)The New Testament contains more than enough douchebaggery too, I may do a post on that another time
4)Anything along the lines of "it is required for a greater good" is nonsense, many of the quotes have no upside at all and god is supposedly omnipotent so he put all the rules in place that require shit to happen for something good to eventually come out of it. Also all good does not mean doing evil for a greater good it means doing only actions which are good in and of themselves.

Want to check my quotes are justified, just stick the references into google, 30ish links seems a bit much for one post. And as with all my posts if you have any objections leave a comment, even on the old stuff, and I will be happy to expand on or defend my position.

Monday 12 July 2010

SETI

SETI stands for Search for Extra Terrestrial Intelligence, it is a non profit organisation that points radio telescopes up on the off chance they pick up a signal transmitted by an alien race. SETI attempts to detect technologically advanced civilisations by picking up stray electromagnetic transmissions. However the universe is a noisy place and many natural processes produce electromagnetic radiation, the key difference being that natural sources tend to cover a large range of wavelengths(a high bandwidth) while intelligently developed sources tend to have much narrower bandwidths, this has two benefits. First it needs less energy and second it keeps frequencies clear for others to use without interference. Another important consideration is the fact that some wavelengths are naturally much quieter than others, with the majority of significant natural signals being in the infra red or higher frequencies (shorter wavelengths). This means we can take an educated guess at the type of signal we want to detect and the range of wavelengths to focus on. Specifically a signal with a narrow bandwidth in the radio or microwave region is very likely to have a non natural source, so this is where SETI looks.

The procedure is something like this, get hold of the biggest radio telescope available, point it at a star then scan millions and millions of really tiny bandwidths and compare them, if a narrow signal is detected then another telescope hundreds or thousands of Km away also focuses on the star to rule out local interference.

To date, and the best of my knowledge only one such signal, now known as the 'wow! signal' has ever been detected, however it lasted for 72seconds and the region in question has never shown anything interesting since so it is still inconclusive. Since the signal was detected back in 1977 the technology was rather primitive so confirming with a second telescope was not possible but interference was ruled out as much as possible given the circumstances.

What the wow! signal was and what it means, in the 2nd link the most interesting part is the last section about hypotheses and speculation.

Related to all this is something called the Drake equation, developed by Frank Drake in 1961 this is an attempt to estimate the number of technologically advanced civilisations currently active in our galaxy, unfortunately most of the values we can only make very broad guesses so it is of little scientific value but still somewhat interesting. Despite being an equation it is very simple so don't worry if you're not a maths person, that link also has a small interactive bit at the end.