Sherlock Bayes, logical detective: a murder mystery game (version 2.0)

"Sherlock Bayes, logical detective: a murder mystery game" has been updated, and the latest version can be found at:

Sherlock Bayes, logical detective: a murder mystery game 
(http://www.naclhv.com/2015/02/sherlock-bayes-logical-detective-murder.html)

New features include a tutorial, an improved Bayesian calculation, a new resources and scoring system, and new portrayals of the suspects. And there are more features still to come! Enjoy!


You may next want to read:
How to make a fractal
Basic Bayesian reasoning: a better way to think (Part 1)
Interpreting Genesis 1 by looking through John 1
Another post, from the table of contents

Christianity and falsifiability

Falsifiability has a troubled history, but fundamentally it's not a bad idea. Put simply, an idea is falsifiable if it is capable of being disproven. It is considered a desirable quality in meaningful statements, especially in the sciences. Some have even used it as the essential property of scientific statements that separates science from non-science. I personally wouldn't go that far - I think that there's good thinking and bad thinking, and that scientific thinking is just a particular blend of good thinking. But any idea or hypothesis that claims to describe the real world should be "falsifiable", in some sense.

Why am I hedging? Why not simply say "Falsifiability is good, and any unfalsifiable statement are meaningless"? Because in reality, falsifiability is just a rule of thumb - a simplified version of a deeper truth. This deeper truth is that which is expressed in Bayes' theorem: hypothesis are judged by the probabilities with which they predict data: that is, by their likelihoods. Effectively, you can think of a hypothesis as being defined by their likelihoods. Now, it may be that a hypothesis is "unfalsifiable" in the sense that none of its likelihoods are zero, and therefore there would be no observation which could absolutely disprove it. But even in such cases, as long as you don't cheat by breaking the rules of probability in assigning these likelihoods (say, by setting all likelihoods to 1), an observation will judge the hypotheses that made predictions about it.

It's also worth noting that observations are never absolutely certain. All of science is based on experiments, and all experiments have uncertainties. These uncertainties mean that a hypothesis could never be "disproven" to the point that enough positive evidence in its favor couldn't make up for it. Consider the case of the neutrinos reported to be travelling faster than the speed of light. An observation seemed to "disprove" relativity, but because of the strength of relativity as a theory, many people stood by it despite the observation. And they turned out to be right.

It may also be that, depending on how the hypothesis is "disproven", it can be modified to easily accommodate the new data. Before the nineties the Big Bang theory was understood to predict a slowing expansion for the universe. When this was observationally "disproven" - with an accelerating expansion, of all things - we did not reject the Big Bang theory, but made small adjustments to it instead. We in fact invented something completely unknown - dark energy - to make the data fit the theory.

These cases are a complete travesty if you only have "falsifiability" as the defining criterion for science. "We're making up stuff to make the data fit the theory? How wrong is that?" But we do not doubt that these are in fact the proper steps to scientifically proceed, even if they violate the principles of "falsifiability".

So, "falsifiability" is false - at least when it is understood strictly. But when understood as a rule of thumb meant as a simplified expression of some deeper truth in Bayesian reasoning, it's useful. The full application of Bayes' theorem easily makes sense of the above examples where "falsifiability" fails. (Exercise for the reader - try it. If you understood my series on Bayesian reasoning, this should not be too difficult.) And when you look at the equations - especially Bayes' theorem in odds form - many ideas clustered around "falsifiability" can be salvaged. These are ideas like "a hypothesis should make a real prediction, instead of saying that anything is possible", "a hypothesis that assigns more extreme likelihoods is a 'better' hypothesis", "you should readjust your beliefs according to the evidence", and "a nearly-zero likelihood has a good chance of dramatically changing your beliefs, because it may create enormous likelihood ratios". Falsifiability, understood in terms of these ideas, is an important quality to have in a hypothesis.

So, how is this related to Christianity?

Christianity is the most falsifiable worldview I know. Right there in the Bible itself, it tells you exactly how to falsify it: 1 Corinthians 15:14 basically says that if Christ did not rise from the dead, my faith is in vain. Come up with a definitive, physical proof that Jesus didn't rise, and you've successfully falsified my hypothesis.

Am I saying that such physical evidence is possible? Absolutely. The following are some of the things that Christianity assigns nearly zero likelihoods to - that is, things that would "falsify" Christianity by disproving the resurrection. This is what would cause me to make a post saying "Hey guys, it turns out I was wrong about this whole Christianity business".
A hidden cave is discovered in Israel, containing the mummified body of a man whose wounds are consistent with execution by crucifixion. The man was about 30 years of age at the time of his death, and his wounds include all the small details which are atypical of a crucifixion, such as puncture marks by a crown of thorns and a fatal spear thrust to the side. All dating techniques - radiometric, dating small coins found on the body, the style of burial cloths used, a tree growing over the coffin whose age is known, etc - conclusively date the body to 30 AD.
Within a cavity of the body itself, in a protective container, is found a number of manuscripts which detail a massive conspiracy to deceive the world by starting a new religion. In addition to the disciples and Jesus himself, the members of the conspiracy include Pontius Pilate, Herod Antipater, and Emperor Tiberius. Their membership is unquestionably verified through their official imperial Roman regalia (seals, etc) present in the coffin, which checks out with known history. These artifacts and the manuscripts are also all definitively dated to 30 AD. The conspiracy is to have Jesus (which these documents clearly identify as the mummified body) crucified then pretend to have risen from the dead, by having the disciples steal the body. These manuscripts furthermore contain text describing the future doctrines of this new religion. This section of the document contains much of the text of the New Testament, decades before they were supposed to have been written and thereby unquestionably proving that the writers of this document were also the authors of the New Testament. 
In a completely separate development, an entirely different group of document is found that details that Jesus had small, unobtrusive physical defect - say that there was a small but distinct imprint of a cross on his skull above his hairline. These new documents are unquestionably written by the Pharisees, who are enemies of the conspiracy and have no reason to collaborate with them. These documents passes all the usual tests for authenticity. And sure enough - our mummified body has this defect. 
Lastly, far in the future humans invent time travel - the kind that allows for watching, but not changing, the past. When we travel back in to the time of Jesus' death and burial, you see some disciples scurrying about the tomb, and everything stated in the above conspiracy theory scenario is verified.
You may object that this is an unlikely discovery: that doesn't matter. Falsifiability attacks those theories that are IMPOSSIBLE to disprove, not unlikely. The theory of gravity is falsifiable because if I drop a brick it may fall upwards. The fact that this is unlikely actually means that gravity is a strong theory. All strong scientific theories are like that - possible to be falsified, but unlikely to be.

You may also object that this is a weakness in my belief, that leaving this door open may cause me to lose faith someday and is therefore antithetical to believing in God. On the contrary, this is a mark of a healthy faith. Faith without works, or actions, is dead. Those whom Jesus commended for their faith were those who acted upon it. Leaving this possibility open is me stepping out in faith, for I have faith that God really did raise Jesus from the dead. It is like Peter's faith in stepping out out to walk on water. Imagine if Peter instead had said, "Um, actually Lord, I'll stay in this boat here. I'm sure that you can have me walk on water if you wanted to. I believe you. So I don't actually need to go on the water". What would Jesus have said to him?

Peter stepped out in faith, and he walked on water - if only for a short while. My faith is like that in that it is falsifiable, just as Peter had the possibility of sinking into the water.

But wait - Peter became afraid, and began to doubt and sink into the water. So was Peter's faith falsified? Only in the strict, unproductive sense discussed at the beginning of this post. This is like the case of the Big Bang theory only needing minor adjustments after the discovery of the accelerating expansion of the universe. Likewise, if I have made some mistake in my understanding of the resurrection, or my construction of the conspiracy theory scenario above, I still have faith that Jesus will reach out and catch me, as he did with Peter.


You may next want to read:
Basic Bayesian reasoning: a better way to think (Part 1)
"Proving" God's existence
Another post, from the table of contents

Sherlock Bayes, logical detective: a murder mystery game



You may next want to read:
Basic Bayesian reasoning: a better way to think (Part 1)
What is "evidence"? What counts as evidence for a certain position?
How to make a fractal
Another post, from the table of contents

How to make a fractal: version 2.1

The latest version of my fractal program has been updated, and it can be found at:

How to make a fractal (http://www.naclhv.com/2014/06/how-to-make-fractal.html)

It features some improvements, including the ability to generate high-iteration, high-quality pictures with pretty colors, and the ability to jump straight to seeing the full fractals. Give it a try!

I've decided to change up how I post my programs which are improved upon and published over multiple posts. From here on out I'll update the initial post with the latest version of the program, instead of putting that latest version in a new post. This allows my viewers to keep the same link to the program, and maintains my page ranking for search engines over multiple updates. It also means that the different versions of my fractal programs have to be moved around, and that only the latest version is available. I apologize for any inconveniences, but I estimate that it will only be a small inconvenience compared to the benefit it provides.

It also allows me to use the new post to talk about the new features have been implemented. For instance, you can now generate pictures like the following! (Use the "refine this picture" button once you get to the full fractals)



You may next want to read:
An analysis of "Let It Go" in Disney's "Frozen"
15 puzzle: a tile sliding game
Basic Bayesian reasoning: a better way to think (Part 1)
Another post, from the table of contents

A common mistake in Bayesian reasoning

You and your friend are investigating a murder, and you have following conversation:
You:
Alice is obviously the culprit. The knife has her fingerprints on it. 
Your friend:
Why are you ruling out Bob? It could have been Carol or Dan, too. Or anyone else, for that matter. 
You:
Um... because of the knife with the fingerprints I just mentioned? 
Your friend:
And you actually think that's solid evidence that Alice did it? 
You:
Of course. It's by far the best explanation for the knife, which is obviously what killed the victim. 
Your friend:
Exactly! The knife is the one thing that we can all agree on. It's the best explanation for the murder, as you just admitted. And since "the murder was committed with a knife" is the best explanation, it is in fact superior to your "Alice did it" explanation. 
You:
What?! That doesn't explain anything. We're trying to figure out who committed the murder. 
Your friend:
Yes, and you and I both agree that the victim was killed by a knife. That eliminates any need for the victim to have been killed by Alice. 
You:
But what about the fingerprints? 
Your friend:
That, too, is something that we both agree on: The knife had fingerprints on it. We now have a very good description of the murder weapon: it is a knife with fingerprints on it. Given this preponderance of evidence that the murder was committed with a knife, which we can describe even down to the fingerprints, I don't see why you insist in bringing in Alice into the picture at all. 
You:
But these are Alice's fingerprints! That obviously points to Alice as the murderer!
Your friend:
See, that way of thinking introduces a number of very bad problems. Why would Alice grip the knife at that point, in that particular way? Why not hold it a few millimeters higher or lower on the grip? Why not use a reverse grip instead of the one that she supposedly used? Why not hold the knife in her left hand instead of her right? Why didn't she wear a glove, or wipe up the knife after the murder, or hire a hit-man? Given all these alternate possibilities, "Alice did it" is actually a terrible explanation for the state of the knife. 
In fact, I can think of many explanations for the knife just as good as your "Alice did it" theory. The knife may have always existed in this state. Or, it could be that a combination of oils, moisture, and heat from outside the knife left an impression that you're interpreting as "Alice's fingerprints". Or these so-called "fingerprints" are an artifact from the knife's manufacturing process. How do you eliminate all these other possibilities? 
Seriously, given all these alternative explanations for the knife, of which there are an infinite number, there's absolutely no reason to think that "Alice did it". That's a terrible explanation. 
Okay, so your friend is clearly being ridiculous here. But what exactly is the nature of his error? If we are to learn from your friend's mistake, we ought to try to understand WHY it's a mistake. We can then identify other analogous situations, avoid the logical pitfall, and reason correctly instead.

Your friend's fundamental mistake is neglecting to compare a hypothesis with its RIVALS. In my series on Bayesian reasoning, I said that you need to specify the complete set of competing hypotheses in order to use Bayes' theorem, and that one of the advantages of the odds form of the theorem is that you merely need two competing hypotheses instead of having to know the complete set. But in both of these cases, the hypotheses need to compete. They need to be rivals. They must be mutually exclusive.

In the above conversation with your friend, "Alice did it"(alone) is mutually exclusive with "Bob did it"(alone), for they cannot both be true. They are rival hypotheses, and it's appropriate to ask which one of the two better explains the evidence. That is the heart of Bayes' theorem. However, "Alice did it" is NOT mutually exclusive with "the knife did it", because obviously Alice could have used the knife to kill the victim. They are not rival hypotheses. It is therefore NOT appropriate to say "the victim was killed by a knife. That eliminates any need for the victim to have been killed by Alice."

The same goes for the "alternative explanations" that your friend offers for the state of the knife, such as the idea that the knife always existed in that state, or that a combination of oils, moisture, and heat from outside the knife left the impression of the fingerprints. What do these have in common? None of them are mutually exclusive with the idea that Alice is the culprit. They are not rivals to the "Alice did it" hypothesis.

Likewise for all of the different ways that Alice could have wielded the knife: what is the probability that Alice's fingerprints ended up on the knife in that very specific way, given that she could have held the knife higher or lower on the grip, or wiped down the knife afterwards? Admittedly, it's very small. But that's not the end of the story: this probability now has to be compared with the probability from a RIVAL to the "Alice did it" hypothesis. So, what is the probability that Bob left that fingerprint? Absolutely minuscule, even compared to Alice's probability mentioned earlier: for not only would Bob have to hold that knife exactly in the same way that Alice held it, he furthermore has to somehow leave Alice's fingerprints while doing so. The ratio of these probabilities is what makes the knife serve as evidence pointing to Alice as the culprit.

The lesson here is that you are not done with your analysis until you've connected your ideas back to a set of RIVAL hypothesis. Ignoring this condition is an outright mathematical error in applying Bayes' theorem. It's akin to thinking that the sum of the sides in a triangle must add up to 180 inches. Your friend, in the conversation above, always stopped his analysis at the knife, instead of continuing it back to a set of competing hypothesis. He should have extended his analysis of the knife back to an "Alice did it", "Bob did it", "Carol did it", or a "nobody did it" hypothesis. That would have been the correct way to make his case. Then he would have seen that the knife DOES point to Alice being the culprit, DESPITE the fact that there are more likely "explanations" for the knife, because these "explanations" are NOT RIVALS to the "Alice did it" hypothesis. But among the rivals, "Alice did it" IS the most likely and therefore the best explanation for the state of the knife.

But your friend never did any of this. This was his mistake, which lead to his incorrect conclusions about the case.

Furthermore, your friend tried to sneak in the evidence - the knife - as a part of the "not Alice" hypothesis, when it should have remained as evidence to be considered by the set of competing hypotheses. In essence, the "not Alice" hypothesis became a parasite attached to a completely unrelated (but strongly supported) hypothesis - the "victim was killed with a knife" hypothesis. This is a common cheat when one wants to shore up a weak hypothesis, which cannot explain the evidence. Your "not Alice" hypothesis can't explain the knife with the fingerprints? Just attach the knife as part of your "not Alice" hypothesis, and say that your hypothesis explains everything. You think humans haven't been to the moon, but you can't explain the photos and the videos from the Apollo missions? Just attach them to your hypothesis, by saying that they're part of the government's moon landing conspiracy. You think there's no God, but you can't explain how that would result in the universe as it actually exists? Just sneak in science as part of your hypothesis, and parasitically leech off its prestige and pretend that it belongs to your hypothesis.

I would not be writing all this, except that I see this error made repeatedly, even by people who say they understand Bayesian reasoning. For instance, I've seen people say:

'Platonism explains the orderliness of the universe as well as theism, therefore the orderliness of the universe is not any evidence for theism.' The correct way to make this argument would require you to move past Platonism, to a rival to theism such as polytheism or atheism. So, for example, 'Polytheism explains the orderliness of the universe as well as theism, therefore the orderliness of the universe is not any evidence for theism over Polytheism' would be a sound argument, if polytheism did in fact explain why the universe should be orderly. As it stands, Platonism is not a rival to theism, and that invalidates the argument.

'If the universe were a simulation designed to study life, that would explain the existence of life far better than divine fine-tuning. Therefore the fine-tuning argument is not any evidence for a creator god.' Again, the idea of the universe as a simulation is not a rival to divine fine-tuning. Obviously a god could have created the universe by fine-tuning a set of agents to run a simulation that is our universe. These are not mutually exclusive ideas, and that invalidates this argument. In order to make the argument correctly, you must evaluate the existence of life with respect to the RIVALS of divine fine-tuning, such as random atheistic chance, or a god that's uninterested in life.

'A universe designed to produce black holes is just as good an explanation for why it's suited for life as a universe designed for life. Therefore, the existence of life is no evidence for a fine-tuning God.' This is exactly like the previous case: a universe designed to produce black holes is not mutually exclusive with God creating life. God could have made the universe suitable for life by creating it to produce many black holes. In order for you to make the initial argument correctly, you must either explain why a RIVAL to the God hypothesis would be more likely to make a black hole filled universe, or be more likely to create life directly with or without black holes.

'We can construct a system of morality without God by starting from the Golden Rule, which everyone agrees on. Therefore, morality is not any evidence for God'. By this point, you should know the key question to ask: is the Golden Rule mutually exclusive with God? Of course not. The analysis is therefore incomplete. To finish this line of thought, you must argue that some rival to the God hypothesis is a better explanation for the Golden Rule. For instance, you can try explaining how an atheist is under a stronger obligation to follow the Golden Rule than a believer. That is how you would bring the argument back to a set of competing hypothesis.

Remember that a hypothesis must be judged against its RIVALS. The competing hypothesis must be mutually exclusive. According to the rules of Bayesian reasoning, you are not done making your argument until you've brought it down to the evaluation of the hypothesis against its rivals.


You may next want to read:
Basic Bayesian reasoning: a better way to think (Part 1)
Science as evidence for Christianity against atheism (introduction)
Another post, from the table of contents