1. Home
  2. Explore
  3. Computer Science
  4. Bayesian Networks Overview

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Bayesian Networks Overview

  • 28Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Factor Graphs and Probabilistic Models

What does a factor graph consist of?

28 questions

  1. 1

    What does a factor graph consist of?

    1. A

      Variables and factors that depend on subsets of variables

    2. B

      Nodes representing events and edges representing conditional probabilities

    3. C

      A set of random variables with a joint probability distribution

    4. D

      Only variables connected by directed edges

    Correct answer
    A

    Variables 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.

  2. 2

    How is the weight of an assignment defined in a factor graph?

    1. A

      The product of all factor values

    2. B

      The sum of all factor values

    3. C

      The maximum of the factor values

    4. D

      The average of the factor values

    Correct answer
    A

    The product of all factor values

    Explanation

    The weight of an assignment is the product of all the factors.

  3. 3

    In object tracking with factor graphs, what do transition factors capture?

    1. A

      The influence of the environment on the object's movement

    2. B

      The relationship between sensor readings and object location

    3. C

      The probability of the object being at a specific location

    4. D

      The idea that the object should remain close across successive time steps

    Correct answer
    D

    The 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.

  4. 4

    What do observation factors represent in object tracking?

    1. A

      The probability distribution of the object's initial location

    2. B

      The constraint that the object must be exactly at the sensor reading

    3. C

      The incorporation of sensor information, encouraging the position to be similar to the reading

    4. D

      The transition of the object between time steps

    Correct answer
    C

    The 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.

  5. 5

    What is a joint distribution over random variables?

    1. A

      A table that specifies the probability of each possible assignment to all variables

    2. B

      A function that maps assignments to non-negative numbers that sum to 1 for each variable

    3. C

      The sum of probabilities of a subset of assignments

    4. D

      The distribution of one variable given another

    Correct answer
    A

    A 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.

  6. 6

    How is a marginal distribution obtained from a joint distribution?

    1. A

      By taking the product of conditional probabilities

    2. B

      By selecting rows matching a condition and normalizing

    3. C

      By summing over all rows that match a particular value of the variable of interest

    4. D

      By ignoring all variables except the query variables and multiplying their probabilities

    Correct answer
    C

    By 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).

  7. 7

    What is the correct method to compute a conditional distribution from a joint distribution?

    1. A

      Take the product of the joint and the marginal of the evidence

    2. B

      Multiply the joint probabilities by the evidence probability

    3. C

      Sum over all rows and then divide by the number of rows

    4. D

      Select all rows matching the evidence and normalize by dividing by the sum of those probabilities

    Correct answer
    D

    Select 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.

  8. 8

    What is the primary challenge in working with a joint distribution for a large number of variables?

    1. A

      The joint distribution cannot be used for conditioning

    2. B

      The joint distribution is not unique for a given set of variables

    3. C

      The joint distribution is always unknown and must be estimated

    4. D

      The joint distribution requires storing an exponential number of entries

    Correct answer
    D

    The 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.

  9. 9

    What is a Bayesian network?

    1. A

      A directed acyclic graph where each node has a conditional probability table given its parents, defining a joint distribution

    2. B

      An undirected graph that represents conditional independence relationships

    3. C

      A factor graph where all factors are probabilities

    4. D

      A set of random variables with a single joint probability table

    Correct answer
    A

    A 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.

  10. 10

    In a Bayesian network, how is the joint distribution defined?

    1. A

      As the product of pairwise potentials between connected variables

    2. B

      As the sum of all local conditional distributions

    3. C

      As the maximum of local conditional probabilities

    4. D

      As the product of local conditional distributions for each variable given its parents

    Correct answer
    D

    As 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)).

  11. 11

    What is the correct order of steps to build a Bayesian network for a given scenario?

    1. A

      Define variables, draw edges based on causality, define local conditional distributions, then define the joint distribution

    2. B

      Define the joint distribution, then extract local conditionals, then draw edges

    3. C

      Define local conditional distributions, then define variables, then draw edges

    4. D

      Draw edges, define joint distribution, then define variables

    Correct answer
    A

    Define 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.

  12. 12

    In the alarm network (Burglary, Earthquake, Alarm), which variables are parents of Alarm?

    1. A

      No parents

    2. B

      Only Earthquake

    3. C

      Burglary and Earthquake

    4. D

      Only Burglary

    Correct answer
    C

    Burglary and Earthquake

    Explanation

    Alarm is influenced by both Burglary and Earthquake, so its parents are Burglary and Earthquake.

  13. 13

    What is the joint distribution for the alarm network?

    1. A

      P(B|E) P(E) P(A|B)

    2. B

      P(B) P(E) P(A|B,E)

    3. C

      P(A) P(B|A) P(E|A)

    4. D

      P(B) P(E) P(A)

    Correct answer
    B

    P(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).

  14. 14

    In the alarm network, what is the effect of conditioning on the alarm (A=1) on the independence between Burglary and Earthquake?

    1. A

      Earthquake becomes dependent on Burglary but not vice versa

    2. B

      They become independent of each other

    3. C

      They become conditionally dependent given A

    4. D

      They remain independent

    Correct answer
    C

    They 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.

  15. 15

    What is 'explaining away' in the context of Bayesian networks?

    1. A

      When two causes are independent, but conditioning on their effect makes them dependent, and observing one cause reduces the probability of the other

    2. B

      When observing an effect increases the probability of all its causes equally

    3. C

      When a variable is removed from the network by marginalization

    4. D

      When two effects of a common cause become dependent given the cause

    Correct answer
    A

    When 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.

  16. 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)

    1. A

      0.25

    2. B

      0.51

    3. C

      0.95

    4. D

      0.05

    Correct answer
    B

    0.51

    Explanation

    With the given values, P(B=1|A=1) = 1/(2 - ε) ≈ 1/1.95 ≈ 0.5128, approximately 0.51.

  17. 17

    What does the consistency of local conditionals property state?

    1. A

      The joint distribution can be simplified by removing leaf nodes

    2. B

      All local conditional distributions must sum to 1 over the child variable

    3. C

      The graph must be acyclic

    4. D

      The local conditional distribution P(X_i | Parents) is equal to the conditional distribution derived from the joint distribution

    Correct answer
    D

    The 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.

  18. 18

    When marginalizing a leaf node in a Bayesian network, what happens to the graph?

    1. A

      The graph remains the same but with new conditional probabilities

    2. B

      The leaf node and its incoming edges are removed

    3. C

      The leaf node is removed but its factors remain

    4. D

      All nodes become independent

    Correct answer
    B

    The 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.

  19. 19

    In the allergy-cold example, what are the parents of Cough?

    1. A

      Only Cold

    2. B

      Cold and Allergies

    3. C

      Only Allergies

    4. D

      Itchy Eyes

    Correct answer
    B

    Cold and Allergies

    Explanation

    Cough depends on both Cold and Allergies; thus its parents are Cold and Allergies.

  20. 20

    What does a probabilistic program provide?

    1. A

      A deterministic algorithm to compute probabilities exactly

    2. B

      A way to avoid using probability tables

    3. C

      An alternative way to specify a Bayesian network by describing how to generate samples from the joint distribution

    4. D

      A method to learn the structure of a Bayesian network

    Correct answer
    C

    An 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.

  21. 21

    In the probabilistic program for object tracking with a Markov model, how is the next location generated?

    1. A

      By selecting from a fixed set of coordinates

    2. B

      From a conditional distribution depending on the previous location

    3. C

      From a Bernoulli distribution with parameter alpha

    4. D

      By adding a random offset to the previous location

    Correct answer
    B

    From 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.

  22. 22

    What is a Hidden Markov Model (HMM)?

    1. A

      A model where hidden states follow a Markov chain and observations depend on the current hidden state

    2. B

      A model where observations influence hidden states directly

    3. C

      A model with no hidden variables

    4. D

      A model where both states and observations are independent

    Correct answer
    A

    A 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.

  23. 23

    In Naive Bayes, what is generated first?

    1. A

      A topic distribution, then words

    2. B

      The class label, then words given the label

    3. C

      Words, then the class label given the words

    4. D

      Both words and label simultaneously

    Correct answer
    B

    The 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.

  24. 24

    What is the typical structure of a Bayesian network for data generation?

    1. A

      All variables are observed

    2. B

      Hidden variables H generate observed variables E

    3. C

      Variables are arranged in a chain with no hidden ones

    4. D

      Observed variables E generate hidden variables H

    Correct answer
    B

    Hidden 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.).

  25. 25

    What is the first step in the five-step inference procedure for Bayesian networks?

    1. A

      Perform sum-product computation

    2. B

      Convert to a factor graph

    3. C

      Marginalize out non-ancestors of the query and evidence variables

    4. D

      Condition on the evidence

    Correct answer
    C

    Marginalize 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.

  26. 26

    After removing non-ancestors and converting to a factor graph, what is done next?

    1. A

      Condition on the evidence by removing the evidence variable and setting its factor to the observed value

    2. B

      Draw samples from the network

    3. C

      Run variable elimination

    4. D

      Multiply all factors together

    Correct answer
    A

    Condition 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.

  27. 27

    What does marginalizing disconnected components achieve?

    1. A

      It sums over all variables except the query

    2. B

      It removes factors that are not connected to the query variable, treating them as constants

    3. C

      It converts the factor graph into a Bayesian network

    4. D

      It normalizes the distribution

    Correct answer
    B

    It 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).

  28. 28

    In the sum-product algorithm for marginalization, what operation replaces the max used in maximum weight assignment?

    1. A

      Product

    2. B

      Minimization

    3. C

      Summation

    4. D

      Averaging

    Correct answer
    C

    Summation

    Explanation

    For probabilistic inference, we sum over the variable being marginalized (sum-product), whereas for maximum weight assignment we take the max (max-product).

Question 1 of 28
Question 1 of 28

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent