Probability Theory Foundations


Probability Theory Foundations

Michael
Welcome to the first part of our first lecture. We are starting with probability theory and a set of introductory concepts that will support almost everything else in the course. This is material worth revisiting several times, because each review can deepen your understanding. We will cover probability spaces, joint, marginal, and conditional probability, the chain rule, Bayes' rule, and a language example that we will return to throughout the semester.

Maria
Let's begin with probability spaces. What is the basic object we start with?

Michael
We start with a sample space, traditionally written as Omega. The sample space contains all the possible outcomes under consideration. For a die, it might contain the possible numbers that can come up; for a coin, it could include heads and tails; and for a language example, it could contain possible words that occur next. An event is simply a subset of that sample space, such as the die showing a four, the die showing a four or five, the coin coming up heads, or the next word being “angel.”

Maria
So an event does not have to be one single outcome. It can collect several outcomes into one set.

Michael
Exactly. A probability space assigns a real number to each event. That number must obey three basic axioms. First is non-negativity: the probability of every event must be greater than or equal to zero. Second is disjoint union: if two events cannot happen at the same time, the probability of their union is the sum of their individual probabilities. Third is properness: the probability of the entire sample space is one.

Maria
Let's make disjointness especially clear. Two events are disjoint when their intersection is the empty set, meaning they have no outcome in common.

Michael
Right. If one event is “the die shows a four” and another is “the die shows a five,” they are disjoint. Their union means “the die shows a four or a five,” and the probability of that union equals the probability of four plus the probability of five. This addition rule applies because the two events cannot overlap.

Maria
And properness says that something in the sample space must happen, so the probability of Omega is one.

Michael
Yes. These definitions use the language of sets, but they also have equivalent descriptions in Boolean logic. The subset relationship between two sets corresponds to implication. Disjointness corresponds to saying that it is not possible for both events to hold together. And union corresponds to logical disjunction, or “or.” We will move back and forth between set-theoretic and logical descriptions because each can make different parts of a problem easier to express.

Maria
Now let's connect those abstract definitions to the running example from human language.

Michael
The example concerns word order and noun phrases. A noun phrase, or NP, is a phrase such as “I,” “the boy,” “every girl in the room,” or “no one.” A noun phrase can be a subject or an object. In the sentence “I ate the apple,” the phrase “the apple” is the object because it is associated with what was eaten.

Maria
And the historical language fact is that English once allowed more flexibility in where an object appeared.

Michael
Exactly. In present-day English, an object is generally postverbal: it comes after the verb, as in “I ate the apple.” But in an earlier period of English, an object noun phrase could occur either preverbally, before the verb, or postverbally, after the verb. In a simple phrase-structure representation, the verb phrase could therefore have the object followed by the verb, or the verb followed by the object.

Maria
And languages more generally show a tendency involving pronouns?

Michael
Yes. Across the languages of the world, there is a broad tendency for object pronouns, such as “me,” “her,” or “them,” to occur earlier in sentences on average than non-pronominal objects, such as “the apple,” “anyone in the room,” or “the hope for justice.” This is a cross-linguistic tendency, not a claim that every language follows the same pattern in every sentence.

Maria
So our two properties are, first, whether the object is preverbal or postverbal, and second, whether it is a pronoun or not.

Michael
Correct. Let X represent the object's position: preverbal or postverbal. Let Y represent its type: pronoun or not pronoun. Those two properties create four logically possible combinations: preverbal pronoun, preverbal non-pronoun, postverbal pronoun, and postverbal non-pronoun.

Maria
And a probability table assigning a value to each of those four combinations is called a joint distribution.

Michael
Right. Each cell in the contingency table represents a joint probability: the probability that both properties have the specified values. In our hypothetical table, the probability of a preverbal pronoun is 0.224, and the probability of a preverbal non-pronoun is 0.655. The postverbal pronoun cell is 0.014, and the postverbal non-pronoun cell is 0.107. These numbers are hypothetical, but they reflect the kind of pattern found in language: pronouns are much more associated with earlier position here.

Maria
The four cells together form the sample space for this example, because every object must fall into one of those four combinations.

Michael
Exactly. We can check properness by adding all four probabilities: 0.224 plus 0.655 plus 0.014 plus 0.107 equals 1. So the table is a proper probability distribution. We can also form larger events by combining disjoint cells.

Maria
For example, define an event E1 as either a preverbal pronoun or a postverbal non-pronoun.

Michael
Those two possibilities are mutually exclusive, so disjoint union applies. The probability of E1 is 0.224 plus 0.107, which equals 0.331. This illustrates how the axioms let us calculate probabilities for non-atomic events from the probabilities of smaller, disjoint events.

