# Probability Theory/Probability spaces

Anyone trying to reason with incomplete information must deal with the following fact: There are many possible ways the world could be, and we don't know exactly which one of these ways is true. Imagine Alice's friend Bob flips a coin. He catches it in his right hand and slaps it down onto a table. He does not lift his hand, so Alice cannot see how the coin landed. Then from Alice's perspective there are two ways the world could be: Either the coin is sitting on the table with its heads side up, or it's sitting with its tails side up. This set of possibilities is denoted , where denotes a heads outcome, and denotes a tails outcome. (In reality, more cases are possible. For example, through sleight of hand, Bob might have slipped the coin into his pocket so that there is no coin sitting on the table at all. For most examples in this book, we will ignore such edge cases, but it's important to remember that they are possible.)

Depending on how finely one examines the world, there may be many possible configurations of the world that correspond to heads. So might all correspond to the coin landing heads, but for each one of them, the air molecules in the room will be moving around in a slightly different pattern. In that case, we would have . We shall have to construct our theory so that someone who cares about the coin but doesn't care about the air molecules will get the same answer either way.

Let's suppose the the coin and the flip were both fair. Then since there is no obvious difference between heads and tails, they are intuitively both equally likely outcomes. In probability theory, we represent how likely something is by a single real number between 0 and 1, called the probability. A higher number means that something is more likely, a lower number means less likely. Something that's certainly true has probability 1, the largest possible probability, while something that's certainly false has probability 0, the smallest possible probability. We can imagine a function that gives us the probability of an statement. A statement is like a yes/no question, or a declarative sentence that can be either true or false. "The coin came up tails" would be an example of an statement. Here's the formal definition:

**Definition (statement)**:

Given a set of configurations, , and a probability function , an **statement** is a subset of those configurations.

An statement is like a sentence, since is the subset of all configurations of the world where that sentence is true. Likewise, a statement is like a yes/no question since it is the subset of all configurations of the world where the answer to that question is yes. "The coin came up tails" would thus correspond to the set (or if we're letting air molecules distinguish our configurations).

The probability measure is a function that takes a statement, which is a subset of , and returns a real number between 0 and 1. So its type signature is . Note that we used the symbol instead of a normal arrow. This is because is a partial function, which means that even if we give it some subset of as input, it's allowed to not give us an answer. This part of the definition becomes necessary when dealing with some infinite configuration spaces, where certain statements end up having undefined probabilities.

Because it's sometimes nice to have be a total function instead of a partial function, we can let be the set of subsets of that have defined probabilities. So we can also say that has the type signature .

**Definition (event)**:

An **event** is a statement with a defined probability. That is, an element of .

Kolmogorov came up with a set of axioms that define the rules of probability theory:

**Non-negativity:****Normalization:****Closure under complement:****σ-additivity:**For any countable sequence of disjoint events , we have

Note that axiom 4 imposes a constraint on : If the statements are disjoint, and if all of them are in , then their union must also be in .

**Definition (probability space)**:

A **probability space** is a measure space , being the set, the -algebra and the measure, such that , the mass of equals .