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?