Maria
Now we have the joint distribution. What does it mean to take a marginal distribution?

Michael
A marginal distribution keeps only one random variable and sums out the other. In general, the marginal probability of X taking a particular value x is the sum over every possible value y of Y of the joint probability of X equal to x and Y equal to y. In symbols, we add the relevant row or column of the joint table, depending on how the table is arranged.

Maria
So to find the probability that an object is preverbal, we add the two preverbal cells, one for pronouns and one for non-pronouns.

Michael
Exactly. The probability of a preverbal object is 0.224 plus 0.655, which equals 0.879. The probability of a postverbal object is 0.014 plus 0.107, which equals 0.121. Those marginal probabilities sum to one, as they should.

Maria
And we can also marginalize in the other direction, over position, to get the distribution of pronouns versus non-pronouns.

Michael
Yes. The probability of a pronoun is 0.224 plus 0.014, which equals 0.238. The probability of a non-pronoun is 0.655 plus 0.107, which equals 0.762. Again, these add to one. Lowercase x and y refer to particular values, while uppercase X and Y refer to the random variables themselves, although that distinction may sometimes be abbreviated for convenience.

Maria
The next idea is conditional probability. How is it different from a marginal probability?

Michael
A marginal probability expresses belief about one event without specifying additional information. A conditional probability incorporates information that another event is known to hold. By definition, the probability of B given A equals the joint probability of A and B divided by the marginal probability of A. In notation, P of B given A equals P of A and B divided by P of A.

Maria
Let's apply that to language. Suppose a listener hears the verb but has not yet heard the object.

Michael
Imagine hearing a sentence fragment such as “I devoured...” In the historical-English scenario, the listener knows an object is coming, but does not yet know whether that object will be a pronoun. Crucially, the listener also knows that the object is postverbal, because it has not appeared before the verb. The relevant question is therefore not simply the overall probability of a pronoun. It is the conditional probability that the object is a pronoun given that it is postverbal.

Maria
Using the table, that is the joint probability of postverbal and pronoun divided by the marginal probability of postverbal.

Michael
Correct. The calculation is 0.014 divided by 0.121, which is approximately 0.116. Notice that 0.116 was not one of the original entries in the table. It is a new value produced by combining a joint probability with a marginal probability. Conditional probability is central in statistics, machine learning, and theories of how an intelligent agent updates its expectations during language processing.

Maria
So whenever we ask what an agent believes after receiving some information, we should look for an appropriate conditional probability.

Michael
Exactly. The question is not merely “How likely is event B?” but often “How likely is B given the information A that the agent has received?” That distinction will recur throughout the course.

Maria
Let's move to the chain rule. It sounds more complicated than it is.

Michael
The chain rule is a rearrangement of the conditional-probability definition. A joint probability can be written as the probability of one event multiplied by the probability of the other event conditional on the first. In notation, P of E1 and E2 equals P of E1 times P of E2 given E1. We get this simply by multiplying the definition of conditional probability by P of E1.

Maria
And it extends to more than two events.

Michael
Yes. For three events, one possible decomposition is the probability of E1, multiplied by the probability of E2 given E1, multiplied by the probability of E3 given E1 and E2. More generally, a joint probability over any number of variables can be decomposed into a product of a marginal probability and a sequence of conditional probabilities. Importantly, the events do not have one mandatory order: the decomposition can be carried out in different orders.

Maria
That flexibility is one reason the chain rule becomes useful in probability models.

Michael
Exactly. Breaking a joint probability into a product of simpler pieces is often called a chain-rule decomposition. We will use this repeatedly in models involving many random variables.

Maria
Now we arrive at Bayes' rule, or Bayes' theorem.

Michael
Bayes' rule lets us rewrite a conditional probability in the reverse direction. Instead of asking for the probability of B given A, we can express it using the probability of A given B, together with the relevant marginal probabilities. The formula is P of A given B equals P of B given A times P of A, divided by P of B.

Maria
That is why it is sometimes called Bayesian inversion or inverse probability: it swaps which event is being conditioned on.

Michael
Exactly. The event that was the outcome becomes the conditioning event, and the former conditioning event becomes the outcome. If there is an additional background variable or collection of variables, it remains on the conditioning side. So with background information I, the same inversion can be applied while I stays included in the relevant conditional and marginal probabilities.

Maria
Can we derive Bayes' rule rather than just memorize it?

Michael
Yes. Apply the chain rule in one direction: the joint probability of A and B equals the probability of B given A times the probability of A. Apply it in the opposite direction: the same joint probability equals the probability of A given B times the probability of B. Set those two expressions equal, then divide by P of B. That gives Bayes' rule directly. The formula requires P of B to be nonzero; if P of B is zero, the conditional probability is not defined by this division.

Maria
Bayes' rule also introduces the language of prior, posterior, and likelihood.

Michael
Suppose we begin with a belief about A before receiving some new information. The marginal probability P of A is called the prior probability. After learning B, our revised belief is P of A given B, called the posterior probability. Bayes' rule says that the posterior is proportional to the prior multiplied by the likelihood, where the likelihood is P of B given A.

Maria
And the denominator, P of B, is the normalizing constant.

Michael
Right. Dividing by P of B ensures that the resulting posterior distribution is proper. The denominator is also called a partition function in some contexts. In many applications, calculating this normalizing constant is the most difficult part.

Maria
Let's return to the language example, but this time imagine that our information is given in a different form.

Michael
Suppose we know the prior probability that an object is a pronoun: 0.238. We also know the probability that an object is preverbal given that it is a pronoun, and the probability that it is postverbal given that it is a pronoun. These conditional probabilities can be obtained from the joint table; for example, postverbal given pronoun is 0.014 divided by 0.238. The complementary position probabilities follow from properness by subtracting from one.

Maria
But the listener's question is still the reverse conditional: what is the probability of a pronoun given that the object is postverbal?

Michael
Exactly. Bayes' rule lets us invert the information. The probability of a pronoun given postverbal equals the probability of postverbal given pronoun, multiplied by the prior probability of pronoun, divided by the marginal probability of postverbal. The first two quantities are directly available in this representation, but we still need the denominator, the normalizing constant.

Maria
And to calculate that denominator, we marginalize over the possible values of the variable we do not care about.

Michael
Yes. The marginal probability of postverbal is obtained by summing the joint probabilities for postverbal pronoun and postverbal non-pronoun. If those joint probabilities are not directly listed, we use the chain rule to express each joint as a conditional probability multiplied by a marginal probability. In this example, carrying out that calculation gives 0.121 for the marginal probability of postverbal.

Maria
Then the final result is 0.014 divided by 0.121, or approximately 0.116, exactly as before.

Michael
Right. We reached the same conditional probability from two equivalent descriptions of the information. One description gave us the joint table and marginals directly. The other gave us a prior and conditional probabilities, after which Bayes' rule reconstructed the desired reverse conditional.

Maria
That suggests an important practical lesson: different probability representations can encode the same information, but one may be more convenient for a particular query.

Michael
Exactly. A marginal distribution together with several conditional distributions can be a more concise representation than a large joint table. As the number of variables and possible values grows, that difference can become substantial. Bayes' rule allows us to recover reverse conditional probabilities when the representation gives us the opposite direction.

Maria
And this connects directly to incremental language processing.

Michael
Yes. In real time, as a listener hears each word, the mind can continually update beliefs about what the speaker means and what is likely to come next. Hearing a verb such as “devoured” provides information that an object will follow. The listener can then update the probability that the upcoming object is a pronoun, using the fact that it is postverbal. Bayesian inference provides one formal way to describe this movement from prior beliefs to posterior beliefs as new linguistic information arrives.

Maria
The speaker and listener may also organize information in different orders.

Michael
That is an important point. From a speaker's perspective, it is plausible to imagine first deciding whether to refer to something with a pronoun and then deciding on word order, although whether language production really works that way is an empirical question. From the listener's perspective, the useful query may be the reverse: given that the object is postverbal, how likely is it to be a pronoun? Bayes' rule connects those two directions.

Maria
Finally, how is Bayes' rule sometimes written when the normalizing constant is difficult or unnecessary to compute?

Michael
One option is to write the denominator explicitly as a sum over all possible values of the variable being marginalized out. Another is to suppress the normalizing constant and write that the posterior is proportional to the prior multiplied by the likelihood. This says that the posterior has the same relative values as the prior times the likelihood, even if we have not yet scaled those values so that they sum to one.

Maria
So the main path through this lecture is: define events in a probability space, combine them into joint distributions, marginalize variables when we want a simpler distribution, condition on information when we want an informed belief, use the chain rule to decompose joint probabilities, and use Bayes' rule to reverse a conditional relationship.

Michael
Exactly. These ideas are foundational and will keep returning in statistics, machine learning, artificial intelligence, and language analysis. The running example showed why the distinctions matter: a listener's probability that an object is a pronoun changes once the listener knows that the object is postverbal. Keep reviewing the definitions, the table calculations, and the transformations between joint, marginal, conditional, and Bayesian forms; they are tools we will use throughout the semester.

Ask anything
We've read this whole study set, so questions about it get the best answers.