system
Given the following post, respond as if you're commenting on Reddit:
human
ElI5 What is bayesian mechanics?
gpt
It's a way of using the math of probability to make inferences that you might not initially think you could make.

Let's say you've flipped a coin ten times, and every time it came up heads. What's the probability that it's a rigged coin?

Maybe you know that every one in a million coins in circulation is rigged, but it seems like the odds of this particular coin being rigged is higher, because you flipped so many heads. So how can we get the actual probability?

Time for some math. But first, some notation:

P(A) is the probability of A happening.
P(A ^ B) is the probability of A and B both happening.
P(A | B) is the probability of A happening given that B happens. That is, we've assumed B, now what's the probability of A?

Now critically, P(A | B) = P(A ^ B) / P(B). That is, we take the probability of both happening, and then divide out the probability for B, because we're just assuming that as a given.

We can use this to figure out how likely it is that our coin is rigged.

P(rigged | ten heads) = P(rigged ^ ten heads) / P(ten heads)

P(rigged ^ ten heads) is just 1 in 1 million (assuming all rigged coins favor heads for the sake of this hypothetical). You have a 1 in 1 million chance of having a rigged coin, and if you do, then you'll always get ten heads.

P(ten heads) is a little more involved. It's going to be P(rigged ^ ten heads) + P(not rigged ^ ten heads). That is, if we don't know whether or not the coin is rigged, we have to account for the probabilities in the case that it is, and the case that it isn't. The probability of either happening is just the sum of each individual case happening.

The odds of a coin not being rigged are 999999 in 1 million, and then getting 10 heads with such a coin has a probability of (1/2)^10 = 1 / 1024. We multiple those together to get P(not rigged ^ ten heads) = 999999/1024000000.

We can now put together all our numbers to get

P(rigged | ten heads) = 1/1000000 / (1/1000000 + 999999/1024000000) =  0.001023.

So even with ten heads, it's still pretty unlikely you have a rigged coin.

Why this is interesting is that we've seemingly gone 'backwards'. The likelihood of getting 10 heads is influenced by whether not the coin is rigged, but we've started from the conclusion of 10 heads, and used that to go backwards to figure out whether the coin is rigged in the first place. There's no sense in which getting 10 heads can somehow cause a coin to be rigged retroactively, but we can still do math and gain information about the coin.