I have been working on the following homework problem:

Consider Homer and Bart's consumption of potato chips and donuts. Suppose that Marge is in the room 30% of the time that Bart is eating chips and 40% of the time that Bart is eating donuts. Similarly, suppose that Marge is in the room 30% of the time that Homer is eating chips and 40% of the time that Homer is eating donuts; thus she catches them eating each kind of snack equally often. Nonetheless, Marge is in the room 34% of the time that Bart is eating either donuts or chips, and Marge is in the room 37% of the time that Homer is eating either donuts or chips. Suppose that Homer and Bart never eat chips and donuts in the same snack--eating chips and eating donuts are mutually exclusive.

What fraction of the time that Bart eats either chips or donuts does he eat donuts?

My work:

P(M) = probability Marge is in room
P(D) = probability Bart is eating a donut
P(C) = probability Bart is eating chips

Say P(M) = P(M|C)P(C) + P(M|D)P(D), then solving for P(D) gives P(D) = [P(M)-P(M|C)(1-P(D))]/P(M|D). P(C) is unknown but I substituted it with (1-P(D)) since we know that chip-eating and donut-eating are mutually exclusive.
Plugging in .34 for P(M), .3 for P(M|C), and .4 for P(M|D), I got P(D) = 1.4 which doesn't make any sense because probability can't be more than 1. I don't know what I am doing wrong, or if I am even in the right direction.

Any guidance would help! Thanks in advance!

To solve this problem, let's start by setting up the equations using the given probabilities.

Let's define:
P(M) = probability that Marge is in the room
P(D) = probability that Bart is eating a donut
P(C) = probability that Bart is eating chips

From the information given, we can set up the following equations:

1. P(M) = P(M|C) * P(C) + P(M|D) * P(D)
This equation represents the probability that Marge is in the room.

From the problem statement, we know that P(M|C) = 0.3 (Marge is in the room 30% of the time Bart is eating chips) and P(M|D) = 0.4 (Marge is in the room 40% of the time Bart is eating donuts).

2. P(M) = 0.34
This equation represents the probability that Marge is in the room overall, which is given as 34%.

3. P(C) + P(D) = 1
This equation represents the fact that eating chips and eating donuts are mutually exclusive, meaning that Bart can only be eating one of them at a time.

Now, we need to solve for P(D), which is the fraction of the time that Bart eats either chips or donuts that he eats donuts.

Substitute equation 1 into equation 2:
0.34 = 0.3 * P(C) + 0.4 * P(D)

Next, substitute equation 3 into the modified equation 2:
0.34 = 0.3 * (1 - P(D)) + 0.4 * P(D)

Simplify and solve for P(D):
0.34 = 0.3 - 0.3 * P(D) + 0.4 * P(D)
0.34 = 0.3 + 0.1 * P(D)
0.1 * P(D) = 0.34 - 0.3
0.1 * P(D) = 0.04
P(D) = 0.04 / 0.1
P(D) = 0.4

So, the fraction of the time that Bart eats either chips or donuts that he eats donuts is 0.4 or 40%.

Make sure to double-check your calculations, as your result of 1.4 is not possible since probabilities cannot exceed 1. The correct answer should be 0.4.