Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Posterior probability
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Example== Suppose there is a school with 60% boys and 40% girls as students. The girls wear trousers or skirts in equal numbers; all boys 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 {{mvar|G}} is that the student observed is a girl, and the event {{mvar|T}} is that the student observed is wearing trousers. To compute the posterior probability <math>P(G|T)</math>, we first need to know: * <math>P(G)</math>, 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. * <math>P(B)</math>, or the probability that the student is not a girl (i.e. a boy) regardless of any other information ({{mvar|B}} is the complementary event to {{mvar|G}}). This is 60%, or 0.6. * <math>P(T|G)</math>, 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. * <math>P(T|B)</math>, or the probability of the student wearing trousers given that the student is a boy. This is given as 1. * <math>P(T)</math>, or the probability of a (randomly selected) student wearing trousers regardless of any other information. Since <math>P(T) = P(T|G)P(G) + P(T|B)P(B)</math> (via the [[law of total probability]]), this is <math>P(T)= 0.5 \times 0.4 + 1 \times 0.6 = 0.8</math>. Given all this information, the '''posterior 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: :<math>P(G|T) = \frac{P(T|G) P(G)}{P(T)} = \frac{0.5 \times 0.4}{0.8} = 0.25.</math> An intuitive way to solve this is to assume the school has ''N'' students. Number of boys = 0.6''N'' and number of girls = 0.4''N''. If ''N'' is sufficiently large, total number of trouser wearers = 0.6''N'' + 50% of 0.4''N''. And number of girl trouser wearers = 50% of 0.4''N''. Therefore, in the population of trousers, girls are (50% of 0.4''N'')/(0.6''N'' + 50% of 0.4''N'') = 25%. In other words, if you separated out the group of trouser wearers, a quarter of that group will be girls. Therefore, if you see trousers, the most you can deduce is that you are looking at a single sample from a subset of students where 25% are girls. And by definition, chance of this random student being a girl is 25%. Every Bayes-theorem problem can be solved in this way.<ref>{{Cite web |title=Bayes' theorem - C o r T e x T |url=https://sites.google.com/site/artificialcortext/others/mathematics/bayes-theorem |access-date=2022-08-18 |website=sites.google.com}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)