# Thread: Bayes rule solution check

1. ## Bayes rule solution check

A population of voters contains 40% Republicans and 60% Democrats. It is reported that 30% of the Republicans and 70% of the Democrats favor an election issue. A person chosen at random from this population is found to favor the issue in question. Find the conditional probability that this person is a Democrat.

Here is what I did.

Let P(r) person chosen is a republicant = 0.4
Let P(d) person chosen is a democrat = 0.6
P(a|r) person supports issue given he\she is republicant = 0.3
P(a|d) person supports issue given he\she is democrat = 0.7

Event of interest = P(d|a) (person is a democrat given he\she supports the issue)

Bayes' formula P(d|a) = P(a and d) / P(a)

where I found p(a)= 0.3*0.4 + 0.7*0.6 = 0.54

hence P(d|a) = 0.7*0.6 / 0.54 = 0.7777 which is about 78%

Does this sound like a right way to solve this problem or I am doing something wrong here?

Thank You

2. Originally Posted by somestudent2
A population of voters contains 40% Republicans and 60% Democrats. It is reported that 30% of the Republicans and 70% of the Democrats favor an election issue. A person chosen at random from this population is found to favor the issue in question. Find the conditional probability that this person is a Democrat.

Here is what I did.

Let P(r) person chosen is a republicant = 0.4
Let P(d) person chosen is a democrat = 0.6
P(a|r) person supports issue given he\she is republicant = 0.3
P(a|d) person supports issue given he\she is democrat = 0.7
Let 'e' stand for favoring the election issue.

Then (your question sound a little ambigous to me, but I think you mean this),
$P(d|a) = \frac{P(a|d)P(d)}{P(a|r)P(r)+P(a|d)P(d)}$
Now fill in those values.
$P(d) = P(r) = 1/2$.
While, $P(a|r) = .3$ and $P(a|d) = .7$

3. Hi, thanks for your quick response. I have a question. How did you get P(d)=P(r) = 1/2. I thought we are given that there are 40% Republicans so P(r)=0.4 and 60% Democrats so P(d)=0.6 ?

Thanks again.

4. Originally Posted by somestudent2
Hi, thanks for your quick response. I have a question. How did you get P(d)=P(r) = 1/2. I thought we are given that there are 40% Republicans so P(r)=0.4 and 60% Democrats so P(d)=0.6 ?
You are correct. The other is mistake made in haste I am sure.

5. Originally Posted by somestudent2
Hi, thanks for your quick response. I have a question. How did you get P(d)=P(r) = 1/2. I thought we are given that there are 40% Republicans so P(r)=0.4 and 60% Democrats so P(d)=0.6 ?

Thanks again.
Yes I made a mistake. When you said "at random" I was thinking 50/50 type random. But the problem says otherwise.