Preparation for Third Midterm

Practice Questions

  1. Compute P(fire | alarm), given the following information:
    P(alarm | fire) = A
    P(alarm | not fire) = B
    P(fire) = C
  2. We are given the following information:
    P(fire) = 0.1
    P(earthquake) = 0.2
    P(flood) = 0.4
    1. Suppose that we do not know whether fire, earthquake, and flood, are independent events. Can we compute the probability P(fire and earthquake and flood)? If yes, what is P(fire and earthquake and flood)?
    2. Suppose that we know that fire, earthquake, and flood, are independent events. Can we compute the probability P(fire and earthquake and flood)? If yes, what is P(fire and earthquake and flood)?
    3. Suppose that we know that fire, earthquake, and flood, are not independent events. Can we compute the probability P(fire and earthquake and flood)? If yes, what is P(fire and earthquake and flood)?

  3. Compute P(commute time < 20 min | temperature > 80), given the following joint probability distribution:
    Commute time 40-60 Fahrenheit 60-80 Fahrenheit above 80 Fahrenheit
    < 20 min 0.1 0.05 0.1
    20-40 min 0.2 0.1 0.1
    > 40 min 0.05 0.1 0.2
  4. For the Bayesian network shown in textbook figure 14.2: is P(Earthquake | Alarm) larger, equal to, or smaller than P(Earthquake | Alarm and Burglary)? You can either (not recommended) compute both probabilities, or (recommended) provide an intuitive (but correct) justification for your answer.

  5. For the Bayesian network shown in textbook figure 14.2: is P(Earthquake | Alarm) larger, equal to, or smaller than P(Earthquake | Alarm and MaryCalls)? You can either (not recommended) compute both probabilities, or (recommended) provide an intuitive (but correct) justification for your answer.

  6. We are building a decision tree to determine if the next car of a person will be a regular car or a minivan. We have 100 cases as examples. The following is true for those cases: What is the entropy gain of selecting the "over 35 years of age" attribute as a test for the root node of the decision tree?

  7. Given a set of training examples, is there always a decision tree that perfectly classifies all training examples in that set? If yes, prove your answer. If no, provide a counter example.

  8. There are two types of candy bags, type A and type B. Both types of bags contain an infinite number of candies. A bag of type A contains 80% chocolate candies and 20% vanilla candies. A bag of type B contains 40% chocolate candies and 60% vanilla candies. The prior probability P(A) of having a bag of type A is 0.99, and the prior probability P(B) of having a bag of type B is 0.01. What is the posterior probability that we have a bag of type A if the first candy that we pick is a vanilla candy?

  9. Textbook exercise 11.2 (second edition), exercise 10.2 (third edition).

  10. Textbook figure 10.3 in 3nd edition (figure 11.4 in 2nd edition) provides a description for a deterministic version of the blocks world. We want to make a modification to that description, so as to model a nondeterministic version, in which the effect of action move(b, x, y) is sometimes on(b, y) and sometimes on(b, table). How would you modify the description of the move action to make it reflect the above two possible outcomes of move(b, x, y)?

  11. In the nondeterministic blocks world described in the previous exercise, suppose that the initial state and the goal are as as follows:
    Initial state:
    On(A, Table) and On(B, Table) and On(C, Table) and Block(A)
    and Block(B) and Block(C) and Clear(A) and Clear(B) and Clear(C)

    Goal:
    On(A, B) and On(B, C)
    Is there a conditional plan that achieves this goal with guaranteed success? If yes, list the sequence of actions in that plan. If no, explain why not.