Uncertainty, Probability Theory, and Bayesian Inference

Foundations of Uncertainty and Probability

  • Nature of Uncertainty in Intelligent Systems:

    • Real-world environments are inherently non-deterministic, partially observable, and noisy.

    • Artificial intelligence agents must handle uncertainty due to incomplete information, imperfect sensors, and unpredictable environmental dynamics.

    • Planetary rovers navigating extraterrestrial terrain exemplify systems operating under uncertainty, where terrain roughness, mechanical slippage, and sensor degradation require probabilistic planning.

Autonomous Mars Rover operating in uncertain planetary terrain
  • Real-World Forecasting Applications:

    • Weather forecasting models quantify uncertainty through probability values associated with future states.

    • A 36-hour predictive weather horizon tracks temperature and precipitation probabilities across successive observation windows:

    • Tonight: Clear, Low 20∘20^\circ, 0%0\% chance of precipitation.

    • Thursday: High 36∘36^\circ, 0%0\% chance of precipitation.

    • Thursday Night: Low 25∘25^\circ, 0%0\% chance of precipitation.

    • Friday: High 46∘46^\circ, 0%0\% chance of precipitation.

    • Friday Night: Low 32∘32^\circ, 20%20\% chance of precipitation.

Weather forecast displaying temperatures and precipitation probabilities over 36 hours

Possible Worlds, Sample Spaces, and Discrete Probability Models

  • Formal Definitions of Probability Theory:

    • Possible World (ω\omega): A formal state or atomic configuration of the universe representing one specific outcome.

    • Sample Space (Ω\Omega): The set containing all possible worlds ω∈Ω\omega \in \Omega.

    • Probability Function (P(ω)P(\omega)): A real-valued assignment mapping each possible world to a numerical degree of belief.

  • Axiomatic Foundations of Probability:

    • Non-negativity and Boundedness: The probability assigned to any possible world must lie strictly within the range zero to one:     0≤P(ω)≤10 \le P(\omega) \le 1

    • Total Probability across the Sample Space: The sum of probabilities assigned to all possible worlds within the universe must equal exactly one:     ∑ω∈ΩP(ω)=1\sum_{\omega \in \Omega} P(\omega) = 1

  • Single Die Roll Model:

    • For a standard, fair six-sided die, the sample space consists of six mutually exclusive possible worlds:     Ω={1,2,3,4,5,6}\Omega = \{1, 2, 3, 4, 5, 6\}

    • By symmetry and the total probability axiom, each world has equal probability:     P(ω)=16P(\omega) = \frac{1}{6}

  • Two-Dice Combination Model:

    • Rolling two fair dice yields an atomic sample space consisting of 3636 equally likely possible worlds:     Ω={(1,1),(1,2),…,(6,6)}\Omega = \{(1,1), (1,2), \dots, (6,6)\}

    • Each individual pair outcome has a joint probability:     P(ω)=136P(\omega) = \frac{1}{36}

    • The sums of outcomes form distinct events:

    • Sum equal to 22: The only valid outcome is (1,1)(1,1), yielding a probability of 136\frac{1}{36}.

    • Sum equal to 77: There are 66 favorable outcomes—(1,6)(1,6), (2,5)(2,5), (3,4)(3,4), (4,3)(4,3), (5,2)(5,2), and (6,1)(6,1). The probability is:       P(sum to 7)=636=16P(\text{sum to } 7) = \frac{6}{36} = \frac{1}{6}

    • Sum equal to 1212: The only favorable outcome is (6,6)(6,6), yielding a probability of:       P(sum to 12)=136P(\text{sum to } 12) = \frac{1}{36}

