Extending logic to deal with uncertainty

This article sketches a construction of probability calculus as an extension of classical logic to account for uncertainty so that by construction, it can be used to automate or bullet-proof our everyday decisions. This has applications both in artificial intelligence and decision making theory.

The true logic of this world is the calculus of probabilities, which takes account of the magnitude of the probability which is, or ought to be, in a reasonable man’s mind. – James C. Maxwell (1850) from [1]

I have never been satisfied by the usual presentation of probability theory using Kolmogorov’s axioms or any other formalism that uses sets. I don’t care about sets or measures. What I care about is deduction and inference; I care about logic and using a mathematical theory to bullet proof my decision making, or to automate my decisions using artificial intelligence. Classical logic is not sufficient for that because it can’t deal with uncertainty like humans do. So we need an extension of it that is able to deal with various degrees of certainty.

The main point of this article is to emancipate probability calculus from the usual construction of probability theory. So this article is not about events that will follow a distribution if an experience is repeated multiple times. Nor is it about sigma algebras. It is about contructing a new formal calculus from scratch that is based on classical logic and extends it to account for uncertainty. By chance, this calculus has the same rules as probability calculus and thus provides an alternative view of probability theory. We use the same notations to ease the comparison.

If you want to gain an alternative view on probability, or convince yourself that probability calculus is a valid theory upon which to base your decisions, this article is for you. You will need basic understanding of formal logic (proposition, and, or, not, imply) the follow the exposition. I won’t explain here how to use the rules of the newly constructed calculus to automate or improve your decisions. Rather, I sketch how such a calculus can be constructed from classical logic. The construction is not complete because my purpose is to show that it can be done and roughly illustrate how.

To be clear: the purpose of this construction is not to provide a mathematically stronger theory of probability. The goal is pedagogical: our construction explains the intuition behind the theory and explains why it can be used successfully in the real world. In a way, it’s about constructing a physical theory rather that mathematical theory, even though the construction is completely rigorous and mathematically justified (by Cox’s theorem).

The following exposition is a summary of the first few chapters of the book Probability theory: the Logic of Science by E. T. Jaynes. In the book, the concepts are introduced slowly and accompanied by a lot of conceptual remarks and insights that make Jaynes’ writing delightful. I strongly encourages you to read this book or at least its preface and introduction.

In his book, Jaynes explains how his construction of probabilities differs from the traditional one:

Our system of probability, however, differs conceptually from that of Kolmogorov in that we do not interpret propositions in terms of sets, but we do interpret probability distribution as carriers of incomplete information. Partly as a result, our system has analytical resources not present at all in the Kolmogorov system.

What does “probability” mean?

Throughout this article, I will use the term probability. Here is how to interpret it: the probability of an hypothesis is a measure of our confidence in it. It is subjective and depends primarily on our information about that hypothesis.

For instance, your confidence that it will rain soon might increase if you see dark clouds in the sky. Using the formalism, the confidence in hypothesis might increase if we learn evidence , which we will note: .

To say it again: probabilities quantify our confidence based on the amount of information we have.

This view has a concrete impact on how to use the results of probability theory. Suppose for instance that you draw balls from an urn.

You know that the urn contains balls, of which are reds. You draw a ball blindfolded without knowing its color and then look at the color. The probability that the ball you have is red is .

This means that your confidence that the ball will be red is . But this probability assignment is not an assertion of any physical property of the urn or its content; it is a description of your state of knowledge prior to the drawing. Therefore, it is illogical to speak of verifying this probability by performing experiments with the urn. The probability is not an expected frequency.

Probabilities are not properties of the real world, but we can use them to infer physical predictions. For instance, we can compute the most probable fraction of red balls in a sample of draws and confront this fraction with its frequency among multiple samples. If we do the math, the most probable fraction is almost equal to which can lead to confusion since it’s close to our probability estimate. But both are conceptually different, and in practice their values differ slightly.

See also: Probability from the Information theory vantage point

