Bayesian Networks Overview
- 50Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
- spaceFlip card
- KI knew it
- DI didn't know it
- ←Previous card
- →Next card
What are the two main components of a factor graph?
Variables and factors.
Or swipe the card
50 cards
What are the two main components of a factor graph?
Variables and factors.
What does the weight of an assignment represent in a factor graph?
The product of all factor values for that assignment.
How do factors in a factor graph encode preferences?
Each factor specifies a soft constraint or preference over the values of its variables, with higher values indicating more preferred assignments.
What is a joint distribution over random variables?
A table specifying a probability for every possible combined assignment to all variables.
How do you compute the marginal probability P(S=s) from a joint distribution P(S,R)?
P(S=s)=∑rP(S=s,R=r)
What is conditioning in probability?
Restricting to rows where evidence variables take observed values, then renormalizing so the probabilities sum to 1.
Write the formula for conditional probability P(S∣R=r).
P(S∣R=r)=P(R=r)P(S,R=r)
What is a Bayesian network?
A directed acyclic graph where each node is a random variable and each node has a local conditional probability distribution P(node∣parents).
How is the joint distribution defined from a Bayesian network?
P(X1,X2,…,Xn)=∏i=1nP(Xi∣Parents(Xi))
How does a Bayesian network differ from a general factor graph?
In a BN, each factor is a conditional probability distribution that sums to 1 over the child variable for every parent assignment.
What property must a local conditional distribution satisfy?
For every assignment to parents, the sum over all values of the child variable must equal 1.
What does the principle 'specify locally, optimize globally' mean in Bayesian networks?
Local conditional distributions define preferences for each variable, but the joint distribution captures global relationships; inference then finds globally consistent probabilities.
What is the first step in constructing a Bayesian network?
Define the variables of interest.
What is the second step in constructing a Bayesian network?
Draw directed edges representing direct influences (causality) to form a directed acyclic graph (DAG).
What is the third step in constructing a Bayesian network?
Define local conditional distributions for each variable given its parents: P(Xi∣Parents(Xi)).
What is the fourth step in constructing a Bayesian network?
The joint distribution is the product of all local conditional distributions.
In the alarm network, what are the variables and edges?
Variables: Burglary (B), Earthquake (E), Alarm (A). Edges: B → A, E → A.
What are the local conditional distributions in the alarm network?
P(B), P(E) (both Bernoulli with small ε), and P(A∣B,E) (deterministic OR with noise).
In the alarm network with ε=0.05, what is P(B=1)?
0.05
In the alarm network, compute P(B=1∣A=1) using ε=0.05.
0.51
In the alarm network, compute P(B=1∣A=1,E=1) with ε=0.05.
0.05
What phenomenon does the alarm network illustrate?
Explaining away: when two causes independently influence a common effect, conditioning on the effect makes the causes negatively correlated.
In the cold/allergies network, what are the variables and edges?
Variables: Cold (C), Allergies (A), Cough (H), Itchy eyes (I). Edges: C → H, A → H, A → I.
What are the local conditional distributions in the cold/allergies network?
P(C), P(A), P(H∣C,A), P(I∣A).
If you observe cough and itchy eyes, which disease is more likely in the cold/allergies network given prior probabilities P(C)=0.1, P(A)=0.2?
Allergies is more likely (0.2 > 0.1).
Define explaining away.
When two causes independently influence a common effect, observing the effect makes the causes negatively correlated: learning one cause reduces the probability of the other.
Why does P(B∣A=1,E=1) return to the prior probability in the alarm network?
Because the earthquake explains the alarm, so burglary is no longer more likely; it reverts to its prior.
What happens when you marginalize out a leaf node in a Bayesian network?
You simply remove the node and its incoming edges from the graph; the joint distribution remains consistent.
What does consistency of local conditionals mean?
The local conditional P(Xi∣Parents(Xi)) defined in the BN equals the conditional probability derived from the full joint distribution.
In a factor graph derived from a BN, can you drop the factor of a marginalized leaf node?
No, because factor graphs treat factors as arbitrary non-negative functions; you must keep it unless you know it sums to 1.
What is a probabilistic program?
A program with random assignments that defines a distribution over its variables; each run produces a sample from that distribution.
Write a probabilistic program for the alarm network (ignoring noise).
B ~ Bernoulli(ε); E ~ Bernoulli(ε); A = B OR E.
Write a probabilistic program for a Markov model over words.
For i = 1 to n: xi∼P(xi∣xi−1).
What is a Hidden Markov Model (HMM)?
A generative model where hidden states ht evolve via Markov dynamics and generate observations et at each time step.
What is the typical inference task in an HMM?
Given observations e1:T, infer the sequence of hidden states h1:T.
What is Naive Bayes?
A generative model where you first sample a label y, then independently sample each word wi given the label.
What is Latent Dirichlet Allocation (LDA)?
A generative model for documents: first sample a distribution over topics θ, then for each word, sample a topic z and then a word w from that topic.
What is a stochastic block model?
A model for social networks where each node has a latent type, and edges between nodes are generated based on the types of the pair.
What is the typical structure of generative models in probabilistic programs?
Latent variables H generate observed variables E (often with additional structure).
What is the first step in the 5-step inference procedure for Bayesian networks?
Marginalize out (remove) all non-ancestors of the query variables and evidence variables.
What is the second step in the inference procedure?
Convert the remaining BN to a factor graph: one factor per variable, with edges connecting the variable to its parents (moralization).
What is the third step in the inference procedure?
Condition on evidence: remove evidence variable nodes and partially evaluate factors that involve them, setting the variable to its observed value.
What is the fourth step in the inference procedure?
Marginalize out (remove) any disconnected components (variables that do not affect the query).
What is the fifth step in the inference procedure?
Perform variable elimination: sum over remaining non-query variables by multiplying all factors involving that variable and summing over its values, creating a new factor.
In variable elimination for probabilistic inference, what operation replaces the max used in max-product?
Sum (marginalization) replaces the max.
How do you compute the new factor when marginalizing out a variable X in variable elimination?
fnew(remaining vars)=∑x∏factors involving Xfi(…,x,…)
What does it mean to write P(query∣evidence)∝expression?
It means the expression equals the desired conditional probability up to a multiplicative constant (the normalizing constant).
Why can we remove non-ancestors of query and evidence in inference?
Because they are d-separated from the query given the ancestors; they are independent of the query given the evidence.
What is moralization when converting a BN to a factor graph?
Adding edges between all parents of a child (marrying parents) so that the factor for that child includes all parents.
In the alarm network, how do you compute P(B∣A=1) using the 5-step procedure?
Step 1: No non-ancestors to remove. Step 2: Convert to factor graph with factors P(B), P(E), P(A∣B,E). Step 3: Condition on A=1 — remove A and set factor to P(A=1∣B,E). Step 4: No disconnected components. Step 5: Marginalize out E: sum over E of P(E)⋅P(A=1∣B,E), then normalize.

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