Conditional Probability and the Product Rule

  • Unconditional Probability (Prior Probability):

    • Verbatim Definition: The degree of belief in a proposition in the absence of any other evidence.

    • Expressed as P(a)P(a), where no prior conditions or new observations have modified belief.

  • Conditional Probability (Posterior Probability):

    • Verbatim Definition: The degree of belief in a proposition given some evidence that has already been revealed.

    • Expressed notationally as P(a∣b)P(a \mid b), pronounced "the probability of aa given bb".

    • Common real-world instances of conditional beliefs include:

    • Meteorological persistence: P(rain today∣rain yesterday)P(\text{rain today} \mid \text{rain yesterday})

    • Dynamic navigation: P(route change∣traffic conditions)P(\text{route change} \mid \text{traffic conditions})

    • Medical diagnostics: P(disease∣test results)P(\text{disease} \mid \text{test results})

  • Mathematical Formulation:

    • Conditional probability is defined formally as the joint probability of both events occurring divided by the probability of the evidence event:     P(a∣b)=P(a∧b)P(b)P(a \mid b) = \frac{P(a \land b)}{P(b)}

    • This definition is strictly valid when P(b)>0P(b) > 0.

  • The Product Rule:

    • Rearranging the conditional probability definition yields the product rule, expressing joint probabilities as a product of prior and conditional terms:     P(a∧b)=P(b)P(a∣b)P(a \land b) = P(b) P(a \mid b)     P(a∧b)=P(a)P(b∣a)P(a \land b) = P(a) P(b \mid a)

  • Worked Two-Dice Conditional Probability Scenario:

    • Unconditional Prior: Prior to any rolling, the probability of rolling a sum of 1212 with two fair dice is:     P(sum 12)=136P(\text{sum } 12) = \frac{1}{36}

    • Evidence Revealing Condition: Suppose the first die is rolled and reveals the value 66 (event BB).

    • Probability of the Evidence: Six out of the 3636 possible configurations have 66 as the first die: (6,1)(6,1), (6,2)(6,2), (6,3)(6,3), (6,4)(6,4), (6,5)(6,5), and (6,6)(6,6).     P(B)=636=16P(B) = \frac{6}{36} = \frac{1}{6}

    • Joint Outcome: Only the world (6,6)(6,6) satisfies both rolling a sum of 1212 and having 66 as the first die:     P(sum 12∧B)=136P(\text{sum } 12 \land B) = \frac{1}{36}

    • Posterior Probability Calculation: Applying the definition of conditional probability:     P(sum 12∣B)=P(sum 12∧B)P(B)=13616=16P(\text{sum } 12 \mid B) = \frac{P(\text{sum } 12 \land B)}{P(B)} = \frac{\frac{1}{36}}{\frac{1}{6}} = \frac{1}{6}

    • The revelation of evidence updates the probability from 136\frac{1}{36} to 16\frac{1}{6}.

Random Variables and Probability Distributions

  • Random Variable Definition:

    • Verbatim Definition: A variable in probability theory with a domain of possible values it can take on.

    • Denoted by capital letters (e.g., XX, YY, Flight\text{Flight}), while specific values in their domain are denoted by lowercase letters (e.g., xx, yy).

  • Domains of Random Variables:

    • Discrete random variables have defined, countable state spaces:

    • Roll∈{1,2,3,4,5,6}\text{Roll} \in \{1, 2, 3, 4, 5, 6\}

    • Weather∈{sun,cloud,rain,wind,snow}\text{Weather} \in \{\text{sun}, \text{cloud}, \text{rain}, \text{wind}, \text{snow}\}

    • Traffic∈{none,light,heavy}\text{Traffic} \in \{\text{none}, \text{light}, \text{heavy}\}

    • Flight∈{on time,delayed,cancelled}\text{Flight} \in \{\text{on time}, \text{delayed}, \text{cancelled}\}

  • Probability Distributions:

    • A probability distribution assigns probabilities across every possible outcome in the domain of a random variable.

    • Example distribution for Flight\text{Flight}:     P(Flight=on time)=0.6P(\text{Flight} = \text{on time}) = 0.6     P(Flight=delayed)=0.3P(\text{Flight} = \text{delayed}) = 0.3     P(Flight=cancelled)=0.1P(\text{Flight} = \text{cancelled}) = 0.1

    • Distributions are compactly represented as ordered vectors:     P(Flight)=⟨0.6,0.3,0.1⟩\mathbf{P}(\text{Flight}) = \langle 0.6, 0.3, 0.1 \rangle

    • The elements of a valid probability distribution vector must sum to 11:     0.6+0.3+0.1=1.00.6 + 0.3 + 0.1 = 1.0