Classical logic is not enough

Classical logic is concerned with certainty: a proposition is either true or false. The rules to deduct true propositions from others is:

if is true, then is true

For instance, let the two propositions:

“it will start to rain by 10a.m. at the latest”
“the sky will be cloudy before 10a.m.”

Then it is true that : if (it will start to rain by 10a.m. at the latest), then (the sky will be cloudy before 10a.m. ).

So, if we know then the rule says that we know . But what if we know and ask about ? Classical logic doesn’t tell us anything about .

But in our everyday lives, we constantly use knowledge about to quantify our certainty about . For instance, if (the sky is cloudy before 10a.m.) then (I’m more confident that it will start raining by 10a.m. at the latest). Classical logic can’t help us with this kind of inference and that’s why we are looking to extend it with a formalism that can.

In particular, here are some inferences that classical logic can’t deal with but that we constantly use:

3) given : if is true, then is more plausible
4) given : if is false, then is less plausible
5) given : if is true, then is more plausible

For instance, it’s rule 3 that we used previously: if (the sky is couldy before 10a.m.), then (I’m more confident that it will rain by 10a.m. at the latest).

We will see at the end of this article how probability theory justifies these points.

The object of this article is to develop the mathematical theory which answers questions such as: What determines whether the probability for increases by large amount, raising it almost to certainty; or only a negligibly small amount, making the data almost irrelevant?

Before we dive into the construction of the theory, recall to following about formal logic:

is true if and only if both and are true
is true if and only if is false
is true as soon as one of or is true

And in particular:

is equivalent to
is equivalent to

Which means that we only need a suitable definition for and to construct both and .

An extension of logic to deal with confidence levels

We want to construct a formalism that will allow us to reason using uncertainty like we did in points (3, 4 and 5) in the previous section. Our approach is to establish a list of reasonable desiderata and then to obtain the formalism as a consequence of this list. This type of mathematical reasoning is called analysis-synthesis: we use our current knowledge to obtain necessary conditions on the theory being contructed and use them to find the unique construction that satisfies all the sufficient ones.

The desiderata are chosen so that a rational person, on discovering that they were violating one of them, would wish to revise their thinking. They are broadly stated below:

  1. Degrees of probability are represented by real numbers;
  2. Qualitative correspondence with common sense;
  3. Consistency 1: if a conclusion can be reasoned out in more than one way, then every possible way must lead to the same result;
  4. Consistency 2: the theory always take into account all the evidence it has and does not arbitrarily ignore some of the information;
  5. Consistency 3: the theory always represents equivalent states of knowledge by equivalent probability assignments.

You can think of the theory being constructed as the rules a robot will follow to take decisions and compute its own confidence in hypothesis.

I will not reconstruct the whole theory here and you should refer to the book to see the completed construction. Instead, I will only give an example of how the desiderata can be used to establish the rules of the new theory.

Since this theory is about computing confidence levels based on the information we have about an hypothesis, we need a notation to make explicit what information is taken into account. So we will use the notation: the probability of hypothesis given evidence that is true. I will often use for “evidence” or for “background information”.

Note: a consequence of the desiderata for our theory is that it can’t selectively ignore some established evidence, so we must take every established information into account when computing our probability estimations.


If you recall from previous section, classical logic can be built using only and . So our first objective will be to construct a probability equivalent of .

Our goal is thus to relate the probability that both and are true given evidence with the probability of given evidence and the probability .

In classical logic, to establish that is true, we must first establish that is true and then establish that is true. Or the other way around with first and second. To estimate our confidence in the fact that is true, we can estimate our confidence in the two steps.

step confidence in that step
decide that is true
- decide that is true
- having accepted as true, decide that is true
  • In order for to be a true proposition, it is necessary that is true. So the probability should be involved.
  • If is true then it is further necessary that be true, so the probability is also needed.
  • But if is false, then will be false independently of whatever one knows about . So our estimate will not depend on .
  • Using similar arguments, we can establish that our estimate only depends on and .

