foundations of computational agents
Probability theory is built on the foundation of worlds and variables. The variables in probability theory are referred to as random variables. The term random variable is somewhat of a misnomer because it is neither random nor variable. As discussed in Section 4.1, worlds could be described in terms of variables; a world is a function that maps each variable to its value. Alternatively, variables could be described in terms of worlds; a variable is a function from worlds into the domain of the variable.
Variables will be written starting with an uppercase letter. Each variable has a domain which is the set of values that the variable can take. A Boolean variable is a variable with domain . We will write the assignment of to a variable as the lower-case variant of the variable, e.g., is written as and is . A discrete variable has a domain that is a finite or countable set.
A primitive proposition is an assignment of a value to a variable, or an inequality between variables and values or between variables (e.g., , or ). Propositions are built from primitive propositions using logical connectives.
This chapter mainly considers discrete variables with finite domains. The examples will have few variables, but modern applications may have thousands, millions or even billions of variables (or even infinitely many variables). For example, a world could consist of the symptoms, diseases and test results for all of the patients and care providers in a hospital throughout time. The model effectively goes on forever into the future, but we will only ever reason about a finite past and future. We might be able to answer questions about the probability that a patient with a particular combination of symptoms may come into the hospital in the next few years. There are infinitely many worlds whenever some variables have infinite domains or there are infinitely many variables.
We first define a probability over finite sets of worlds with finitely many variables and use this to define the probability of propositions.
A probability measure is a function from worlds into the non-negative real numbers such that,
where is the set of all possible worlds.
The use of 1 as the probability of the set of all of the worlds is just by convention. You could just as well use 100.
The definition of is extended to cover propositions. The probability of proposition , written , is the sum of the probabilities of possible worlds in which is true. That is,
Note that this definition is consistent with the probability of worlds, because if proposition completely describes a single world, the probability of and the probability of the world are equal.
Consider the ten worlds of Figure 8.1, with Boolean variable , and with variable with domain . Each world is defined by its shape, whether it’s filled and its position. Suppose the probability of each of these 10 worlds is , and any other worlds have probability 0. Then and .
If is a random variable, a probability distribution, , over is a function from the domain of into the real numbers such that, given a value , is the probability of the proposition . A probability distribution over a set of variables is a function from the values of those variables into a probability. For example, is a probability distribution over and such that , where and , has the value , where is a proposition and is the function on propositions defined above. Whether refers to a function on propositions or a probability distribution should be clear from context.
If are all of the random variables, then an assignment to all of the random variables corresponds to a world, and the probability of the proposition defining a world is equal to the probability of the world. The distribution over all worlds, is called the joint probability distribution.