Statistical Independence

  • Formal Definition:

    • Verbatim Definition: The knowledge that one event occurs does not affect the probability of the other event.

    • Formally, event bb is independent of event aa if:     P(b∣a)=P(b)P(b \mid a) = P(b)

  • Mathematical Product Property of Independence:

    • Under the product rule, P(a∧b)=P(a)P(b∣a)P(a \land b) = P(a) P(b \mid a).

    • When independence holds, substituting P(b∣a)=P(b)P(b \mid a) = P(b) yields:     P(a∧b)=P(a)P(b)P(a \land b) = P(a) P(b)

  • Dice Examples of Independence vs. Mutually Exclusive Events:

    • Independent Rolls: Consider two separate dice, Red and Blue.

    • The probability of Red showing 11 and Blue showing 11 is computed via independent multiplication:       P(Red=1∧Blue=1)=P(Red=1)P(Blue=1)=(16)(16)=136P(\text{Red} = 1 \land \text{Blue} = 1) = P(\text{Red} = 1) P(\text{Blue} = 1) = \left(\frac{1}{6}\right) \left(\frac{1}{6}\right) = \frac{1}{36}

    • The probability of Red showing 11 and Blue showing 22:       P(Red=1∧Blue=2)=P(Red=1)P(Blue=2)=(16)(16)=136P(\text{Red} = 1 \land \text{Blue} = 2) = P(\text{Red} = 1) P(\text{Blue} = 2) = \left(\frac{1}{6}\right) \left(\frac{1}{6}\right) = \frac{1}{36}

    • Dependent / Mutually Exclusive Outcomes: Consider two conflicting outcomes for the same die roll.

    • Red showing 11 and Red showing 22 on the same roll cannot co-occur:       P(Red=1∧Red=2)=0P(\text{Red} = 1 \land \text{Red} = 2) = 0

    • Testing the independence product formula gives:       P(Red=1)P(Red=2)=(16)(16)=136≠0P(\text{Red} = 1) P(\text{Red} = 2) = \left(\frac{1}{6}\right) \left(\frac{1}{6}\right) = \frac{1}{36} \ne 0

  • Because 0≠1360 \ne \frac{1}{36}, outcomes of the same variable are strongly dependent rather than independent.

Bayes' Rule: Formulation, Derivation, and Inference

  • Mathematical Derivation of Bayes' Rule:

    • By the product rule, the joint probability P(a∧b)P(a \land b) can be expanded in two equivalent ways:     P(a∧b)=P(b)P(a∣b)P(a \land b) = P(b) P(a \mid b)     P(a∧b)=P(a)P(b∣a)P(a \land b) = P(a) P(b \mid a)

    • Equating both expressions gives:     P(a)P(b∣a)=P(b)P(a∣b)P(a) P(b \mid a) = P(b) P(a \mid b)

    • Dividing both sides by P(a)P(a) yields Bayes' Rule:     P(b∣a)=P(a∣b)P(b)P(a)P(b \mid a) = \frac{P(a \mid b) P(b)}{P(a)}

  • Philosophical and Structural Significance:

    • Bayes' Rule provides a rigorous mechanism for inverting conditional probabilities.

    • It converts the likelihood of observing evidence given a hypothesis into the posterior probability of the hypothesis given that evidence:     Knowing P(visible effect∣unknown cause)  ⟹  calculate P(unknown cause∣visible effect)\text{Knowing } P(\text{visible effect} \mid \text{unknown cause}) \implies \text{calculate } P(\text{unknown cause} \mid \text{visible effect})

    • Domain applications across reasoning tasks:

    • Meteorology: Knowing P(cloudy morning∣rainy afternoon)P(\text{cloudy morning} \mid \text{rainy afternoon}) enables calculating P(rainy afternoon∣cloudy morning)P(\text{rainy afternoon} \mid \text{cloudy morning}).

    • Medicine: Knowing P(medical test result∣disease)P(\text{medical test result} \mid \text{disease}) enables calculating P(disease∣medical test result)P(\text{disease} \mid \text{medical test result}).

    • Forensics / Law Enforcement: Knowing P(blurry text∣counterfeit bill)P(\text{blurry text} \mid \text{counterfeit bill}) enables calculating P(counterfeit bill∣blurry text)P(\text{counterfeit bill} \mid \text{blurry text}).

  • Step-by-Step Meteorological Case Study:

    • Problem Statement: Given that the morning is cloudy, what is the probability that it will rain in the afternoon?

    • Known Statistical Premises:

    • 80%80\% of rainy afternoons begin with cloudy mornings:       P(clouds∣rain)=0.8P(\text{clouds} \mid \text{rain}) = 0.8

    • 40%40\% of all days have cloudy mornings:       P(clouds)=0.4P(\text{clouds}) = 0.4

    • 10%10\% of all days have rainy afternoons:       P(rain)=0.1P(\text{rain}) = 0.1

    • Bayes' Rule Computation:     P(rain∣clouds)=P(clouds∣rain)P(rain)P(clouds)P(\text{rain} \mid \text{clouds}) = \frac{P(\text{clouds} \mid \text{rain}) P(\text{rain})}{P(\text{clouds})}     P(rain∣clouds)=(0.8)(0.1)0.4=0.080.4=0.2P(\text{rain} \mid \text{clouds}) = \frac{(0.8)(0.1)}{0.4} = \frac{0.08}{0.4} = 0.2

    • Conclusion: There is a 0.20.2 (20%20\%) probability of afternoon rain given morning clouds.

Joint Probability Distributions and Normalization

  • Joint Probability Representation:

    • A joint probability distribution captures the probabilities of all simultaneous assignments to a set of random variables.

    • For the binary variables CC (Morning Clouds: C=cloudC = \text{cloud} vs. C=¬cloudC = \neg\text{cloud}) and RR (Afternoon Rain: R=rainR = \text{rain} vs. R=¬rainR = \neg\text{rain}), the full joint distribution contains four atomic worlds.

Joint probability distribution table for morning cloud cover and afternoon rain
  • Numerical Breakdown of the Joint Distribution:

    • P(C=cloud,R=rain)=0.08P(C = \text{cloud}, R = \text{rain}) = 0.08

    • P(C=cloud,R=¬rain)=0.32P(C = \text{cloud}, R = \neg\text{rain}) = 0.32

  • P(C=¬cloud,R=rain)=0.02P(C = \neg\text{cloud}, R = \text{rain}) = 0.02

  • P(C=¬cloud,R=¬rain)=0.58P(C = \neg\text{cloud}, R = \neg\text{rain}) = 0.58

    • Sum of All Joint Probabilities:     0.08+0.32+0.02+0.58=1.000.08 + 0.32 + 0.02 + 0.58 = 1.00

  • Conditional Inference Using Normalization Constant (α\alpha):

    • To compute the conditional distribution P(C∣rain)\mathbf{P}(C \mid \text{rain}), observe that the conditioning event R=rainR = \text{rain} isolates the column where R=rainR = \text{rain}:     P(C=cloud∣rain)=P(C=cloud,rain)P(rain)P(C = \text{cloud} \mid \text{rain}) = \frac{P(C = \text{cloud}, \text{rain})}{P(\text{rain})}     P(C=¬cloud∣rain)=P(C=¬cloud,rain)P(rain)P(C = \neg\text{cloud} \mid \text{rain}) = \frac{P(C = \neg\text{cloud}, \text{rain})}{P(\text{rain})}

  • The denominator P(rain)P(\text{rain}) acts as a normalizing scalar α\alpha:   α=1P(rain)=1P(C=cloud,rain)+P(C=¬cloud,rain)=10.08+0.02=10.10=10\alpha = \frac{1}{P(\text{rain})} = \frac{1}{P(C = \text{cloud}, \text{rain}) + P(C = \neg\text{cloud}, \text{rain})} = \frac{1}{0.08 + 0.02} = \frac{1}{0.10} = 10

  • Vector formulation using the normalization constant:   P(C∣rain)=αP(C,rain)\mathbf{P}(C \mid \text{rain}) = \alpha \mathbf{P}(C, \text{rain})   P(C∣rain)=α⟨0.08,0.02⟩=10×⟨0.08,0.02⟩=⟨0.8,0.2⟩\mathbf{P}(C \mid \text{rain}) = \alpha \langle 0.08, 0.02 \rangle = 10 \times \langle 0.08, 0.02 \rangle = \langle 0.8, 0.2 \rangle

  • Resulting Posterior Beliefs:

    • P(C=cloud∣R=rain)=0.8P(C = \text{cloud} \mid R = \text{rain}) = 0.8

    • P(C=¬cloud∣R=rain)=0.2P(C = \neg\text{cloud} \mid R = \text{rain}) = 0.2

General Rules of Probability

  • The Negation Rule:

    • The probability of an event not occurring is equal to one minus the probability of the event occurring:     P(¬a)=1−P(a)P(\neg a) = 1 - P(a)

  • The Inclusion-Exclusion Principle:

    • For any two events aa and bb, the probability of either event occurring is the sum of their individual probabilities minus the joint probability of both occurring (to prevent double-counting the intersection):     P(a∨b)=P(a)+P(b)−P(a∧b)P(a \lor b) = P(a) + P(b) - P(a \land b)

  • Marginalization (Summing Out):

    • Binary Form: The marginal prior probability of an event aa is determined by summing its joint occurrences across all possible states of an auxiliary variable bb:     P(a)=P(a,b)+P(a,¬b)P(a) = P(a, b) + P(a, \neg b)

  • General Form for Discrete Random Variables: Summing over all possible values yjy_j in the domain of random variable YY:   P(X=xi)=∑jP(X=xi,Y=yj)P(X = x_i) = \sum_{j} P(X = x_i, Y = y_j)

  • Empirical Demonstration Using Weather Table:   P(C=cloud)=P(C=cloud,R=rain)+P(C=cloud,R=¬rain)P(C = \text{cloud}) = P(C = \text{cloud}, R = \text{rain}) + P(C = \text{cloud}, R = \neg\text{rain})     P(C=cloud)=0.08+0.32=0.40P(C = \text{cloud}) = 0.08 + 0.32 = 0.40     P(C=¬cloud)=P(C=¬cloud,R=rain)+P(C=¬cloud,R=¬rain)=0.02+0.58=0.60P(C = \neg\text{cloud}) = P(C = \neg\text{cloud}, R = \text{rain}) + P(C = \neg\text{cloud}, R = \neg\text{rain}) = 0.02 + 0.58 = 0.60     P(R=rain)=P(C=cloud,R=rain)+P(C=¬cloud,R=rain)=0.08+0.02=0.10P(R = \text{rain}) = P(C = \text{cloud}, R = \text{rain}) + P(C = \neg\text{cloud}, R = \text{rain}) = 0.08 + 0.02 = 0.10     P(R=¬rain)=P(C=cloud,R=¬rain)+P(C=¬cloud,R=¬rain)=0.32+0.58=0.90P(R = \neg\text{rain}) = P(C = \text{cloud}, R = \neg\text{rain}) + P(C = \neg\text{cloud}, R = \neg\text{rain}) = 0.32 + 0.58 = 0.90

  • Conditioning (Law of Total Probability):

    • Binary Form: Expresses the marginal probability of an event aa as a weighted average of conditional probabilities conditioned on a partition of the space:     P(a)=P(a∣b)P(b)+P(a∣¬b)P(¬b)P(a) = P(a \mid b) P(b) + P(a \mid \neg b) P(\neg b)

  • General Form for Discrete Random Variables: Conditioning across all outcomes yjy_j of a random variable YY:   P(X=xi)=∑jP(X=xi∣Y=yj)P(Y=yj)P(X = x_i) = \sum_{j} P(X = x_i \mid Y = y_j) P(Y = y_j)

  • Conditioning is derived directly by applying the product rule (P(X,Y)=P(X∣Y)P(Y)P(X, Y) = P(X \mid Y)P(Y)) inside the marginalization summation.