Example
Suppose there is a mixed school having 60% boys and 40% girls as students. The girl students wear trousers or skirts in equal numbers; the boys all wear trousers. An observer sees a (random) student from a distance; all the observer can see is that this student is wearing trousers. What is the probability this student is a girl? The correct answer can be computed using Bayes' theorem.
The event G is that the student observed is a girl, and the event T is that the student observed is wearing trousers. To compute P(G|T), we first need to know:
- P(G), or the probability that the student is a girl regardless of any other information. Since the observer sees a random student, meaning that all students have the same probability of being observed, and the percentage of girls among the students is 40%, this probability equals 0.4.
- P(G'), or the probability that the student is not a girl (i.e., a boy) regardless of any other information (G' is the complementary event to G). This is 60%, or 0.6.
- P(T|G), or the probability of the student wearing trousers given that the student is a girl. As they are as likely to wear skirts as trousers, this is 0.5.
- P(T|G'), or the probability of the student wearing trousers given that the student is a boy. This is given as 1.
- P(T), or the probability of a (randomly selected) student wearing trousers regardless of any other information. Since P(T) = P(T|G)P(G) + P(T|B)P(B) (via the law of total probability), this is 0.5×0.4 + 1×0.6 = 0.8.
Given all this information, the probability of the observer having spotted a girl given that the observed student is wearing trousers can be computed by substituting these values in the formula:
Read more about this topic: Posterior Probability
Famous quotes containing the word example:
“Our intellect is not the most subtle, the most powerful, the most appropriate, instrument for revealing the truth. It is life that, little by little, example by example, permits us to see that what is most important to our heart, or to our mind, is learned not by reasoning but through other agencies. Then it is that the intellect, observing their superiority, abdicates its control to them upon reasoned grounds and agrees to become their collaborator and lackey.”
—Marcel Proust (18711922)