Bayes’ Theorem- Changing Your Mind with Evidence
Amazing what the holidaying rain seeks out.
I came across Bayes’ theorem while reading about its use in cybersecurity: spam filtering, phishing detection and probabilistic decision-making. Naturally, I ended up applying it to something more immediate: New Zealand weather and whether a heli-hike would actually go ahead the next day.
The idea is much simpler than the equation suggests:
Bayes is a mathematical way of changing your mind when new evidence arrives.
Imagine the chance of rain tomorrow is initially 30%. That is the prior.
Then I look outside. The mountains are hidden in cloud, the forecast has deteriorated, and the helicopter operator sounds doubtful. That new evidence should change my estimate. Maybe I now think the chance of bad weather is 70%. That updated probability is the posterior.
So the mental model is: Prior belief → New evidence → Updated belief
The equation is:
P(A|B) = [P(B|A) × P(A)] / P(B)
But conceptually it is simply:
What I believed before, adjusted by how strongly the evidence supports or contradicts it.
Naive Bayes
Naive Bayes applies the same idea but makes a simplifying assumption: it treats different pieces of evidence as though they are independent.
For the heli-hike, that might mean considering:
- cloud over the mountains
- rain
- strong wind
- poor forecast
- operator uncertainty
These things are obviously related, so the assumption is “naive”. Yet combining several imperfect clues can still produce surprisingly useful predictions.
Spam filters work similarly. Words like free, winner, urgent and prize may each provide a small clue. Together they can dramatically increase the probability that an email is spam.
Reflection
Maths was never my strongest area, but cybersecurity and AI keep showing me how useful it is.
What I like about Bayes is that it accepts uncertainty. It does not pretend we know things with certainty. We start with what we know, look at the evidence, and revise our judgement.
In that sense, Bayes is less about predicting the future than about becoming slightly less wrong as new information arrives. There is something elegant about that. I still envy people who experience mathematics the way others experience art or music. But I am starting to see why they might.