Machine learning algorithms process data under uncertainty, noise, and incomplete information. To build reliable systems, algorithms must quantify uncertainty and update predictions as new evidence arrives. Probability theory provides the mathematical language needed to handle uncertainty. In particular, Bayesian learning uses probability distributions to model hypotheses and update beliefs systematically using empirical observations. At the same time, instance-based learning offers a contrasting, non-parametric approach. Instead of estimating global model parameters during a distinct training phase, instance-based models store training instances directly in memory. When presented with a new query, these models evaluate local similarity metrics against stored instances to make real-time predictions. Combining probabilistic Bayesian theory with instance-based memory models provides a broad set of tools for solving complex classification and regression tasks. This chapter explores probabilistic learning models and memory-based instance algorithms. In this first segment, we examine probability theory foundations, derive Bayes' Theorem, construct the Bayes Decision Classifier, analyze the Naïve Bayes independence assumption, and demonstrate conditional probability calculations through step-by-step worked examples.


3.1 Probability Theory and Bayes' Rule

Probability theory provides the mathematical framework for modeling uncertainty in machine learning. Algorithms use probability to evaluate noisy sensor inputs, handle missing attributes, and quantify prediction confidence. This section formalizes probability spaces, establishes fundamental probability rules, defines joint and marginal distributions, derives Bayes' Theorem, and surveys primary application domains.


3.1.1 Foundations of Probability Theory

Probability quantifies the likelihood that a specific event will occur during a random experiment. In machine learning, probability moves model evaluation away from rigid deterministic logic toward stochastic reasoning. A formal probability space relies on three core concepts:

  • Random Experiment: A process whose outcome cannot be predicted with certainty before it occurs (e.g., measuring a patient's blood pressure or observing an incoming email).
  • Sample Space ( Ω\OmegaΩ): The set of all possible outcomes resulting from a random experiment. For a coin toss, Ω={Heads,Tails}\Omega = \{\text{Heads}, \text{Tails}\}Ω={Heads,Tails}. For a continuous sensor, Ω=R+\Omega = \mathbb{R}^+Ω=R+.
  • Event ( EEE): A specific subset of outcomes from the sample space (E⊆ΩE \subseteq \OmegaE⊆Ω). An event occurs if the experiment produces an outcome contained within EEE.