After watching several tutorial video, I thought I finally understood the idea and tried few online quiz on Bayes theorem. I'm happy that I could solve some questions on my own but stuck with the following question :
Suppose that 5% of companies in a certain industry discriminate against Iowans. If a company discriminates, it will never hire someone from Iowa. Suppose that 20 equally-qualified applicants apply for jobs at a company in this industry, and six are from Iowa. If this company hires four people from this set of applicants, but none are from Iowa, what is the probability that this company discriminates?
I could not relate the job applicant data with probability of discriminating company. Need some pointers to approach this prob. Any help is highly appreciated!! Thanks!
Hint: Denote $D$ by the event that the company discriminates, and $E$ by the event that happened. Then $$P(D|E) = \frac{P(D)\cdot P(E|D)}{P(D)\cdot P(E|D) + P(\bar D) | P(E|\bar D)} $$
$P(E|D)=1$ as the company must only select non-Iowa people if it discriminates.
$P(E|\bar D) = \frac{14\choose 4}{20\choose 4} $ In this case, everyone is equally likely to be hired.