Bayes' rule: Log-odds form

[The odds form](https://arbital.com/p/1x5) of [Bayes's Rule](https://arbital.com/p/1lz) states that the [prior](https://arbital.com/p/1rm) [odds](https://arbital.com/p/odds_ratio) times the [likelihood ratio](https://arbital.com/p/56t) equals the [posterior odds](https://arbital.com/p/1rp). We can take the log of both sides of this equation, yielding an equivalent equation which uses addition instead of multiplication.

Letting $H_i$ and $H_j$ denote hypotheses and $e$ denote evidence, the log-odds form of Bayes' rule states:

$$
\log \left ( \dfrac
   {\mathbb P(H_i\mid e)}
   {\mathbb P(H_j\mid e)}
\right )
=
\log \left ( \dfrac
   {\mathbb P(H_i)}
   {\mathbb P(H_j)}
\right )
+
\log \left ( \dfrac
   {\mathbb P(e\mid H_i)}
   {\mathbb P(e\mid H_j)}
\right ).
$$

This can be numerically efficient for when you're carrying out [lots of updates one after another](https://arbital.com/p/1zg).  But a more important reason to think in log odds is to get a better grasp on the notion of 'strength of evidence'.

# Logarithms of likelihood ratios

Suppose you're visiting your friends Andrew and Betty, who are a couple. They promised that one of them would pick you up from the airport when you arrive. You're not sure which one is in fact going to pick you up ([prior odds](https://arbital.com/p/1rm) of 50:50), but you do know three things:

1. They have both a blue car and a red car. Andrew prefers to drive the blue car, Betty prefers to drive the red car, but the correlation is relatively weak. (Sometimes, which car they drive depends on which one their child is using.) Andrew is 2x as likely to drive the blue car as Betty.
2. Betty tends to honk the horn at you to get your attention. Andrew does this too, but less often. Betty is 4x as likely to honk as Andrew.
3. Andrew tends to run a little late (more often than Betty). Betty is 2x as likely to have the car already at the airport when you arrive.

All three observations are independent as far as you know (that is, you don't think Betty's any more or less likely to be late if she's driving the blue car, and so on).

Let's say we see a blue car, already at the airport, which honks.

The odds form of this calculation would be a $(1 : 1)$ prior for Betty vs. Andrew, times likelihood ratios of $(1 : 2) \times (4 : 1) \times (2 : 1),$ yielding posterior odds of $(1 \times 4 \times 2 : 2 \times 1 \times 1) = (8 : 2) = (4 : 1)$, so it's 4/5 = 80% likely to be Betty.

Here's the log odds form of the same calculation, using 1 **bit** to denote each factor of $2$ in belief or evidence:

- Prior belief in Betty of $\log_2 (\frac{1}{1}) = 0$ bits.
- Evidence of $\log_2 (\frac{1}{2}) = {-1}$ bits against Betty.
- Evidence of $\log_2 (\frac{4}{1}) = {+2}$ bits for Betty.
- Evidence of $\log_2 (\frac{2}{1}) = {+1}$ bit for Betty.
- Posterior belief of $0 + {^-1} + {^+2} + {^+1} = {^+2}$ bits that Betty is picking us up.

If your posterior belief is +2 bits, then your posterior odds are $(2^{+2} : 1) = (4 : 1),$ yielding a posterior probability of 80% that Betty is picking you up.

Evidence and belief represented this way is *additive,* which can make it an easier fit for intuitions about "strength of credence" and "strength of evidence"; we'll soon develop this point in further depth.

# The log-odds line

Imagine you start out thinking that the hypothesis $H$ is just as likely as $\lnot H,$ its negation. Then you get five separate independent $2 : 1$ updates in favor of $H.$ What happens to your probabilities?

Your odds (for $H$) go from $(1 : 1)$ to $(2 : 1)$ to $(4 : 1)$ to $(8 : 1)$ to $(16 : 1)$ to $(32 : 1).$

Thus, your probabilities go from $\frac{1}{2} = 50\%$ to $\frac{2}{3} \approx 67\%$ to $\frac{4}{5} = 80\%$ to $\frac{8}{9} \approx 89\%$ to $\frac{16}{17} \approx 94\%$ to $\frac{32}{33} \approx 97\%.$

Graphically representing these changing probabilities on a line that goes from 0 to 1:

![0 updates](https://i.imgur.com/pJOVvl1.png)
![3 updates](https://i.imgur.com/9AxEpQA.png)
![5 updates](https://i.imgur.com/HHeyAzO.png)

We observe that the probabilities approach 1 but never get there — they just keep stepping across a fraction of the remaining distance, eventually getting all scrunched up near the right end.

If we instead convert the probabilities into log-odds, the story is much nicer. 50% probability becomes 0 bits of credence, and every independent $(2 : 1)$ observation in favor of $H$ shifts belief by one unit along the line.

![the log-odds line](https://i.imgur.com/TquetiU.png)

(As for what happens when we approach the end of the line, there isn't one!  0% probability becomes $-\infty$ bits of credence and 100% probability becomes $+\infty$ bits of credence.%%%knows-requisite([https://arbital.com/p/1r6](https://arbital.com/p/1r6)):%%note: This un-scrunching of the [https://arbital.com/p/-interval](https://arbital.com/p/-interval) $(0,1)$ into the entire [https://arbital.com/p/-real_line](https://arbital.com/p/-real_line) is done by an application of the [inverse logistic](https://arbital.com/p/inverse_logistic_function) function.%% %%%)

# Intuitions about the log-odds line

There are a number of ways in which this infinite log-odds line is a better place to anchor your intuitions about "belief" than the usual [1](https://arbital.com/p/0,) probability interval. For example:

- Evidence you are twice as likely to see if the hypothesis is true than if it is false is ${+1}$ bits of evidence and a ${^+1}$-bit update, regardless of how confident or unconfident you were to start with--the strength of new evidence, and the distance we update, shouldn't *depend on* our prior belief.
- If your credence in something is 0 bits--neither positive or negative belief--then you think the odds are 1:1.
- The distance between $0.01$ and $0.000001$ is much greater than the distance between $0.11$ and $0.100001.$

To expand on the final point: on the 0-1 probability line, the difference between 0.01 (a 1% chance) and 0.000001 (a 1 in a million chance) is roughly the same as the distance between 11% and 10%.  This doesn't match our sense for the intuitive strength of a claim:  The difference between "1 in 100!" and "1 in a million!" feels like a far bigger jump than the difference between "11% probability" and "a hair over 10% probabiility."

On the log-odds line, a 1 in 100 credibility is ${^-2}$ orders of magnitude, and a "1 in a million" credibility is ${^-6}$ orders of magnitude.  The distance between them is minus 4 orders of magnitude, that is, $\log_{10}(10^{-6}) - \log_{10}(10^{-2})$ yields ${^-4}$ magnitudes, or roughly ${^-13.3}$ bits.  On the other hand, 11% to 10% is $\log_{10}(\frac{0.10}{0.90}) - \log_{10}(\frac{0.11}{0.89}) \approx {^-0.954}-{^-0.907} \approx {^-0.046}$ magnitudes, or ${^-0.153}$ bits.

The log-odds line doesn't compress the vast differences available near the ends of the probability spectrum. Instead, it exhibits a "belief bar" carrying on indefinitely in both directions--every time you see evidence with a likelihood ratio of $2 : 1,$ it adds one more bit of credibility.

The [Weber-Fechner law](https://en.wikipedia.org/wiki/Weber%E2%80%93Fechner_law) says that most human sensory perceptions are logarithmic, in the sense that a factor-of-2 intensity change *feels* like around the same amount of increase no matter where you are on the scale.  Doubling the physical intensity of a sound feels to a human like around the same amount of change in that sound whether the initial sound was 40 decibels or 60 decibels.  That's why there's an exponential decibel scale of sound intensities in the first place!

Thus the log-odds form should be, in a certain sense, the *most* intuitive variant of Bayes' rule to use: Just add the evidence-strength to the belief-strength!  If you can make your feelings of evidence-strength and belief-strength be proportional to the logarithms of ratios, that is.

Finally, the log-odds representation gives us an even easier way to see how [extraordinary claims require extraordinary evidence](https://arbital.com/p/21v): If your prior belief in $H$ is -30 bits, and you see evidence on the order of +5 bits for $H$, then you're going to wind up with -25 bits of belief in $H$, which means you still think it's far less likely than the alternatives.

# Example: Blue oysters

Consider the [blue oyster](https://arbital.com/p/54v) example problem:

You're collecting exotic oysters in Nantucket, and there are two different bays from which you could harvest oysters.

- In both bays, 11% of the oysters contain valuable pearls and 89% are empty.
- In the first bay, 4% of the pearl-containing oysters are blue, and 8% of the non-pearl-containing oysters are blue.
- In the second bay, 13% of the pearl-containing oysters are blue, and 26% of the non-pearl-containing oysters are blue.

Would you rather have a blue oyster from the first bay or the second bay?  Well, we first note that the likelihood ratio from "blue oyster" to "full vs. empty" is $1 : 2$ in either case, so both kinds of blue oyster are equally valuable.  (Take a moment to reflect on how obvious this would *not* seem before learning about Bayes' rule!)

But what's the chance of (either kind of) a blue oyster containing a pearl?  Hint: this would be a good time to convert your credences into bits (factors of 2).

%%hidden(Answer):
89% is around 8 times as much as 11%, so we start out with ${^-3}$ bits of belief that a random oyster contains a pearl.

Full oysters are 1/2 as likely to be blue as empty oysters, so seeing that an oyster is blue is ${^-1}$ bits of evidence against it containing a pearl.

Posterior belief should be around ${^-4}$ bits or $(1 : 16)$ against, or a probability of 1/17... so a bit more than 5% (1/20) maybe?  (Actually 5.88%.)
%%

# Real-life example: HIV test

A study of Chinese blood donors %note: Citation needed% found that roughly 1 in 100,000 of them had HIV (as determined by a very reliable gold-standard test).  The non-gold-standard test used for initial screening had a *sensitivity* of 99.7% and a *specificity* of 99.8%, meaning respectively that $\mathbb P({positive}\mid {HIV}) = .997$ and $\mathbb P({negative}\mid \neg {HIV}) = .998$, i.e., $\mathbb P({positive} \mid  \neg {HIV}) = .002.$

That is: the prior odds are $1 : 100,000$ against HIV, and a positive result in an initial screening favors HIV with a likelihood ratio of $500 : 1.$

Using log base 10 (because those are [easier to do in your head](https://arbital.com/p/416)):

- The prior belief in HIV was about -5 magnitudes.
- The evidence was a tad less than +3 magnitudes strong, since 500 is less than 1,000.  ($\log_{10}(500) \approx 2.7$).

So the posterior belief in HIV is a tad underneath -2 magnitudes, i.e., less than a 1 in 100 chance of HIV.

Even though the screening had a $500 : 1$ likelihood ratio in favor of HIV, someone with a positive screening result _really_ should not panic!

Admittedly, this setup had people being screened randomly, in a relatively non-AIDS-stricken country.  You'd need separate statistics for people who are getting tested for HIV because of specific worries or concerns, or in countries where HIV is highly prevalent.  *Nonetheless,* the points that "only a tiny fraction of people have illness X" and that "preliminary observations Y may not have *correspondingly tiny* false positive rates" are worth remembering for many illnesses X and observations Y.

# Exposing infinite credences

The log-odds representation exposes the degree to which $0$ and $1$ are very unusual among the classical probabilities. For example, [if you ever assign probability absolutely 0 or 1 to a hypothesis, then no amount of evidence can change your mind about it, ever](https://arbital.com/p/4mq).

On the log-odds line, credences range from $-\infty$ to $+\infty,$ with the infinite extremes corresponding to probability $0$ and $1$ which can thereby be seen as "infinite credences". That's not to say that $0$ and $1$ probabilities should never be used. For an ideal reasoner, the probability $\mathbb P(X) + \mathbb P(\lnot X)$ should be 1 (where $\lnot X$ is the logical negation of $X$).%note:For us mere mortals, [consider avoiding extreme probabilities even then](https://arbital.com/p/http://lesswrong.com/lw/jr/how_to_convince_me_that_2_2_3/).% Nevertheless, these infinite credences of 0 and 1 behave like 'special objects' with a qualitatively different behavior from the ordinary credence spectrum. Statements like "After seeing a piece of strong evidence, my belief should never be exactly what it was previously" are false for extreme credences, just as statements like "subtracting 1 from a number produces a lower number" are false if you insist on regarding %%knows-requisite([https://arbital.com/p/1r6](https://arbital.com/p/1r6)): [$\aleph_0$](https://arbital.com/p/aleph_0) %% %%!knows-requisite([https://arbital.com/p/1r6](https://arbital.com/p/1r6)): infinity %% as a number.

# Evidence in decibels

E.T. Jaynes, in *Probability Theory: The Logic of Science* (section 4.2), reports that using decibels of evidence makes them easier to grasp and use by humans.

If an hypothesis has a likelihood ratio of $o$, then its evidence in decibels is given by the formula $e = 10\log_{10}(o)$.

In this scheme, multiplying the likelihood ratio by 2 means approximately adding 3dB. Multiplying by 10 means adding 10dB.

Jayne reports having used decimal logarithm first, for their  ease of calculation and having tried to switch to natural logarithms with the advent of pocket calculators. But decimal logarithms were found to be easier to grasp.

Szymon Slawinski
Joe Zeng
Alexei Andreev
Eric Rogstad
Viktor Gregor
Pierre Thierry
Nate Soares
John Schmitt
Lars Øvlisen
Eric Bruylant
Eliezer Yudkowsky

[Bayes's Rule](https://arbital.com/p/1x5) states that the [prior odds](https://arbital.com/p/1rm) times the [likelihood ratio](https://arbital.com/p/56t) equals the [posterior odds](https://arbital.com/p/1rp).  We can take the logarithms of both sides of the equation to get an equivalent rule which uses addition instead of multiplication.  Letting $H_i$ and $H_j$ denote hypotheses and $e$ denote evidence:

$$
\log \left ( \dfrac
   {\mathbb P(H_i\mid e)}
   {\mathbb P(H_j\mid e)}
\right )
=
\log \left ( \dfrac
   {\mathbb P(H_i)}
   {\mathbb P(H_j)}
\right )
+
\log \left ( \dfrac
   {\mathbb P(e\mid H_i)}
   {\mathbb P(e\mid H_j)}
\right ).
$$

To use a real-life example, a study of Chinese blood donors found that roughly 1 in 100,000 of them had HIV (as determined by a very reliable gold-standard test). The non-gold-standard test used for initial screening had a sensitivity of 99.7% and a specificity of 99.8%, meaning that it was 500 times as likely to return positive for infected as non-infected patients.  Then our prior belief is -5 orders of magnitude against HIV, and if we then observe a positive test result, this is evidence of strength +2.7 orders of magnitude for HIV.  Our posterior belief is -2.3 orders of magnitude, or odds of less than 1 to a 100, against HIV.


Bayes' rule: Functional form

[Bayes' rule](https://arbital.com/p/1lz) generalizes to continuous [functions](https://arbital.com/p/3jy), and states, "The [posterior](https://arbital.com/p/1rp) probability [density](https://en.wikipedia.org/wiki/Probability_density_function) is *proportional* to the [likelihood](https://arbital.com/p/1rq) function times the [prior](https://arbital.com/p/1rm) probability [density](https://en.wikipedia.org/wiki/Probability_density_function)."

$$\mathbb P(H_x\mid e) \propto \mathcal L_e(H_x) \cdot \mathbb P(H_x)$$

## Example

Suppose we have a biased coin with an unknown bias $b$ between 0 and 1 of coming up heads on each individual coinflip.  Since the bias $b$ is a continuous variable, we express our beliefs about the coin's bias using a [probability density function](https://en.wikipedia.org/wiki/Probability_density_function) $\mathbb P(b),$ where $\mathbb P(b)\cdot \mathrm{d}b$ is the probability that $b$ is in the interval $[+ \mathrm{d}b](https://arbital.com/p/b)$ for $\mathrm db$ small. (Specifically, the probability that $b$ is in the interval $[b](https://arbital.com/p/a,)$ is $\int_a^b \mathbb P(b) \, \mathrm db.$)

By hypothesis, we start out completely ignorant of the bias $b,$ meaning that all initial values for $b$ are equally likely.  Thus, $\mathbb P(b) = 1$ for all values of $b,$ which means that $\mathbb P(b)\, \mathrm db = \mathrm db$ (e.g., the chance of $b$ being found in the interval from 0.72 to 0.76 is 0.04).

![plot y = 1 + x * 0, x = 0 to 1](https://i.imgur.com/jUHn9pq.png?0)

We then flip the coin, and observe it to come up tails. This is our first piece of evidence. The likelihood $\mathcal L_{t_1}(b)$ of observation $t_1$ given bias $b$ is a continuous function of $b$, equal to 0.4 if $b = 0.6,$ 0.67 if $b = 0.33,$ and so on (because $b$ is the probability of heads and the observation was tails).

Graphing the likelihood function $\mathcal L_{t_1}(b)$ as it takes in the fixed evidence $t_1$ and ranges over variable $b,$ we obtain the straightforward graph $\mathcal L_{t_1}(b) = 1 - b.$

![plot y = 1 - x, x = 0 to 1](https://i.imgur.com/piyKfWe.png?0)

If we multiply the likelihood function by the prior probability function as it ranges over $b$, we obtain a *relative probability* function on the posterior, $\mathbb O(b\mid t_1) = \mathcal L_{t_1}(b) \cdot \mathbb P(b) = 1 - b,$ which gives us the same graph again:

![plot y = 1 - x, x = 0 to 1](https://i.imgur.com/piyKfWe.png?0)

But this can't be our posterior *probability* function because it doesn't integrate to 1.  $\int_0^1 (1 - b) \, \mathrm db = \frac{1}{2}.$  (The area under a triangle is half the base times the height.)  [Normalizing](https://arbital.com/p/1rk) this relative probability function will give us the posterior probability function:

$\mathbb P(b \mid t_1) = \dfrac{\mathbb O(b \mid t_1)}{\int_0^1 \mathbb O(b \mid t_1) \, \mathrm db} = 2 \cdot (1 - f)$

![plot y = 2(1 - x), x = 0 to 1](https://i.imgur.com/PtBSP6M.png?0)

The shapes are the same, and only the *y*-axis labels have changed to reflect the different heights of the pre-normalized and normalized function.

Suppose we now flip the coin another two times, and it comes up heads then tails. We'll denote this piece of evidence $h_2t_3.$  Although these two coin tosses pull our beliefs about $b$ in opposite directions, they don't cancel out — far from it! In fact, one value of $b$ ("the coin is always tails") is completely eliminated by this evidence, and many extreme values of $b$ ("almost always heads" and "almost always tails") are hit badly. That is, while the heads and the coins tails pull our beliefs in opposite directions, they don't pull with the same strength on all possible values of $b.$

We multiply the old belief

![plot y = 2(1 - x), x = 0 to 1](https://i.imgur.com/PtBSP6M.png?0)

by the additional pieces of evidence

![](https://i.imgur.com/aOx1avR.png?0)

and

![](https://i.imgur.com/piyKfWe.png?0)

and obtain the posterior *relative* density

![plot y = 2(1 - x)x(1 - x), x = 0 to 1](https://i.imgur.com/Gi7VqGo.png?0)

which is proportional to the [normalized](https://arbital.com/p/1rk) posterior probability

![plot y = 12(1 - x)x(1 - x), x = 0 to 1](https://i.imgur.com/tQueclr.png?0)

Writing out the whole operation from scratch:

$$\mathbb P(b \mid t_1h_2t_3) = \frac{\mathcal L_{t_1h_2t_3}(b) \cdot \mathbb P(b)}{\mathbb P(t_1h_2t_3)} = \frac{(1 - b) \cdot b \cdot (1 - b) \cdot 1}{\int_0^1 (1 - b) \cdot b \cdot (1 - b) \cdot 1 \, \mathrm{d}b} = {12\cdot b(1 - b)^2}$$

Note that it's okay for a posterior probability density to be greater than 1, so long as the total probability *mass* isn't greater than 1.  If there's probability density 1.2 over an interval of 0.1, that's only a probability of 0.12 for the true value to be found in that interval.

Thus, intuitively, Bayes' rule "just works" when calculating the posterior probability density from the prior probability density function and the (continuous) likelihood ratio function. A proof is beyond the scope of this guide; refer to [Proof of Bayes' rule in the continuous case](https://arbital.com/p/).

Alexei Andreev
Eric Rogstad
Nate Soares
Eric Bruylant
Eliezer Yudkowsky

[Bayes' rule](https://arbital.com/p/1lz) generalizes to continuous [functions](https://arbital.com/p/3jy), and says, "The [posterior](https://arbital.com/p/1rp) probability [density](https://en.wikipedia.org/wiki/Probability_density_function) is *proportional* to the [likelihood](https://arbital.com/p/1rq) function times the [prior](https://arbital.com/p/1rm) probability [density](https://en.wikipedia.org/wiki/Probability_density_function)."

$$\mathbb P(H_x\mid e) \propto \mathcal L_e(H_x) \cdot \mathbb P(H_x)$$


Bayes' rule: Proportional form

If $H_i$ and $H_j$ are hypotheses and $e$ is a piece of evidence, [Bayes' rule](https://arbital.com/p/1lz) states:

$$\dfrac{\mathbb P(H_i)}{\mathbb P(H_j)} \times  \dfrac{\mathbb P(e\mid H_i)}{\mathbb P(e\mid H_j)} = \dfrac{\mathbb P(H_i\mid e)}{\mathbb P(H_j\mid e)}$$

%%if-after([https://arbital.com/p/55z](https://arbital.com/p/55z)):
In the [Diseasitis problem](https://arbital.com/p/22s), we use this form of Bayes' rule to justify calculating the posterior odds of sickness via the calculation $(1 : 4) \times (3 : 1) = (3 : 4).$
%%

%%!if-after([https://arbital.com/p/55z](https://arbital.com/p/55z)):
In the [Diseasitis problem](https://arbital.com/p/22s), 20% of the patients in a screening population have Diseasitis, 90% of sick patients will turn a chemical strip black, and 30% of healthy patients will turn a chemical strip black.  We can use the form of Bayes' rule above to justify solving this problem via the calculation $(1 : 4) \times (3 : 1) = (3 : 4).$
%%

If instead of treating the ratios as odds, we actually calculate out the numbers for each term of the equation, we instead get the calculation $\frac{1}{4} \times \frac{3}{1} = \frac{3}{4},$ or $0.25 \times 3 = 0.75.$

If we try to directly interpret this, it says: "If a patient starts out 0.25 times as likely to be sick as healthy, and we see a test result that is 3 times as likely to occur if the patient is sick as if the patient is healthy, we conclude the patient is 0.75 times as likely to be sick as healthy."

This is valid reasoning, and we call it the *proportional* form of Bayes' rule.  To get the probability back out, we reason that if there's 0.75 sick patients to every 1 healthy patient in a bag, the bag comprises 0.75/(0.75 + 1) = 3/7 = 43% sick patients.

# Spotlight visualization

One way of looking at this result is that, since odds ratios are equivalent under multiplication by a positive constant, we can fix the right side of the odds ratio as equaling 1 and ask about what's on the left side.  This is what we do when seeing the calculation as $(0.25 : 1) \cdot (3 : 1) = (0.75 : 1),$ the form suggested by the theorem proved above.

We could visualize Bayes' rule as a pair of spotlights with different starting intensities, that go through lenses that amplify or reduce each incoming unit of light by a fixed multiplier.  In the [Diseasitis](https://arbital.com/p/22s) case, if we fix the right-side blue beam as having a starting intensity of 1 and a multiplying lens of 1, and we fix the left-side beam of having a starting intensity of 0.25 and a multiplying lens of 3x, then the result gives us a visualization of the calculation prescribed by Bayes' rule:

![bayes lights](https://i.imgur.com/BIgoE87.png?0)

Note the similarity to a [waterfall diagram](https://arbital.com/p/1wy).  The main thing the spotlight visualization adds is that we can imagine varying the absolute intensities of the lights and lenses, while preserving their relative intensities, in such a way as to make the right-side beams and lenses equal 1.

[draw the pre-proportional, odds form of the spotlight visualization.](https://arbital.com/p/fixme:)

%todo: add example problem in proportional/spotlight form%

# Usefulness in informal argument

The proportional form of Bayes' rule is perhaps the fastest way of describing Bayesian reasoning that sounds like it ought to be true.  If you were having a fictional character suddenly give a Bayesian argument in the middle of a story being read by many people who'd never heard of Bayes' rule, you might have them [say](http://hpmor.com/chapter/86):

> "Suppose the Dark Mark is certain to continue while the Dark Lord's sentience lives on, but a priori we'd only have guessed a twenty percent chance of the Dark Mark continuing to exist after the Dark Lord dies. Then the observation, "The Dark Mark has not faded" is five times as likely to occur in worlds where the Dark Lord is alive as in worlds where the Dark Lord is dead. Is that really commensurate with the prior improbability of immortality? Let's say the prior odds were a hundred-to-one against the Dark Lord surviving. If a hypothesis is a hundred times as likely to be false versus true, and then you see evidence five times more likely if the hypothesis is true versus false, you should update to believing the hypothesis is twenty times as likely to be false as true."

Similarly, if you were a doctor trying to explain the meaning of a positive test result to a patient, you might say:  "If we haven't seen any test results, patients like you are a thousand times as likely to be healthy as sick.  This test is only a hundred times as likely to be positive for sick as for healthy patients.  So now we think you're ten times as likely to be healthy as sick, which is still a pretty good chance!"

[Visual diagrams](https://arbital.com/p/1wy) and special notation for [odds](https://arbital.com/p/1x5) and [relative likelihoods](https://arbital.com/p/1rq) might make Bayes' rule more intuitive, but the proportional form is probably the most valid-*sounding* thing that *is* quantitatively correct that you can say in three sentences.

[write a from-scratch Standalone Intro of the proportional form of Bayes' rule in particular, using the Diseasitis example and going from frequency diagram to waterfall to spotlight, with no proofs, just to justify the proportional form.  add to Main a statement that if you can phrase things in proportional form, there exists a Standalone Intro that justifies it quickly.](https://arbital.com/p/fixme:)

Viktor Riabtsev
Alexei Andreev
Eric Rogstad
Himanshu Chaturvedi
Nate Soares
Eric Bruylant
Eliezer Yudkowsky
V N

Suppose that Professor Plum and Miss Scarlet are two suspects in a murder, and that we start out thinking that Professor Plum is twice as likely to have committed the murder as Miss Scarlet.  We then discover that the victim was poisoned.  We think that Professor Plum is around one-fourth as likely to use poison as Miss Scarlet.  Then after observing the victim was poisoned, we should think Plum is around half as likely to have committed the murder as Scarlet: $2 \times \dfrac{1}{4} = \dfrac{1}{2}.$  This reasoning is valid by [Bayes' rule](https://arbital.com/p/1lz).


Bayes' rule: Guide

Bayes' rule or Bayes' theorem is the law of probability governing *the strength of evidence* - the rule saying *how much* to revise our probabilities (change our minds) when we learn a new fact or observe new evidence.

You may want to learn about Bayes' rule if you are:

- A professional who uses statistics, such as a scientist or doctor;
- A computer programmer working in machine learning;
- A human being.

As Philip Tetlock found when studying "superforecasters", people who were especially good at predicting future events:

> The superforecasters are a numerate bunch: many know about Bayes' theorem and could deploy it if they felt it was worth the trouble. But they rarely crunch the numbers so explicitly. What matters far more to the superforecasters than Bayes' theorem is Bayes' core insight of gradually getting closer to the truth by constantly updating in proportion to the weight of the evidence.

— Philip Tetlock and Dan Gardner, [_Superforecasting_](https://arbital.com/p/https://en.wikipedia.org/wiki/Superforecasting)

## Learning Bayes' rule

This guide to Bayes' rule uses Arbital's technology to allow for multiple flavors of introduction. They vary by technical level, speed, and topics covered. After you pick your path, remember that you can still switch between pages, in particular by using the "Say what?" and "Go faster" buttons.

[https://arbital.com/p/multiple-choice](https://arbital.com/p/multiple-choice)

%%%wants-requisite([https://arbital.com/p/62d](https://arbital.com/p/62d)):
%%wants-requisite([https://arbital.com/p/62f](https://arbital.com/p/62f)):
%box:
*Your path will go over all forms of Baye's Rule, along with developing deep appreciation for its scientific usefulness. Your path will contain 12 pages:*

 * *Frequency diagrams: A first look at Bayes*
 * *Waterfall diagrams and relative odds*
 * *Introduction to Bayes' rule: Odds form*
 * *Bayes' rule: Proportional form*
 * *Extraordinary claims require extraordinary evidence*
 * *Ordinary claims require ordinary evidence*
 * *Bayes' rule: Log-odds form*
 * *Shift towards the hypothesis of least surprise*
 * *Bayes' rule: Vector form*
 * *Belief revision as probability elimination*
 * *Bayes' rule: Probability form*
 * *Bayesian view of scientific virtues*
%

%start-path([https://arbital.com/p/61b](https://arbital.com/p/61b))%
%%
%%!wants-requisite([https://arbital.com/p/62f](https://arbital.com/p/62f)):
%box:
No time to waste! Let's plunge directly into [a single-page abbreviated introduction to Bayes' rule](https://arbital.com/p/693).
%
%%
%%%

%%%!wants-requisite([https://arbital.com/p/62d](https://arbital.com/p/62d)):
%%wants-requisite([https://arbital.com/p/62f](https://arbital.com/p/62f)):
%box:
*Your path will teach you the basic odds form of Bayes' rule at a reasonable pace and then delve into the deep mysteries of the Bayes' Rule! Your path will contain 8 pages:*

* *Frequency diagrams: A first look at Bayes*
* *Waterfall diagrams and relative odds*
* *Introduction to Bayes' rule: Odds form*
* *Belief revision as probability elimination*
* *Extraordinary claims require extraordinary evidence*
* *Ordinary claims require ordinary evidence*
* *Shift towards the hypothesis of least surprise*
* *Bayesian view of scientific virtues*
%

%start-path([https://arbital.com/p/62f](https://arbital.com/p/62f))%
%%

%%!wants-requisite([https://arbital.com/p/62f](https://arbital.com/p/62f)):
%box:
*Your path will teach you the basic odds form of Bayes' rule at a reasonable pace. It will contain 3 pages:*

* *Frequency diagrams: A first look at Bayes*
* *Waterfall diagrams and relative odds*
* *Introduction to Bayes' rule: Odds form*
%

%start-path([https://arbital.com/p/62c](https://arbital.com/p/62c))%
%%
%%%

Joe Zeng
Alexei Andreev
Eric Rogstad
Tim Huegerich
Nate Soares
John John
Eric Bruylant
Kira Kutscher
Chris Cooper
Eliezer Yudkowsky


Path: Multiple angles on Bayes's Rule

Congratulations!  You've now learned multiple angles and approaches to Bayes' rule.  Please continue on to the next step of this path!

Eric Bruylant
Nate Soares
Eliezer Yudkowsky
Alexei Andreev

A page with all the details of Bayes' rule as requisites, to help autogenerate a sequence that includes all the requisites.


Ignorance prior

An ignorance prior is a a [prior](https://arbital.com/p/1rm) [probability function](https://arbital.com/p/1zj) on some problem of interest, usually with the intended properties of being simple to describe and facilitating good learning from the evidence.  A classic example would be the [inductive prior](https://arbital.com/p/21b) for [Laplace's Rule of Succession](https://arbital.com/p/21c).


Inductive prior

An "inductive prior" is a state of belief, before seeing any evidence, which is conducive to learning when the evidence finally appears.  A classic example would be observing a coin come up heads or tails many times.  If the coin is biased to come up heads 1/4 of the time, the inductive prior from [Laplace's Rule of Succession](https://arbital.com/p/21c) will start predicting future flips to come up tails with 3/4 probability.  The [maximum entropy prior](https://arbital.com/p/) for the coin, which says that every coinflip has a 50% chance of coming up heads and that all sequences of heads and tails are equally probable, will never start to predict that the next flip will be heads, even after observing the coin come up heads thirty times in a row.

The prior in [https://arbital.com/p/11w](https://arbital.com/p/11w) is another example of an inductive prior - far more powerful, far more complicated, and [entirely unimplementable on physically possible hardware](https://arbital.com/p/1mk).

Nate Soares
Eliezer Yudkowsky
Alexei Andreev


Laplace's Rule of Succession

# Theorem and proof

Suppose a sequence $X_1, \dots, X_n$ of binary values (0 or 1), e.g., a potentially non-fair coin which comes up heads or tails on each flip.

Laplace's Rule of succession says that if:

- 1.  We think each coinflip $X_i$ has an independent, unknown likelihood $f$ of coming up heads, and
- 2.  We think that all values of $f$ between 0 and 1 have equal probability density *a priori*...

Then, after observing $M$ heads and $N$ tails, the expected probability of heads on the next coinflip is:

$\dfrac{M + 1}{M + N + 2}$

Proof:

For a hypothetical value of $f$, each coinflip observed has a [likelihood](https://arbital.com/p/1rq) of $f$ if heads or $1 - f$ if tails.

The [prior](https://arbital.com/p/1rm) is uniform between 0 and 1, so a prior density of 1 everywhere.

By [Bayes's Rule](https://arbital.com/p/1zj), after seeing M heads and N tails, the [posterior](https://arbital.com/p/1rp) probability density over $f$ is *proportional* to $1 \cdot f^M(1 - f)^N.$

Then the [normalizing constant](https://arbital.com/p/1rk) is:  $\int_0^1 f^M(1 - f)^N \operatorname{d}\!f = \frac{M!N!}{(M + N + 1)!}.$

So the posterior probability density function is $f^M(1 - f)^N \frac{(M + N + 1)!}{M!N!}.$

Integrating this function, times $f,$ from 0 to 1, will yield the marginal probability of getting heads on the next flip.

The answer is thus:

$\dfrac{(M+1)!N!}{(M + N + 2)!} \cdot \dfrac{(M + N + 1)!}{M!N!} = \dfrac{M + 1}{M + N + 2}.$

# Simpler proof by combinatorics

Although Laplace's Rule of Succession was originally proved (by Thomas Bayes) by finding the posterior probability density and integrating, and the proof of Laplace's Rule illustrates the core idea of an [inductive prior](https://arbital.com/p/21b) in Bayesianism, a simpler intuition for the proof also exists.

Consider the problem originally posed by Thomas Bayes:  An initial billiard is rolled back and forth between the left and right edges of an ideal billiards table until friction brings it to a halt.  We then roll M + N additional billiard balls, and observe that M halt to the left of the initial billiard, and N halt to the right of it.  If this is all we know, what is the probability the next ball halts on the left, or right?

Suppose that we rolled a total of 5 additional billiards, and 2 halted to the left of the original, and 3 halted to the right.  Then, using **|** to symbolize the initial billiard, the billiards would have come to rest in the order:

- **LL|RRR**

Suppose we now roll a new billiard, symbolized by **+**, until it comes to a halt.  It's equally likely to appear at:

- **+LL|RRR**
- **L+L|RRR**
- **LL+|RRR**
- **LL|+RRR**
- **LL|R+RR**
- **LL|RR+R**
- **LL|RRR+**

This means there are 3 ways the ball could be ordered on the left of the **|**, and 4 ways it could be ordered on the right.  Since all left-to-right orderings of 7 randomly rolled billiard balls are equally likely a priori, we assign 3/7 probability that the ball comes to a rest on the left of the original ball's position.

See also the [Wikipedia page](https://en.wikipedia.org/wiki/Rule_of_succession).

# Use and abuse

Laplace's Rule of Succession assumes that all prior values of the frequency $f$ are undistinguished *a priori* in our subjective knowledge.

For example, Laplace used the rule to estimate a probability of the sun rising tomorrow, given that it had risen every day for the past 5000 years, and arrived at odds of around 1826251:1.  But today when we have physical knowledge of the Sun's operation, not every possible 'rate at which the Sun rises each day' is undistinguished.  Furthermore, even in Laplace's time, he should have perhaps thought it especially likely a priori that "the Sun always rises" and "the Sun never rises" were distinguished as unusually likely frequencies of the Sun rising, a priori.

The Rule of Succession follows from assuming approximate ignorance about prior frequencies.  It does not, of itself, justify this assumption. Variations of the rule of succession are obtainable by taking different priors, corresponding to different views of what should count as uninformative. See discussion on the Wikipedia page on [non-informative priors](https://www.wikipedia.com/en/Prior_probability#/Uninformative_priors). For example if starting with the Jeffreys' prior, then after observing $M$ heads and $N$ tails, the expected probability of heads on the next coinflip is:

$\dfrac{M + \dfrac{1}{2}}{M + N + 1}$

# Nomenclature

Laplace's Rule of Succession was the famous problem proved by Thomas Bayes in "An Essay towards solving a Problem in the Doctrine of Chances", read to the Royal Society in 1763, after Bayes's death.  Pierre-Simon Laplace, the first systematizer of what we now know as Bayesian reasoning, was so impressed by this theorem that he named the central theorem of his new discipline after Thomas Bayes.  The original theorem proven by Bayes was popularized by Laplace in arguments about the problem of induction, and so became known as Laplace's Rule of Succession.

Alexei Andreev
Jakub Łopuszański
Owen Cotton-Barratt
Eric Bruylant
Eliezer Yudkowsky

Suppose you roll an initial billiards ball on a billiards table, letting it bounce off the left and right sides until it comes to a halt.  You mark down where the billiard ball halted.  You then roll additional billiards, and [observe](https://arbital.com/p/1ly) that M come to rest to the left of the original billiard, and N halt to the right of the original billiard.  If this is all someone knows, what probability should they assign that the next billiard comes to halt on the left, or the right?  Laplace's Rule of succession says that the [odds](https://arbital.com/p/1rb) are (M + 1) : (N + 1) for left vs. right.  If we flip a coin with an unknown bias and observe 2 heads and 7 tails, our probability of getting heads next time is (2 + 1)/(2 + 7 + 2) = 3/11.  On the very first flip, it's 1 : 1 or 1/2.


Extraordinary claims require extraordinary evidence

[Bayes' rule](https://arbital.com/p/1lz) tells us how strong a piece of evidence has to be in order to support a given hypothesis.  This lets us see whether a piece of evidence is sufficient, or insufficient, to drive the probability of a hypothesis to over 50%.

For example, consider the [sparking widgets](https://arbital.com/p/559) problem:

> 10% of widgets are bad and 90% are good. 4% of good widgets emit sparks, and 12% of bad widgets emit sparks. Can you calculate in your head what percentage of sparking widgets are bad?

The prior odds are 1 : 9 for bad widgets vs. good widgets.

12% of bad widgets and 4% of good widgets emit sparks, so that's a likelihood ratio of 3 : 1 for sparking (bad widgets are three times as likely to emit sparks).

$(1 : 9 ) \times (3 : 1)  \ = \ (3 : 9) \ \cong \ (1 : 3)$ posterior odds for bad vs. good sparking widgets.  So 1/4 of sparking widgets are bad.

Bad widgets started out relatively rare:  1 in 10.  We applied a test — looking for sparks — that was only 3 times more likely to identify bad widgets as opposed to good ones. *The evidence was weaker than the prior improbability of the claim.*

This doesn't mean we toss out the evidence and ignore it.  It does mean that, after updating on the observation of sparkiness, we only gave 25% posterior probability to the widget being bad — the probability didn't go over 50%.

What would need to change to drive the probability of widget badness to over 50%?  We would need evidence with a more extreme likelihood ratio, more extreme than the (9 : 1) prior odds.  For example, if instead bad widgets were 50% likely to spark and good widgets were 5% likely to spark, the posterior odds would go to (10 : 9) or 53%.

In other words:  For a previously implausible proposition $X$ to end up with a high posterior probability, the likelihood ratio for the new evidence favoring $X$ over its alternatives, needs to be *more extreme* than the prior odds against $X.$

This is the quantitative argument behind the qualitative statement that "extraordinary claims require extraordinary evidence" (a claim popularized by Carl Sagan, which dates back to at least Pierre-Simon Laplace).

That is: an "[extraordinary claim](https://arbital.com/p/26y)" is one with a low [prior probability](https://arbital.com/p/1rm) in advance of considering the evidence, and "extraordinary evidence" is evidence with an extreme [likelihood ratio](https://arbital.com/p/1rq) favoring the claim over its alternatives.

# What makes evidence extraordinary?

The likelihood ratio is defined as:

$$\text{Likelihood ratio} = \dfrac{\text{Probability of seeing the evidence, assuming the claim is true}}{\text{Probability of seeing the evidence, assuming the claim is false}}$$

To obtain an extreme likelihood ratio, the bottom of the fraction has to be very low.  The top of the fraction being very high doesn't help much.  If the top of the fraction is 99% and the bottom is 70%, that's still not a very extreme ratio, and it doesn't help much if the top is 99.9999% instead.

So to get extremely strong evidence, we need to see an observation which is very _improbable,_ given "business as usual," but fairly likely according to the extraordinary claim. This observation would be deserving of the title, "extraordinary evidence".

# Example of an extraordinary claim and ordinary evidence: Bookcase aliens.

Consider the following hypothesis:  What if there are Bookcase Aliens who teleport into our houses at night and drop off bookcases?

Bob offers the following evidence for this claim:  "Last week, I visited my friend's house, and there was a new bookcase there. If there were no bookcase aliens, I wouldn't have expected that my friend would get a new bookcase. But if there are Bookcase Aliens, then the probability of my finding a new bookcase there was much higher. Therefore, my observation, 'There is a new bookcase in my friend's house,' is strong evidence supporting the existence of Bookcase Aliens."

In an intuitive sense, we have a notion that Bob's evidence "There is a new bookcase in my friend's house" is not as extraordinary as the claim "There are bookcase aliens" - that the evidence fails to lift the claim.  Bayes's Rule makes this statement precise.

Bob is, in fact, correct that his observation, "There's a new bookcase in my friend's house", is indeed evidence favoring the Bookcase Aliens.  Depending on how long it's been since Bob last visited that house, there might ceteris paribus be, say, a 1% chance that there would be a new bookcase there.  On the other hand, the Bookcase Aliens hypothesis might assign, say, 50% probability that the Bookcase Aliens would target this particular house among others.  If so, that's a [likelihood ratio](https://arbital.com/p/1rq) of 50:1 favoring the Bookcase Aliens hypothesis.

However, a reasonable prior on Bookcase Aliens would assign this a very *low* [prior probability](https://arbital.com/p/1rm) given our other, previous observations of the world.  Let's be conservative and assign odds of just 1 : 1,000,000,000 against Bookcase Aliens.  Then to raise our [posterior belief](https://arbital.com/p/1rp) in Bookcase Aliens to somewhere in the "pragmatically noticeable" range of 1 : 100, we'd need to see evidence with a cumulative likelihood ratio of 10,000,000 : 1 favoring the Bookcase Aliens.  50 : 1 won't cut it.

What would need to change for the observation "There's a new bookcase in my friend's house" to be convincing evidence of Bookcase Aliens, compared to the alternative hypothesis of "business as usual"?

As suggested by the Bayesian interpretation of [strength of evidence](https://arbital.com/p/22x), what we need to see is an observation which is nigh-impossible if there are *not* bookcase aliens.  We would have to believe that, [conditional](https://arbital.com/p/1rj) on "business as usual" being true, the [likelihood](https://arbital.com/p/1rq) of seeing a bookcase was on the order of 0.00000001%.  That would then take the [likelihood ratio](https://arbital.com/p/1rq), aka strength of evidence, into the rough vicinity of a billion to one favoring Bookcase Aliens over "business as usual".

We would still need to consider whether there might be *other* alternative hypotheses besides Bookcase Aliens and "business as usual", such as a human-operated Bookcase Conspiracy.  But at least we wouldn't be dealing with an observation that was so unsurprising (conditional on business as usual) as to be unable to support *any* kind of extraordinary claim.

However, if instead we suppose that Bookcase Aliens are allegedly 99.999999% probable to add a bookcase to Bob's friend's house, very little changes - the likelihood ratio is 99.99999% : 1% or 100 : 1 instead of 50 : 1.  To obtain an extreme likelihood ratio, we mainly need a tiny denominator rather than a big numerator.  In other words, "extraordinary evidence".

# What makes claims extraordinary?

An obvious next question is what makes a claim 'extraordinary' or 'ordinary'.  This is a [deep separate topic](https://arbital.com/p/26y), but as an example, consider the claim that the Earth is becoming warmer due to carbon dioxide being added to its atmosphere.

To evaluate the ordinariness or extraordinariness of this claim:

- We _don't_ ask whether the future consequences of this claim seem extreme or important.
- We _don't_ ask whether the policies that would be required to address the claim are very costly.
- We ask whether "carbon dioxide warms the atmosphere" or "carbon dioxide fails to warm the atmosphere" seems to conform better to the *deep, causal* generalizations we already have about carbon dioxide and heat.
- *If* we've already considered the deep causal generalizations like those, we don't ask about generalizations *causally downstream* of the deep causal ones we've already considered.  (E.g., we don't say, "But on every observed day for the last 200 years, the global temperature has stayed inside the following range; it would be 'extraordinary' to leave that range.")

These tests suggest that "Large amounts of added carbon dioxide will incrementally warm Earth's atmosphere" would have been an 'ordinary' claim in advance of trying to find any evidence for or against it - it's just how you would expect a greenhouse gas to work, more or less.  Thus, one is not entitled to demand a prediction made by this hypothesis that is wildly unlikely under any other hypothesis before believing it.

# Incremental updating

A key feature of the Bookcase Aliens example is that the followers of Bayes' rule acknowledges the observation of a new bookcase as being, locally, a single piece of evidence with a 50 : 1 likelihood ratio favoring Bookcase Aliens.  The Bayesian doesn't toss the observation out the window because it's *insufficient* evidence; it just gets accumulated into the pool.  If you visit house after house, and see new bookcase after new bookcase, the Bayesian slowly, incrementally, begins to wonder if something strange is going on, rather than dismissing each observation as 'insufficient evidence' and then forgetting it.

This stands in contrast to the instinctive way humans often behave, where, having concluded that they should not believe in Bookcase Aliens on the basis of the evidence in front of them, they discard that evidence entirely, denounce it, and say that it was never any evidence at all. (This is "[treating arguments like soldiers](https://arbital.com/p/https://wiki.lesswrong.com/wiki/Arguments_as_soldiers)" and acting like any evidence in favor of a proposition has to be "defeated.")

The Bayesian just says "yes, that is evidence in favor of the claim, but it's not quantitatively enough evidence." This idiom also stands in contrast to the practice of treating any concession an opponent makes as a victory.  If true claims are supposed to have all their arguments upheld and false claims are supposed to have all their enemy arguments defeated, then a single undefeated claim of *support* stands as a proof of victory, no matter how strong or weak the evidence that it provides. Not so with Bayesians — a Bayesian considers the bookcase observation to be locally a piece of evidence favoring Bookcase Aliens, just massively insufficient evidence.

# Overriding evidence

If you think that a proposition has prior odds of 1 to a $10^{100}$, and then somebody presents evidence with a likelihood ratio of $10^{94}$ to one favoring the proposition, you shouldn't say, "Oh, I guess the posterior odds are 1 to a million." You should instead question whether either (a) you were wrong about the prior odds or (b) the evidence isn't as strong as you assessed.

It's not that hard to end up believing a hypothesis that had very low prior odds. For example, whenever you look at the exact pattern of 10 digits generated by a random number generator, you're coming to believe a hypothesis that had prior odds on the order of ten billion to 1 against it.

But this should only happen with _true_ hypotheses. It's much rarer to find strong support for false hypotheses. Indeed, "strong evidence" is precisely "that sort of evidence we almost *never* see, when the proposition turns out to be false".

Imagine tossing a fair coin at most 300 times, and asking how often the sequence of heads and tails that it generates along the way, ever supports the false hypothesis "this coin comes up heads 3/4ths of the time" strongly over the true hypothesis "this coin is fair". As you can verify using [this code](https://arbital.com/p/https://gist.github.com/Soares/941bdb13233fd0838f1882d148c9ac14), the sequence of coinflips will at some point support the false hypothesis at the 10 : 1 level on about 8% of runs; it will at some point support the false hypothesis at the 100 : 1 level on about 0.8% of runs, and it will at some point support the false hypothesis at the 1000 : 1 level on about 0.08% of runs. (Note that we are less and less likely to be more and more deceived.)

Seeing evidence with a strength of $(10^{94} : 1)$ / 94 orders of magnitude / 312 [bits of evidence](https://arbital.com/p/1zh) supporting a false hypothesis should only happen to you, on average, once every IT DIDN'T HAPPEN.

Witnessing an observation that truly has a $10^{-94}$ probability of occurring if the hypothesis is false, in a case where the hypothesis *is in fact false,* is something that will not happen to anyone even once over the expected lifetime of this universe.

So if you think that the prior odds for a coin being unfair are $(1 : 10^{100})$ against, and then you see the coin flipped 312 times and coming up heads each time... you do not say, "Well, my new posterior odds are $(1 : 10^6)$ against the coin being unfair."  You say, "I guess I was wrong about the prior odds being that low."

Alexei Andreev
sdfsdf sdfsdf
Nate Soares
Grady Simon
Eric Bruylant
Eliezer Yudkowsky


Bayesian view of scientific virtues

A number of scientific virtues are explained intuitively by Bayes' rule, including:

- __Falsifiability:__ A good scientist should say what they do *not* expect to see if a theory is true.
- __Boldness:__ A good theory makes bold experimental predictions (that we wouldn't otherwise expect)
- __Precision:__ A good theory makes precise experimental predictions (that turn out correct)
- __Falsificationism:__ Acceptance of a scientific theory is always provisional; rejection of a scientific theory is pretty permanent.
- __Experimentation:__ You find better theories by making observations, and then updating your beliefs.

# Falsifiability

"Falsifiability" means saying which events and observations should definitely *not* happen if your theory is true.

This was first popularized as a scientific virtue by Karl Popper, who wrote, in a famous critique of Freudian psychoanalysis:

> Neither Freud nor Adler excludes any particular person’s acting in any particular way, whatever the outward circumstances. Whether a man sacrificed his life to rescue a drowning child (a case of sublimation) or whether he murdered the child by drowning him (a case of repression) could not possibly be predicted or excluded by Freud’s theory; *the theory was compatible with everything that could happen.*

In a Bayesian sense, we can see a hypothesis's falsifiability as a requirement for obtaining strong [likelihood ratios](https://arbital.com/p/1rq) in favor of the hypothesis, compared to, e.g., the alternative hypothesis "I don't know."

Suppose you're a very early researcher on gravitation, named Grek.  Your friend Thag is holding a rock in one hand, about to let it go.  You need to predict whether the rock will move downward to the ground, fly upward into the sky, or do something else.  That is, you must say how your theory $Grek$ assigns its probabilities over $up, down,$ and $other.$

As it happens, your friend Thag has his own theory $Thag$ which says "Rocks do what they want to do."  If Thag sees the rock go down, he'll explain this by saying the rock wanted to go down.  If Thag sees the rock go up, he'll say the rock wanted to go up.  Thag thinks that the Thag Theory of Gravitation is a very good one because it can explain any possible thing the rock is observed to do.  This makes it superior compared to a theory that could *only* explain, say, the rock falling down.

As a Bayesian, however, you realize that since $up, down,$ and $other$ are [mutually exclusive and exhaustive](https://arbital.com/p/1rd) possibilities, and *something* must happen when Thag lets go of the rock, the [conditional probabilities](https://arbital.com/p/1rj) $\mathbb P(\cdot\mid Thag)$ must sum to $\mathbb P(up\mid Thag) + \mathbb P(down\mid Thag) + \mathbb P(other\mid Thag) = 1.$

If Thag is "equally good at explaining" all three outcomes - if Thag's theory is equally compatible with all three events and produces equally clever explanations for each of them - then we might as well call this $1/3$ probability for each of $\mathbb P(up\mid Thag), \mathbb P(down\mid Thag),$ and $\mathbb P(other\mid Thag)$.  Note that Thag theory's is isomorphic, in a probabilistic sense, to saying "I don't know."

But now suppose Grek make falsifiable prediction!  Grek say, "Most things fall down!"

Then Grek not have all probability mass distributed equally!  Grek put 95% of probability mass in $\mathbb P(down\mid Grek)!$  Only leave 5% probability divided equally over $\mathbb P(up\mid Grek)$ and $\mathbb P(other\mid Grek)$ in case rock behave like bird.

Thag say this bad idea.  If rock go up, Grek Theory of Gravitation disconfirmed by false prediction!  Compared to Thag Theory that predicts 1/3 chance of $up,$ will be likelihood ratio of 2.5% : 33% ~ 1 : 13 against Grek Theory!  Grek embarrassed!

Grek say, she is confident rock *does* go down.  Things like bird are rare.  So Grek willing to stick out neck and face potential embarrassment.  Besides, is more important to learn about if Grek Theory is true than to save face.

Thag let go of rock.  Rock fall down.

This evidence with likelihood ratio of 0.95 : 0.33 ~ 3 : 1 favoring Grek Theory over Thag Theory.

"How you get such big likelihood ratio?" Thag demand.  "Thag never get big likelihood ratio!"

Grek explain is possible to obtain big likelihood ratio because Grek Theory stick out neck and take probability mass *away* from outcomes $up$ and $other,$ risking disconfirmation if that happen.  This free up lots of probability mass that Grek can put in outcome $down$ to make big likelihood ratio if $down$ happen.

Grek Theory win because falsifiable and make correct prediction!  If falsifiable and make wrong prediction, Grek Theory lose, but this okay because Grek Theory not Grek.

# Advance prediction

On the next experiment, Thag lets go of the rock, watches it fall down, and then says, "Thag Theory assign 100% probability to $\mathbb P(down\mid Thag)$."

Grek replies, "Grek think if Thag see rock fly up instead, Thag would've said $\mathbb P(up\mid Thag) = 1.$  Thag engage in [hindsight bias](https://en.wikipedia.org/wiki/Hindsight_bias)."

"Grek can't prove Thag biased," says Thag.  "Grek make ad hominem argument."

"New rule," says Grek.  "Everyone say probability assignment *before* thing happens.  That way, no need to argue afterwards."

Thag thinks.  "Thag say $\mathbb P(up\mid Thag) = 1$ and $\mathbb P(down\mid Thag) = 1$."

"Thag violate [probability axioms](https://en.wikipedia.org/wiki/Probability_axioms)," says Grek.  "Probability of all [mutually exclusive](https://arbital.com/p/1rd) outcomes must sum to $1$ or less.  But good thing Thag say in advance so Grek can see problem."

"That not fair!" objects Thag.  "Should be allowed to say afterwards so nobody can tell!"

## Formality

The rule of advance prediction is much more pragmatically important for informal theories than formal ones; and for these purposes, a theory is 'formal' when the theory's predictions are produced in a sufficiently mechanical and determined way that anyone can plug the theory into a computer and get the same answer for what probability the theory assigns.

When Newton's Theory of Gravitation was proposed, it was considered not-yet-fully-proven because retrodictions such as the tides, elliptical planetary orbits, and Kepler's Laws, had all been observed *before* Newton proposed the theory.  Even so, a pragmatic Bayesian would have given Newton's theory a lot of credit for these retrodictions, because unlike, say, a psychological theory of human behavior, it was possible for *anyone* - not just Newton - to sit down with a pencil and derive exactly the same predictions from Newton's Laws.  This wouldn't completely eliminate the possibility that Newton's Theory had in some sense been overfitted to Kepler's Laws and the tides, and would then be incapable of further correct new predictions.  But it did mean that, as a formal theory, there could be less pragmatic worry that Thagton was just saying, "Oh, well, of course my theory of 'Planets go where they want' would predict elliptical orbits; elliptical orbits look nice."

## Asking a theory's adherents what the theory says.

Thag picks up another rock.  "I say in advance that Grek Theory assign 0% probability to rock going down."  Thag drops the rock.  "Thag disprove Grek Theory!"

Grek shakes her head.  "Should ask advocates of Grek Theory what Grek Theory predicts."  Grek picks up another rock.  "I say Grek Theory assign $\mathbb P(down\mid Grek) = 0.95$."

"I say Grek Theory assign $\mathbb P(down\mid Grek) = 0$," counters Thag.

"That not how science work," replies Grek.  "Thag should say what Thag's Theory says."

Thag thinks for a moment.  "Thag Theory says rock has 95% probability of going down."

"What?" says Grek.  "Thag just copying Grek Theory!  Also, Thag not say that *before* seeing rocks go down!"

Thag smiles smugly.  "Only Thag get to say what Thag Theory predict, right?"

Again for pragmatic reasons, we should *first* ask the adherents of an informal theory to say what the theory predicts (a formal theory can simply be operated by anyone, and if this is not true, we will not call the theory 'formal').

Furthermore, since you can find a fool following any cause, you should ask the smartest or most technically adept advocates of the theory.  If there's any dispute about who those are, ask separate representatives from the leading groups.  Fame is definitely not the key qualifier; you should ask Murray Gell-Mann and not Deepak Chopra about quantum mechanics, even if more people have heard of Deepak Chopra's beliefs about quantum mechanics than have heard about Murray Gell-Mann.  If you really can't tell the difference, ask them both, don't ask only Chopra and then claim that Chopra gets to be *the* representative because he is most famous.

These types of courtesy rules would not be necessary if we were dealing with a sufficiently advanced Artificial Intelligence or ideal rational agent, but it makes sense for human science where people may be motivated to falsely construe another theory's probability assignments.

This informal rule has its limits, and there may be cases where it seems really obvious that a hypothesis's predictions ought not to be what the hypothesis's adherents claim, or that the theory's adherents are just stealing the predictions of a more successful theory.  But there ought to be a *large* (if defeasible) bias in favor of letting a theory's adherents say what that theory predicts.

# Boldness

A few minutes later, Grek is picking up another rock.  "$\mathbb P(down\mid Grek) = 0.95$," says Grek.

"$\mathbb P(down\mid Thag) = 0.95$," says Thag.  "See, Thag assign high probability to outcomes observed.  Thag win yet?"

"No," says Grek.  "[Likelihood ratios](https://arbital.com/p/1rq) 1 : 1 all time now, even if we believe Thag.  Thag's theory not pick up advantage.  Thag need to make *bold* prediction other theories not make."

Thag frowns.  "Thag say... rock will turn blue when you let go this time?  $\mathbb P(blue\mid Thag) = 0.90$."

"That very bold," Grek says.  "Grek Theory not say that (nor any other obvious 'common sense' or 'business as usual' theories).  Grek think that $\mathbb P(blue\mid \neg Thag) < 0.01$ so Thag prediction definitely has virtue of boldness.  Will be big deal if Thag prediction come true."

$\dfrac{\mathbb P(Thag\mid blue)}{\mathbb P(\neg Thag\mid blue)} > 90 \cdot \dfrac{\mathbb P(Thag)}{\mathbb P(\neg Thag)}$

"Thag win now?" Thag says.

Grek lets go of the rock.  It falls down to the ground.  It does not turn blue.

"Bold prediction not correct," Grek says.  "Thag's prediction virtuous, but not win.  Now Thag lose by 1 : 10 likelihood ratio instead.  Very science, much falsification."

"Grek lure Thag into trap!" yells Thag.

"Look," says Grek, "whole point is to set up science rules so *correct* theories can win.  If wrong theorists lose quickly by trying to be scientifically virtuous, is feature rather than bug.  But if Thag try to be good and loses, we shake hands and everyone still think well of Thag.  Is normative social ideal, anyway."

# Precision

At a somewhat later stage in the development of gravitational theory, the Aristotelian synthesis of Grek and Thag's theories, "Most things have a final destination of being at the center of the Earth, and try to approach that final destination" comes up against Galileo Galilei's "Most unsupported objects accelerate downwards, and each second of passing time the object gains another 9.8 meters per second of downward speed; don't ask me why, I'm just observing it."

"You're not just predicting that rocks are observed to move downward when dropped, are you?" says Aristotle.  "Because I'm already predicting that."

"What we're going to do next," says Galileo, "is predict *how long* it will take a bowling ball to fall from the Leaning Tower of Pisa."  Galileo takes out a pocket stopwatch.  "When my friend lets go of the ball, you hit the 'start' button, and as soon as the ball hits the ground, you hit the 'stop' button.  We're going to observe exactly what number appears on the watch."

After some further calibration to determine that Aristotle has a pretty consistent reaction time for pressing the stopwatch button if Galileo snaps his fingers, Aristotle looks up at the bowling ball being held from the Leaning Tower of Pisa.

"I think it'll take anywhere between 0 and 5 seconds inclusive," Aristotle says.  "Not sure beyond that."

"Okay," says Galileo.  "I measured this tower to be 45 meters tall.  Now, if air resistance is 0, after 3 seconds the ball should be moving downward at a speed of 9.8 * 3 = 29.4 meters per second.  That speed increases continuously over the 3 seconds, so the ball's *average* speed will have been 29.4 / 2 = 14.7 meters per second.  And if the ball moves at an average speed of 14.7 meters per second, for 3 seconds, it will travel downward 44.1 meters.  So the ball should take just a little more than 3 seconds to fall 45 meters.  Like, an additional 1/29th of a second or so."

![tower cartoon](https://i.imgur.com/kUeMG6w.png?0)

"Hm," says Aristotle.  "This pocketwatch only measures whole seconds, so your theory puts all its probability mass on 3, right?"

"Not literally *all* its probability mass," Galileo says.  "It takes you some time to press the stopwatch button once you see the ball start to fall, but it also takes you some time to press the button after you see the ball hit the ground.  Those two sources of measurement error should *mostly* cancel out, but maybe they'll happen not to on this particular occasion.  We don't have all *that* precise or well-tested an experimental setup here.  Like, if the stopwatch breaks and we observe a 0, then that will be a *defeat* for Galilean gravity, but it wouldn't imply a *final* refutation - we could get another watch and make better predictions and make up for the defeat."

"Okay, so what probabilities do you assign?" says Aristotle.  "I think my own theory is about equally good at explaining any falling time between 0 and 5 seconds."

![aristotle probability](https://i.imgur.com/LQNDTki.png?0)

Galileo ponders.  "Since we haven't tested this setup yet... I think I'll put something like 90% of my probability mass on a falling time between 3 and 4 seconds, which corresponds to an observable result of the watch showing '3'.  Maybe I'll put another 5% probability on air resistance having a bigger effect than I think it should over this distance, so between 4 and 5 seconds or an observable of '4'.  Another 4% probability on this watch being slower than I thought, so 4% for a *measured* time between 2 and 3 and an observation of '2'.  0.99% probability on the stopwatch picking this time to break and show '1' (or '0', but that we both agree shouldn't happen), and 0.01% probability on an observation of '2' which basically shouldn't happen for any reason I can think of."

![galileo probability](https://i.imgur.com/4CoLkuW.png?0)

"Well," says Aristotle, "your theory certainly has the scientific virtue of *precision,* in that, by concentrating most of its probability density on a narrow region of possible precise observations, it will gain a great likelihood advantage over *vaguer* theories like mine, which roughly say that 'things fall down' and have made 'successful predictions' each time things fall down, but which don't predict exactly how long they should take to fall.  If your prediction of '3' comes true, that'll be a 0.9 : 0.2 or 4.5 : 1 likelihood ratio favoring Galilean over Aristotelian gravity."

"Yes," says Galileo.  "Of course, it's not enough for the prediction to be precise, it also has to be correct.  If the watch shows '4' instead, that'll be a likelihood ratio of 0.05 : 0.20 or 1 : 4 against my theory.  It's better to be vague and right than to be precise and wrong."

Aristotle nods.  "Well, let's test it, then."

The bowling ball is dropped.

The stopwatch shows 3 seconds.

"So do you believe my theory yet?" says Galileo.

"Well, I believe it somewhere in the range of four and a half times as much as I did previously," says Aristotle.  "But that part where you're plugging in numbers like 9.8 and calculations like the *square* of the time strike me as kinda complicated.  Like, if I'm allowed to plug in numbers that precise, and do things like square them, there must be hundreds of different theories I could make which would be that complicated.  By the [quantitative form of Occam's Razor](https://arbital.com/p/11w), we need to [penalize the prior probability](https://arbital.com/p/) of your theory for its [algorithmic complexity](https://arbital.com/p/5v).  One observation with a likelihood ratio of 4.5 : 1 isn't enough to support all that complexity.  I'm not going to believe something that complicated because I see a stopwatch showing '3' just that one time!  I need to see more objects dropped from various different heights and verify that the times are what you say they should be.  If I say the prior complexity of your theory is, say, [20 bits](https://arbital.com/p/1zh), then 9 more observations like this would do it.  Of course, I expect you've already made more observations than that in private, but it only becomes part of the public knowledge of humankind after someone replicates it."

"But of course," says Galileo.  "I'd like to check your experimental setup and especially your calculations the first few times you try it, to make sure you're not measuring in feet instead of meters, or forgetting to halve the final speed to get the average speed, and so on.  It's a formal theory, but in practice I want to check to make sure you're not making a mistake in calculating it."

"Naturally," says Aristotle.  "Wow, it sure is a good thing that we're both Bayesians and we both know the governing laws of probability theory and how they motivate the informal social procedures we're following, huh?""

"Yes indeed," says Galileo.  "Otherwise we might have gotten into a heated argument that could have lasted for hours."

# Falsificationism

One of the reasons why Karl Popper was so enamored of "falsification" was the observation that falsification, in science, is more definite and final than confirmation.  A classic parable along these lines is Newtonian gravitation versus General Relativity (Einsteinian gravitation) - despite the tons and tons of experimental evidence for Newton's theory that had accumulated up to the 19th century, there was no sense in which Newtonian gravity had been *finally* verified, and in the end it was finally discarded in favor of Einsteinian gravity.  Now that Newton's gravity has been tossed on the trash-heap, though, there's no realistic probability of it *ever* coming back; the discard, unlike the adoption, is final.

Working in the days before Bayes became widely known, Popper put a *logical* interpretation on this setup.  Suppose $H \rightarrow E,$ hypothesis H logically implies that evidence E will be observed.  If instead we observe $\neg E$ we can conclude $\neg H$ by the law of the contrapositive.  On the other hand, if we observe $E,$ we can't logically conclude $H.$  So we can logically falsify a theory, but not logically verify it.

Pragmatically, this often isn't how science works.

In the nineteenth century, observed anomalies were accumulating in the observation of Uranus's orbit.  After taking into account all known influences from all other planets, Uranus still was not *exactly* where Newton's theory said it should be.  On the logical-falsification view, since Newtonian gravitation said that Uranus ought to be in a certain precise place and Uranus was not there, we ought to have become [infinitely certain](https://arbital.com/p/) that Newton's theory was false.  Several theorists did suggest that Newton's theory might have a small error term, and so be false in its original form.

The actual outcome was that Urbain Le Verrier and John Couch Adams independently suspected that the anomaly in Uranus's orbit could be accounted for by a previously unobserved eighth planet.  And, rather than *vaguely* say that this was their hypothesis, in a way that would just spread around the probability mass for Uranus's location and cause Newtonian mechanics to be not *too* falsified, Verrier and Adams independently went on to calculate where the eighth planet ought to be.  In 1846, Johann Galle observed Neptune, based on Le Verrier's observations - a tremendous triumph for Newtonian mechanics.

In 1859, Urbain Le Verrier recognized another problem: Mercury was not exactly where it should be.  While Newtonian gravity did predict that Mercury's orbit should precess (the point of closest approach to the Sun should itself slowly rotate around the Sun), Mercury was precessing by 38 arc-seconds per century more than it ought to be (later revised to 43).  This anomaly was harder to explain; Le Verrier thought there was [a tiny planetoid orbiting the Sun inside the orbit of Mercury](https://en.wikipedia.org/wiki/Vulcan_) (hypothetical_planet)).

A bit more than half a century later, Einstein, working on the equations for General Relativity, realized that Mercury's anomalous precession was exactly explained by the equations in their simplest and most elegant form.

And that was the end of Newtonian gravitation, permanently.

If we try to take Popper's logical view of things, there's no obvious difference between the anomaly with Uranus and the anomaly with Mercury.  In both cases, the straightforward Newtonian prediction seemed to be falsified.  If Newtonian gravitation could bounce back from one logical disconfirmation, why not the other?

From a Bayesian standpoint, we can see the difference as follows:

In the case of Uranus, there was no attractive alternative to Newtonian mechanics that was making better predictions.  The current theory seemed to be [strictly confused](https://arbital.com/p/227) about Uranus, in the sense that the current Newtonian model was making confident predictions about Uranus that were much wronger than the theory expected to be on average.  This meant that there ought to be *some* better alternative.  It didn't say that the alternative had to be a non-Newtonian one.  The low $\mathbb P(UranusLocation\mid currentNewton)$ created a potential for some modification of the current model to make a better prediction with higher $\mathbb P(UranusLocation\mid newModel)$, but it didn't say what had to change in the new model.

Even after Neptune was observed, though, this wasn't a *final* confirmation of Newtonian mechanics.  While the new model assigned very high $\mathbb P(UranusLocation\mid Neptune \wedge Newton),$ there could, for all anyone knew, be some unknown Other theory that would assign equally high $\mathbb P(UranusLocation\mid Neptune \wedge Other).$  In this case, Newton's theory would have no likelihood advantage versus this unknown Other, so we could not say that Newton's theory of gravity had been confirmed over *every other possible* theory.

In the case of Mercury, when Einstein's formal theory came along and assigned much higher $\mathbb P(MercuryLocation\mid Einstein)$ compared to $\mathbb P(MercuryLocation\mid Newton),$ this created a huge likelihood ratio for Einstein over Newton and drove the probability of Newton's theory very low.  Even if someday some other theory turns out to be better than Einstein, to do equally well at $\mathbb P(MercuryLocation\mid Other)$ and also get even better $\mathbb P(newObservation\mid Other),$ the fact that Einstein's theory did do much better than Newton on Mercury tells us that it's *possible* for simple theories to do much better on Mercury, in a simple way, that's definitely not Newtonian.  So whatever Other theory comes along will also do better on Mercury than $\mathbb P(MercuryLocation\mid Newton)$ in a non-Newtonian fashion, and Newton will just be at a new, huge likelihood disadvantage against this Other theory.

So - from a Bayesian standpoint - after explaining Mercury's orbital precession, we can't be sure Einstein's gravitation is correct, but we *can* be sure that Newton's gravitation is wrong.

But this doesn't reflect a logical difference between falsification and verification - everything takes place inside a world of probabilities.

## Possibility of permanent confirmation

It's worth noting that although Newton's theory of gravitation was false, something *very much like it* was true.  So while the belief "Planets move *exactly* like Newton says" could only be provisionally accepted and was eventually overturned, the belief, "All the kind of planets we've seen so far, in the kind of situations we've seen so far, move *pretty much* like Newtonian gravity says" was much more strongly confirmed.

This implies that, contra Popper's rejection of the very notion of confirmation, *some* theories can be finally confirmed, beyond all reasonable doubt.  E.g., the DNA theory of biological reproduction.  No matter what we wonder about quarks, there's no plausible way we could be wrong about the existence of molecules, or about there being a double helix molecule that encodes genetic information.  It's reasonable to say that the theory of DNA has been forever confirmed beyond a reasonable doubt, and will never go on the trash-heap of science no matter what new observations may come.

This is possible because DNA is a non-fundamental theory, given in terms like "molecules" and "atoms" rather than quarks.  Even if quarks aren't exactly what we think, there will be something enough *like* quarks to underlie the objects we call protons and neutrons and the existence of atoms and molecules above that, which means the objects we call DNA will still be there in the new theory.  In other words, the biological theory of DNA has a "something *sort of like this* must be true" theory *underneath* it.  The hypothesis that what Joseph Black called 'fixed air' and we call 'carbon dioxide', is in fact made up of one carbon atom and two oxygen atoms, has been permanently confirmed in a way that Newtonian gravity was not permanently confirmed.

There's some amount of observation which would convince us that all science was a lie and there were fairies in the garden, but short of that, carbon dioxide is here to stay.

Nonetheless, in ordinary science when we're trying to figure out controversies, working to Bayes' rule implies that a virtuous scientist should think like Karl Popper suggested:

- Treat disconfirmation as stronger than confirmation;
- Only provisionally accept hypotheses that have a lot of favorable-seeming evidence;
- Have some amount of disconfirming evidence and prediction-failures that makes you permanently put a hypothesis on the trash-heap and give up hope on its resurrection;
- Require a qualitatively *more* powerful kind of evidence than that, with direct observation of the phenomenon's parts and processes in detail, before you start thinking of a theory as 'confirmed'.

# Experimentation

Whatever the likelihood for $\mathbb P(observation\mid hypothesis)$, it doesn't change your beliefs unless you actually execute the experiment, learn whether $observation$ or $\neg observation$ is true, and [condition your beliefs in order to update your probabilities](https://arbital.com/p/1y6).

In this sense, Bayes' rule can also be said to motivate the experimental method.  Though you don't necessarily need a lot of math to realize that drawing an accurate map of a city requires looking at the city.  Still, since the experimental method wasn't quite obvious for a lot of human history, it could maybe use all the support it can get - including the central Bayesian idea of "Make observations to update your beliefs."

Eric Bruylant
Patrick LaVictoire
Otto Mossberg
Alexei Andreev
Eric Rogstad
Dewi Morgan
Nate Soares
Adom Hartell
Eliezer Yudkowsky

The classic scientific virtues of falsifiability (saying what we should *not* expect to see if a hypothesis is true), making bold experimental predictions (that aren't predicted by other theories), and precision (making narrow predictions about quantitative measurements) can be seen in the light of [Bayes' rule](https://arbital.com/p/1lz) as properties which allow theories to gain stronger evidence (greater [likelihood ratios](https://arbital.com/p/1rq)) in their favor when their predictions are correct.  We can also interpret traditional ideas like falsificationism - acceptance being provisional, and rejection being more forceful - as features that arise from the probability theory of Bayes' rule.


Strictly confused

A hypothesis is "strictly confused" by the data if the hypothesis does much worse at predicting the data than it expected to do.  If, on average, you expect to assign around 1% likelihood to the exact observation you see, and you actually see something to which you assigned 0.000001% likelihood, you are strictly confused.

%%knows-requisite([https://arbital.com/p/1r6](https://arbital.com/p/1r6)):
I.e., letting $H$ be a hypothesis and $e_0$ be the data observed from some set $E$ of possible observations, we say that $H$ is "strictly confused" when

$$ \log \mathbb P(e_0 \mid H) \ll \sum_{e \in E} \mathbb P(e \mid H) \cdot \log \mathbb P(e \mid H)$$

%%

# Motivation and examples

In Bayesian reasoning, the main reason to reject a hypothesis is when we find a better hypothesis.  Suppose we think a coin is fair, and we flip it 100 times, and we see that the coin comes up "HHHHHHH..." or all heads.  After doing this 100 times, the hypothesis "This is a double-headed coin" has a likelihood ratio of $2^{100} : 1$ favoring it over the "fair coin" hypothesis, and the "double-headed coin" hypothesis isn't *more* improbable than $2^{-100}$ a priori.

But this relies on the insight that there's a simple / a priori plausible *alternative* hypothesis that does better.  What if the coin is producing TTHHTTHHTTHH and we just never happen to think of 'alternating pairs of tails and heads' as a hypothesis?  It's possible to do better by thinking of a better hypothesis, but so far as the 'fair coin' hypothesis sees the world, TTHHTTHH... is no more or less likely than any other possible sequence it could encounter; the first eight coinflips have a probability of $2^{-8}$ and this would have been true no matter which eight coinflips were observed.  After observing 100 coinflips, the fair coin hypothesis will assign them a collective probability of $2^{-100},$ and in this sense, no sequence of 100 coinflips is any more 'surprising' or 'confusing' than any other from *within* the perspective of the fair coin hypothesis.

We can't say that we're 'confused' or 'surprised' on seeing a long sequence of coinflips to which we assigned some very low probability on the order of $2^{-100} \approx 10^{-30},$ because we expected to assign a probability that low.

On the other hand, suppose we think that a coin is biased to produce 90% heads and 10% tails, and we flip it 100 times and get some fair-looking sequence like  "THHTTTHTTTTHTHTHHH..." (courtesy of random.org).  Then we *expected* to assign the observed sequence a probability in the range of $0.9^{90} \cdot 0.1^{10} \approx 7\cdot 10^{-15},$ but we *actually* saw a sequence we assigned probability around $0.9^{50} \cdot 0.1^{50} \approx 5 \cdot 10^{-53}.$  We don't need to consider any other hypotheses to realize that we are very confused.  We don't need to have *invented* the concept of a 'fair coin', or know that the 'fair coin' hypothesis would have assigned a much higher likelihood in the region of $7 \cdot 10^{-31},$ to realize that there's something wrong with the current hypothesis.

In the case of the supposed fair coin that produces HHHHHHH, we only do poorly relative to a better hypothesis 'all heads' that makes a superior prediction.  In the case of the supposed 90%-heads coin that produces a random-looking sequence, we do poorly than we expected to do from inside the 90%-heads hypothesis, so we are doing poorly in an absolute, non-relative sense.

Being strictly confused is a sign that tells us to look for *some* alternative hypothesis in advance of our having any idea whatsoever what that alternative hypothesis might be.

# Distinction from frequentist p-values

The classical frequentist test for rejecting the null hypothesis involves considering the probability assigned to particular 'obvious'-seeming partitions of the data, and asking if we ended up inside a low-probability partition.

Suppose you think some coin is fair, and you flip the coin 100 times and see a random-looking sequence "THHTTTHTT..."

Someone comes along and says, "You know, this result is very surprising, given your 'fair coin' theory.  You really didn't expect that to happen."

"How so?" you reply.

They say, "Well, among all sequences of 1000 coins, only 1 in 16 such sequences start with a string like THHT TTHTT, a palindromic quartet followed by a palindromic quintet.  You confidently predicted that had a 15/16 chance of *not* happening, and then you were surprised."

"Okay, look," you reply, "if you'd written down that *particular* prediction in advance and not a lot of others, I might be interested.  Like, if I'd already thought that way of partitioning the data — namely, 'palindrome quartet followed by palindrome quintet' vs. '*not* palindrome quartet followed by palindrome quintet' — was a specially interesting and distinguished one, I might notice that I'd assigned the second partition 15/16 probability and then it failed to actually happen.  As it is, it seems like you're really reaching."

We can think of the frequentist tests for rejecting the fair-coin hypothesis as a *small* set of 'interesting partitions' that were written down in advance, which are supposed to have low probability given the fair coin.  For example, if a coin produces HHHHH HTHHH HHTHH, a frequentist says, "*Partitioning by number of heads*, the fair coin hypothesis says that on 15 flips we should get between 12 and 3 heads, inclusive, with a probability of 98.6%.  You are therefore surprised because this event you assigned 98.6% probability failed to happen.  And yes, we're just checking the number of heads and a few other obvious things, not for palindromic quartets followed by palindromic quintets."

Part of the point of being a Bayesian, however, is that we try to only reason on the data we actually observed, and not put that data into particular partitions and reason about those partitions.  The partitioning process introduces potential subjectivity, especially in an academic setting fraught with powerful incentives to produce 'statistically significant' data - the equivalent of somebody insisting that palindromic quartets and quintets are special, or that counting heads isn't special.

E.g., if we flip a coin six times and get HHHHHT, this is "statistically significant p < 0.05" if the researcher decided to flip coins until they got at least one T and then stop, in which case a fair coin has only a 1/32 probability of requiring six or more steps to produce a T.  If on the other hand the researcher decided to flip the coin six times and then count the number of tails, the probability of getting 1 or fewer T in six flips is 7/64 which is not 'statistically significant'.

The Bayesian says, "If I use [the Rule of Succession](https://arbital.com/p/21c) to denote the hypothesis that the coin has an unknown bias between 0 and 1, then the sequence HHHHHT is assigned 1/30 probability by the Rule of Succession  and 1/64 probability by 'fair coin', so this is evidence with a likelihood ratio of ~ 2 : 1 favoring the hypothesis that the coin is biased - not enough to [overcome](https://arbital.com/p/) any significant [prior improbability](https://arbital.com/p/)."

The Bayesian arrives at this judgment by only considering the particular, exact data that was observed, and not any larger partitions of data.  To compute the probability flow between two hypotheses $H_1$ and $H_2$ we only need to know the likelihoods of our *exact* observation given those two hypotheses, not the likelihoods the hypotheses assign to any partitions into which that observation can be put, etcetera.

Similarly, the Bayesian looks at the sequence HHHHH HTHHH HHTHH and says: this specific, exact data that we observed gives us a likelihood ratio of (1/1680 : 1/32768) ~ (19.5 : 1) favoring "[The coin has an unknown bias](https://arbital.com/p/21c) between 0 and 1" over "The coin is fair".  With that already said, the Bayesian doesn't see any need to talk about the total probability of the fair coin hypothesis producing data inside a partition of similar results that could have been observed but weren't.

But even though Bayesians usually try avoid thinking in terms of rejecting a null hypothesis using partitions, saying "I'm strictly confused!" gives a Bayesian a way of saying "Well, I know *something's* wrong..." that doesn't require already having the insight to propose a better alternative, or even the insight to realize that some particular partitioning of the data is worth special attention.

Alexei Andreev
Roland G
Nate Soares
Eric Bruylant
Eliezer Yudkowsky


Diseasitis

A nurse is screening a student population for a certain illness, Diseasitis (lit. "inflammation of the disease").

- Based on prior epidemiological studies, you expect that around 20% of the students in a screening population like this one will actually have Diseasitis.

You are testing for the presence of the disease using a color-changing tongue depressor with a sensitive chemical strip.

- Among students with Diseasitis, 90% turn the tongue depressor black.
- 30% of the students without Diseasitis will also turn the tongue depressor black.

One of your students comes into the office, takes your test, and turns the tongue depressor black.

Given only that information, what is the probability that they have Diseasitis?

This problem is used as a central example in several introductions to Bayes's Rule, including all paths in the [Arbital Guide to Bayes' Rule](https://arbital.com/p/1zq) and the [High-Speed Intro to Bayes' Rule](https://arbital.com/p/693).  A simple, unnecessarily difficult calculation of the answer can be found in [https://arbital.com/p/55z](https://arbital.com/p/55z).

A nurse is screening a set of patients for an illness, Diseasitis, using a tongue depressor that tends to turn black in the presence of the disease.

- On average, around 20% of the patients in a population like this one will actually have Diseasitis.  (20% prior prevalence.)
- Among the patients with Diseasitis, 90% turn the tongue depressor black.  (90% true positives.)
- 30% of patients without Diseasitis also turn the tongue depressor black.  (30% false positives.)

The probability that a patient with a blackened tongue depressor has Diseasitis can be found using [Bayes' rule](https://arbital.com/p/693).


Just a requisite

A tag which indicates that a page is mainly meant to serve as an anonymous requisite inside Arbital's requisite system.


Introductory Bayesian problems

Introductory problems:

1. [https://arbital.com/p/22s](https://arbital.com/p/22s)
2. [https://arbital.com/p/55b](https://arbital.com/p/55b)
3. [https://arbital.com/p/559](https://arbital.com/p/559)
4. [https://arbital.com/p/54v](https://arbital.com/p/54v)

(Hover or click to read them.)

Alexei Andreev
Nate Soares
Eric Bruylant
Eliezer Yudkowsky
Vojta Kovarik


Strength of Bayesian evidence

From a Bayesian standpoint, the strength of evidence can be identified with its [relative likelihood](https://arbital.com/p/1rq).  See the [log odds form of Bayes' rule](https://arbital.com/p/1zh) for a representation which makes this unusually clear.


Path: Insights from Bayesian updating

You've finished reading our current collection of Bayesian insights!  There aren't many here yet, but there might be more later.  Please continue on to the next part of this path!

Eric Bruylant
Nate Soares
Eliezer Yudkowsky

A small page that collects the currently explained list of Bayesian insights as requisites, to help Arbital auto-generate a learning path that includes all those requisites.


Finishing your Bayesian path on Arbital

You've now reached the end of whatever you asked the [Bayes' rule guide](https://arbital.com/p/1zq) to explain to you!

If you'd like to join in and help create more math content like this, we'd [love to have you](https://arbital.com/p/4d6)!

%%!knows-requisite([https://arbital.com/p/25y](https://arbital.com/p/25y)): If you'd like to keep reading about Bayesian reasoning here on Arbital, there's a couple of less polished pages on real-world insights derived from Bayes' rule — [click here to start on a path to learn them](https://arbital.com/p/https://arbital.com/learn/?path=bayes_update_details,bayes_guide_end).%%

You might also be interested in reading [this explanation of Arbital's goals.](https://arbital.com/p/58p)

Thank you!