Exercise 16.6 [surprise-candy-exercise]

The Surprise Candy Company makes candy in two flavors: 75% are strawberry flavor and 25% are anchovy flavor. Each new piece of candy starts out with a round shape; as it moves along the production line, a machine randomly selects a certain percentage to be trimmed into a square; then, each piece is wrapped in a wrapper whose color is chosen randomly to be red or brown. 70% of the strawberry candies are round and 70% have a red wrapper, while 90% of the anchovy candies are square and 90% have a brown wrapper. All candies are sold individually in sealed, identical, black boxes.

Now you, the customer, have just bought a Surprise candy at the store but have not yet opened the box. Consider the three Bayes nets in Figure 3candy-figure.

1. Which network(s) can correctly represent ${\textbf{P}}(Flavor,Wrapper,Shape)$?

2. Which network is the best representation for this problem?

3. Does network (i) assert that ${\textbf{P}}(Wrapper|Shape){\textbf{P}}(Wrapper)$?

4. What is the probability that your candy has a red wrapper?

5. In the box is a round candy with a red wrapper. What is the probability that its flavor is strawberry?

6. A unwrapped strawberry candy is worth $s$ on the open market and an unwrapped anchovy candy is worth $a$. Write an expression for the value of an unopened candy box.

7. A new law prohibits trading of unwrapped candies, but it is still legal to trade wrapped candies (out of the box). Is an unopened candy box now worth more than less than, or the same as before?

Figure [3candy-figure] Three proposed Bayes nets for the Surprise Candy problem