Reasoning under uncertainty
गेट DA210 मिनट में पढ़ें
Probability as a model of belief
Definition. When an agent cannot be certain, it assigns probabilities to the possible states of the world. A joint distribution gives a probability to every combination of values; from it, any question can be answered:
- Marginalisation (summing out): .
- Conditioning: .
- Product rule: , and the chain rule .
- Bayes' rule: .
The full joint table over Boolean variables has entries, which is too many. Independence assumptions make the model small.
Independence and conditional independence
- and are independent if , equivalently .
- and are conditionally independent given if , equivalently : once is known, tells us nothing more about .
Exam point. Neither implies the other. Two symptoms of the same disease are usually dependent, but conditionally independent given the disease. Two independent causes of one effect become dependent once the effect is observed ("explaining away").
Bayesian networks
Definition. A Bayesian network is a directed acyclic graph: one node per random variable, an edge meaning directly influences , and for each node a conditional probability table (CPT) . The joint distribution factorises as
Size. A Boolean node with Boolean parents needs independent numbers (one per parent combination). A network is usually far smaller than the numbers of the full joint.
Reading independence from the graph. Each node is conditionally independent of its non-descendants given its parents. For a path through a middle node :
- Chain : and are dependent, but independent given .
- Fork : dependent, but independent given .
- Collider : and are independent, but become dependent given (or given any descendant of ).
This is d-separation: two nodes are conditionally independent given evidence if every path between them is blocked.
Solved examples
Example 1: number of parameters. Network: , , all Boolean. and have no parents: 1 number each. has 2 parents: . has 1 parent: 2. Total 8, against for the full joint.
Example 2: a joint probability. Rain → WetGrass , with , , . Then
Exact inference: variable elimination
Goal. Compute . The naive way sums the full joint over all hidden variables: exponential work.
Variable elimination writes the query as a sum of products of CPTs and pushes each sum inside as far as it goes, so it is computed once and reused:
- Fix the evidence values in the CPTs.
- Choose an order for the hidden variables.
- For each hidden variable : multiply all factors that mention , then sum out, giving a new factor.
- Multiply the remaining factors and normalise.
The cost depends on the size of the largest factor created, which depends on the elimination order. On a polytree (no undirected cycles) inference is linear in the size of the network; in general it is NP-hard.
Solved example
Example 3. Chain with , , , , . Find .
- Eliminate : , so .
- Eliminate : .
. Summing out first left a small factor over alone, instead of a table over all of .
Approximate inference by sampling
When exact inference is too costly, estimate probabilities from random samples drawn from the network.
- Prior (forward) sampling: sample each variable in topological order from its CPT given the sampled parents. The fraction of samples with estimates .
- Rejection sampling: generate prior samples and discard those that disagree with the evidence; estimate the query from the rest. Correct, but wasteful when the evidence is unlikely (most samples are rejected).
- Likelihood weighting: fix the evidence variables to their observed values and sample only the others; weight each sample by the product of over the evidence variables. No samples are wasted.
- Gibbs sampling (MCMC): start from any state consistent with the evidence and repeatedly resample one non-evidence variable given its Markov blanket; after a burn-in period the states are samples from the posterior.
All of these become exact as the number of samples grows (they are consistent estimators).
Example 4: a likelihood weight. In Example 2 with evidence : a sample with gets weight ; one with gets .
Working with a joint table
Example 5. Weather is Sunny or Rain, and Traffic is Heavy or Light. The joint distribution is:
| Heavy | Light | |
|---|---|---|
| Sunny | 0.2 | 0.4 |
| Rain | 0.3 | 0.1 |
- Marginals: and .
- Conditional: .
- Independence? , but . Dependent: rain makes heavy traffic more likely.
- Normalisation trick: , where . We can compute the unnormalised numbers first and scale them so they sum to 1. The value is never needed separately.
Bayes' rule in more depth
Odds form. Posterior odds = prior odds × likelihood ratio:
आपने इस नोट का मुफ़्त 29% हिस्सा पढ़ लिया
आगे पढ़ने के लिए Google से साइन इन करें। यह मुफ़्त है, एक टैप में होता है, और साथ में मिलता है:
- इस नोट से 10 अभ्यास सवाल
- हर नोट पूरा, साथ में PDF लाइब्रेरी
- आधिकारिक पिछले पेपर समय-सीमा वाले टेस्ट की तरह, व्याख्या के साथ
- डाउट के लिए AI ट्यूटर, हिंदी या अंग्रेज़ी में
- आपकी प्रगति, गलतियाँ और स्टडी प्लान हर डिवाइस पर सेव