Assume that 45% of total population is male and 55% are female
The population is classified based on feature hair as :
Male Female
Long Hair 25% 95%
Short Hair 75% 5%
Give that a person has long hair what's the probability that the person is a female
I have come up with the following solution. It seems tricky so not sure if it's correct
or there is an easier way to do it
My Solution:
Let p be the total population. then males = .45 * p and females = .55 * p
we have to find P(f|lh) = p(lh|f) * P(f)/P(lh)
P(lh|f) = .95 and P(f) = .55
P(lh) = .45 * .25 + .55 * .95
so P(f|lh) =
.95 * .55
------------------------
.45 * .25 + .55 * .95
Is that a correct way to approach this problem?