Bayesian Networks Overview
- 28Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
What does a factor graph consist of?
What does a factor graph consist of?
28 questions
- 1
What does a factor graph consist of?
- A
Variables and factors that depend on subsets of variables
- B
Nodes representing events and edges representing conditional probabilities
- C
A set of random variables with a joint probability distribution
- D
Only variables connected by directed edges
Correct answer
AVariables and factors that depend on subsets of variables
Explanation
Factor graphs consist of a set of variables and a set of factors, where each factor depends on a certain subset of the variables.
- A
- 2
How is the weight of an assignment defined in a factor graph?
- A
The product of all factor values
- B
The sum of all factor values
- C
The maximum of the factor values
- D
The average of the factor values
Correct answer
AThe product of all factor values
Explanation
The weight of an assignment is the product of all the factors.
- A
- 3
In object tracking with factor graphs, what do transition factors capture?
- A
The influence of the environment on the object's movement
- B
The relationship between sensor readings and object location
- C
The probability of the object being at a specific location
- D
The idea that the object should remain close across successive time steps
Correct answer
DThe idea that the object should remain close across successive time steps
Explanation
Transition factors capture the intuition that across two successive time steps, the object shouldn't teleport and must remain close.
- A
- 4
What do observation factors represent in object tracking?
- A
The probability distribution of the object's initial location
- B
The constraint that the object must be exactly at the sensor reading
- C
The incorporation of sensor information, encouraging the position to be similar to the reading
- D
The transition of the object between time steps
Correct answer
CThe incorporation of sensor information, encouraging the position to be similar to the reading
Explanation
Observation factors incorporate information from sensors; they encourage the position to be similar to the sensor reading, but since sensor readings are noisy, they are soft constraints.
- A
- 5
What is a joint distribution over random variables?
- A
A table that specifies the probability of each possible assignment to all variables
- B
A function that maps assignments to non-negative numbers that sum to 1 for each variable
- C
The sum of probabilities of a subset of assignments
- D
The distribution of one variable given another
Correct answer
AA table that specifies the probability of each possible assignment to all variables
Explanation
A joint distribution is a table that gives a probability for every possible assignment to all the variables.
- A
- 6
How is a marginal distribution obtained from a joint distribution?
- A
By taking the product of conditional probabilities
- B
By selecting rows matching a condition and normalizing
- C
By summing over all rows that match a particular value of the variable of interest
- D
By ignoring all variables except the query variables and multiplying their probabilities
Correct answer
CBy summing over all rows that match a particular value of the variable of interest
Explanation
To obtain a marginal distribution over a subset of variables, you sum the probabilities over all assignments of the other variables (marginalizing them out).
- A
- 7
What is the correct method to compute a conditional distribution from a joint distribution?
- A
Take the product of the joint and the marginal of the evidence
- B
Multiply the joint probabilities by the evidence probability
- C
Sum over all rows and then divide by the number of rows
- D
Select all rows matching the evidence and normalize by dividing by the sum of those probabilities
Correct answer
DSelect all rows matching the evidence and normalize by dividing by the sum of those probabilities
Explanation
To compute P(S | R=1), you select all rows where R=1, sum their probabilities to get the normalizing constant, and then divide each probability by that constant.
- A
- 8
What is the primary challenge in working with a joint distribution for a large number of variables?
- A
The joint distribution cannot be used for conditioning
- B
The joint distribution is not unique for a given set of variables
- C
The joint distribution is always unknown and must be estimated
- D
The joint distribution requires storing an exponential number of entries
Correct answer
DThe joint distribution requires storing an exponential number of entries
Explanation
If there are N variables each with two values, the joint distribution table has 2^N rows, which becomes huge for large N.
- A
- 9
What is a Bayesian network?
- A
A directed acyclic graph where each node has a conditional probability table given its parents, defining a joint distribution
- B
An undirected graph that represents conditional independence relationships
- C
A factor graph where all factors are probabilities
- D
A set of random variables with a single joint probability table
Correct answer
AA directed acyclic graph where each node has a conditional probability table given its parents, defining a joint distribution
Explanation
A Bayesian network is a directed acyclic graph (DAG) over variables, and it defines a joint distribution as the product of local conditional distributions, one for each node given its parents.
- A
- 10
In a Bayesian network, how is the joint distribution defined?
- A
As the product of pairwise potentials between connected variables
- B
As the sum of all local conditional distributions
- C
As the maximum of local conditional probabilities
- D
As the product of local conditional distributions for each variable given its parents
Correct answer
DAs the product of local conditional distributions for each variable given its parents
Explanation
The joint distribution is defined as the product over all nodes of P(X_i | Parents(X_i)).
- A
- 11
What is the correct order of steps to build a Bayesian network for a given scenario?
- A
Define variables, draw edges based on causality, define local conditional distributions, then define the joint distribution
- B
Define the joint distribution, then extract local conditionals, then draw edges
- C
Define local conditional distributions, then define variables, then draw edges
- D
Draw edges, define joint distribution, then define variables
Correct answer
ADefine variables, draw edges based on causality, define local conditional distributions, then define the joint distribution
Explanation
The steps are: 1) define variables, 2) draw edges (causal influences), 3) define local conditional distributions, 4) define the joint distribution as the product.
- A
- 12
In the alarm network (Burglary, Earthquake, Alarm), which variables are parents of Alarm?
- A
No parents
- B
Only Earthquake
- C
Burglary and Earthquake
- D
Only Burglary
Correct answer
CBurglary and Earthquake
Explanation
Alarm is influenced by both Burglary and Earthquake, so its parents are Burglary and Earthquake.
- A
- 13
What is the joint distribution for the alarm network?
- A
P(B|E) P(E) P(A|B)
- B
P(B) P(E) P(A|B,E)
- C
P(A) P(B|A) P(E|A)
- D
P(B) P(E) P(A)
Correct answer
BP(B) P(E) P(A|B,E)
Explanation
The joint distribution is the product of local conditionals: P(B) P(E) P(A | B, E).
- A
- 14
In the alarm network, what is the effect of conditioning on the alarm (A=1) on the independence between Burglary and Earthquake?
- A
Earthquake becomes dependent on Burglary but not vice versa
- B
They become independent of each other
- C
They become conditionally dependent given A
- D
They remain independent
Correct answer
CThey become conditionally dependent given A
Explanation
Although B and E are marginally independent, conditioning on the common effect A makes them dependent. This is known as explaining away.
- A
- 15
What is 'explaining away' in the context of Bayesian networks?
- A
When two causes are independent, but conditioning on their effect makes them dependent, and observing one cause reduces the probability of the other
- B
When observing an effect increases the probability of all its causes equally
- C
When a variable is removed from the network by marginalization
- D
When two effects of a common cause become dependent given the cause
Correct answer
AWhen two causes are independent, but conditioning on their effect makes them dependent, and observing one cause reduces the probability of the other
Explanation
Explaining away occurs when two independent causes of a common effect become dependent given the effect; knowing one cause is true reduces the probability of the other.
- A
- 16
In the alarm network, if P(B)=0.05, P(E)=0.05, and the alarm is perfectly reliable, what is P(B=1 | A=1) approximately? (Assume epsilon=0.05)
- A
0.25
- B
0.51
- C
0.95
- D
0.05
Correct answer
B0.51
Explanation
With the given values, P(B=1|A=1) = 1/(2 - ε) ≈ 1/1.95 ≈ 0.5128, approximately 0.51.
- A
- 17
What does the consistency of local conditionals property state?
- A
The joint distribution can be simplified by removing leaf nodes
- B
All local conditional distributions must sum to 1 over the child variable
- C
The graph must be acyclic
- D
The local conditional distribution P(X_i | Parents) is equal to the conditional distribution derived from the joint distribution
Correct answer
DThe local conditional distribution P(X_i | Parents) is equal to the conditional distribution derived from the joint distribution
Explanation
This property ensures that the conditional distribution obtained from the joint distribution (by probabilistic inference) matches the local conditional distribution defined in the network.
- A
- 18
When marginalizing a leaf node in a Bayesian network, what happens to the graph?
- A
The graph remains the same but with new conditional probabilities
- B
The leaf node and its incoming edges are removed
- C
The leaf node is removed but its factors remain
- D
All nodes become independent
Correct answer
BThe leaf node and its incoming edges are removed
Explanation
Marginalizing a leaf node yields a Bayesian network without that node; it can be graphically removed along with its incoming edges because its factor sums to 1.
- A
- 19
In the allergy-cold example, what are the parents of Cough?
- A
Only Cold
- B
Cold and Allergies
- C
Only Allergies
- D
Itchy Eyes
Correct answer
BCold and Allergies
Explanation
Cough depends on both Cold and Allergies; thus its parents are Cold and Allergies.
- A
- 20
What does a probabilistic program provide?
- A
A deterministic algorithm to compute probabilities exactly
- B
A way to avoid using probability tables
- C
An alternative way to specify a Bayesian network by describing how to generate samples from the joint distribution
- D
A method to learn the structure of a Bayesian network
Correct answer
CAn alternative way to specify a Bayesian network by describing how to generate samples from the joint distribution
Explanation
A probabilistic program is a program with randomness that defines a distribution over assignments; it is another way to represent a Bayesian network.
- A
- 21
In the probabilistic program for object tracking with a Markov model, how is the next location generated?
- A
By selecting from a fixed set of coordinates
- B
From a conditional distribution depending on the previous location
- C
From a Bernoulli distribution with parameter alpha
- D
By adding a random offset to the previous location
Correct answer
BFrom a conditional distribution depending on the previous location
Explanation
The program states: with probability α, X_i = X_{i-1} + (1,0); with probability 1-α, X_i = X_{i-1} + (0,1). So it depends on the previous location.
- A
- 22
What is a Hidden Markov Model (HMM)?
- A
A model where hidden states follow a Markov chain and observations depend on the current hidden state
- B
A model where observations influence hidden states directly
- C
A model with no hidden variables
- D
A model where both states and observations are independent
Correct answer
AA model where hidden states follow a Markov chain and observations depend on the current hidden state
Explanation
An HMM has a sequence of hidden states H_t that follow a Markov chain, and at each time step, an observation E_t is generated from H_t.
- A
- 23
In Naive Bayes, what is generated first?
- A
A topic distribution, then words
- B
The class label, then words given the label
- C
Words, then the class label given the words
- D
Both words and label simultaneously
Correct answer
BThe class label, then words given the label
Explanation
In Naive Bayes, first a label Y is generated, then for each word, a word is generated given that label.
- A
- 24
What is the typical structure of a Bayesian network for data generation?
- A
All variables are observed
- B
Hidden variables H generate observed variables E
- C
Variables are arranged in a chain with no hidden ones
- D
Observed variables E generate hidden variables H
Correct answer
BHidden variables H generate observed variables E
Explanation
The common pattern is that hidden variables (the quantities of interest) generate the observed data (sensor readings, symptoms, etc.).
- A
- 25
What is the first step in the five-step inference procedure for Bayesian networks?
- A
Perform sum-product computation
- B
Convert to a factor graph
- C
Marginalize out non-ancestors of the query and evidence variables
- D
Condition on the evidence
Correct answer
CMarginalize out non-ancestors of the query and evidence variables
Explanation
Step 1: Remove (marginalize) non-ancestors of the query and evidence variables to simplify the graph.
- A
- 26
After removing non-ancestors and converting to a factor graph, what is done next?
- A
Condition on the evidence by removing the evidence variable and setting its factor to the observed value
- B
Draw samples from the network
- C
Run variable elimination
- D
Multiply all factors together
Correct answer
ACondition on the evidence by removing the evidence variable and setting its factor to the observed value
Explanation
Step 3: Condition on evidence by removing the evidence variable from the factor graph and setting its associated factor to the observed value.
- A
- 27
What does marginalizing disconnected components achieve?
- A
It sums over all variables except the query
- B
It removes factors that are not connected to the query variable, treating them as constants
- C
It converts the factor graph into a Bayesian network
- D
It normalizes the distribution
Correct answer
BIt removes factors that are not connected to the query variable, treating them as constants
Explanation
If a part of the factor graph is disconnected from the query variables, it can be marginalized out (it just contributes a constant factor).
- A
- 28
In the sum-product algorithm for marginalization, what operation replaces the max used in maximum weight assignment?
- A
Product
- B
Minimization
- C
Summation
- D
Averaging
Correct answer
CSummation
Explanation
For probabilistic inference, we sum over the variable being marginalized (sum-product), whereas for maximum weight assignment we take the max (max-product).
- A

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