Repeat the problem in Example 2.22 when allergic reactions occur only in diets:

  1. Containing either tomatoes and corn or chocolate and peanuts

There are \(2^2\) diets containing tomatoes and corn and also \(2^2\) diets containing chocolate and peanuts. They have overlap in one case only, i.e. when the diet contains all four ingredients. The final probability is thus \(\frac{2^2 + 2^2 - 1}{2^4} = \frac{7}{16}\).

  1. Containing either tomatoes or all three other foods

There are \(2^3\) diets containing tomatoes and \(2\) diets containing three other foods. The overlap is a single diet containing tomatoes and the three other foods so the total probability is \(\frac{2^3 + 2 - 1}{2^4} = \frac{9}{16}\).