So we can state the following rule where is a function that indicates the dependence:

Do we really need to take the evidence ?

We could be tempted to use the dependence:

where the estimate for does not use evidence for . But this dependence is flawed as shown by taking:

  • : the next person you meet has a blue left eye
  • : the next person you meet has a green left eye
  • : you will meet someone soon

In which case, both and are quite plausible but is not.

How do we determine F?

Using a list of desiderata for our theory that we confront with , we can find the properties of . For instance, using a requirement for structural consistency and given that boolean algebra is associative, we find:

From which we can deduce that:

for some given function . And another requirement will allow us to find the properties of ; etc. Until we establish the properties of the whole theory and set for a fixed positive value of .

The above derivation is only intended as an illustration of the reasoning needed to construct the theory. I’m skipping details on purpose. If you want to know more about this construction, check out this wikipedia article about Cox’s theorem).

Rules of the new logic

Once every requirement for the theory has been used to establish necessary conditions, we find the founding rules of the theory:

The “and” rule expresses our confidence in given evidence .

The “not” rule expresses our confidence in given evidence .

Using these two founding rules, we can estimate our confidence in :

The principle of indifference

A nice consequence of the theory developped in the book is the proof of the principle of indifference. This principle states that if given background information the hypothesis (, …, ) are mutually exclusive and exhaustive and does not favor any one of them over any other, then:

In the book, the principle is derived using permutations and the requirement “consistency 3” only. In other words, we haven’t made any hypothesis about the (uniform) distribution of . Actually we haven’t even talked about distributions at all.

So it’s the information fed into the theory that determines the definite numerical values of .

I really like the way the principle was derived because it appeals to my way of thinking in everyday life. When confronted with two alternatives, if I don’t have any information indicating that I should have more confidence in one than the other, I always assume probabilities 1/2 for each.

If we relate the principle with information theory, then each hypothesis caries the same amount of information . Using the conversion formula between information and probabilities we find that , . You can read more about the link between probabilities and information in this article.

The principle can be further applied using the “or rule” to show that when we draw a ball from an urn containing 3 black balls and 7 white balls, we have confidence that we will draw a black ball (where is some background information). This problem is called the Bernoulli urn problem.

See also: Key ideas in probability and statistics illustrated with the Bernoulli Urn

The beauty of this approach is that we obtain this classical result of probability theory (the Bernoulli urn) without any arbitrary assumption, and without defining a formula for . Instead, it’s our previously established calculus rules along with a requirement for consistency that dictates the numerical value. Had we chosen any other numerical value, then we would get a contradiction with one of our previous rules.

Contrast this result that we obtained as a consequence of our theory with the original mathematical definition of probability: “the probability for an event is the ratio of the number of cases favorable to it, to the number of all cases possible when nothing leads us to expect that any one of these cases should occur more than any other, which renders them, for us, equally possible.” (Laplace in Theorie Analytique des Probabilites, 1812).

The definition given by Laplace seems arbitrary to me. It looks sensible, but what tells us that Laplace (or Bernoulli before him) wasn’t mistaken? Our new theory confirms Bernoulli and Laplace’s intuition in a formal setting.

Inference in the new logic

Our extension of propositional logic is of course compatible with the rules we already had. I extracted this section into its own article: Propositional logic from probability calculus

Recall the inference rules we wished to model:

3) given : if is true, then is more plausible
4) given : if is false, then is less plausible
5) given : if is true, then is more plausible

Using probability theory as constructed above, we can prove these inference rules are valid. For instance, given the rule , information that is true increases the probability for . I extracted this section into its own article: Why bayesian inference is more powerful than logic

See how to use this construction of probability calculus in my next article: Key ideas in probability and statistics illustrated on a simple problem

Confront our extension with propositional logic: Propositional logic from probability calculus

Or read more about the bayesian philosophy of probability theory: A Bayesian perspective


[1] Probability theory: the Logic of Science, E.T. Jaynes