Using Bayes Theorem to Calculate Probability of a Student Being a Geek

AI Thread Summary
The discussion centers on applying Bayes' theorem to determine the probability of a student being a geek at a school where 30% of students are girls, 4% of girls are geeks, and 2% of all geeks are girls. Participants clarify the correct application of Bayes' theorem, emphasizing the need to substitute known values into the formula to find the unknown probability. A tabular method is suggested as a helpful approach to visualize the problem, leading to the conclusion that the probability of a random student being a geek is 3/5. The conversation highlights the importance of understanding the underlying concepts of probability before relying on formulas. Ultimately, the correct application of Bayes' theorem confirms the solution.
aaaa202
Messages
1,144
Reaction score
2

Homework Statement


This problem was under applications of Bayes theorem, but I feel like I am bad at using it if that's the case:
At a school 30% of the students are girls. 4% of the girls are geeks and 2% of all geeks are girls. What is probability that a random student is a geek.


Homework Equations


Bayes theorem


The Attempt at a Solution


P(AlDI) = P(DlAI)/P(DlI) *P(AlI)
I guess I should assign the statement to A: a student is a geek
And as my data I don't know what to use. That 4% of girls are geeks?
Using Bayes theorem I found that 3/5 is the probability. Is this right and how do you arrive at it using Bayes theorem?
 
Physics news on Phys.org
aaaa202 said:

Homework Statement


This problem was under applications of Bayes theorem, but I feel like I am bad at using it if that's the case:
At a school 30% of the students are girls. 4% of the girls are geeks and 2% of all geeks are girls. What is probability that a random student is a geek.


Homework Equations


Bayes theorem


The Attempt at a Solution


P(AlDI) = P(DlAI)/P(DlI) *P(AlI)
I guess I should assign the statement to A: a student is a geek
And as my data I don't know what to use. That 4% of girls are geeks?
Using Bayes theorem I found that 3/5 is the probability. Is this right and how do you arrive at it using Bayes theorem?

I don't know where you got that equation from. Generally you have ##P(A\cap B) = P(A|B)P(B)## and ##P(A\cap B) = P(B|A)P(A)##, so ##P(A|B)P(B)=P(B|A)P(A)##. Try using that.
 
The equations are equivalent.
 
aaaa202 said:
Using Bayes theorem I found that 3/5 is the probability. Is this right and how do you arrive at it using Bayes theorem?
Wait a second. You said you used Bayes' theorem, and yet you're asking us how to use it?

Show us how you arrived at that result (it's correct, BTW) and we'll be able to tell you if you did things right, or in case you didn't, help you get past your stumbling blocks.
 
aaaa202 said:

Homework Statement


This problem was under applications of Bayes theorem, but I feel like I am bad at using it if that's the case:
At a school 30% of the students are girls. 4% of the girls are geeks and 2% of all geeks are girls. What is probability that a random student is a geek.


Homework Equations


Bayes theorem


The Attempt at a Solution


P(AlDI) = P(DlAI)/P(DlI) *P(AlI)
I guess I should assign the statement to A: a student is a geek
And as my data I don't know what to use. That 4% of girls are geeks?
Using Bayes theorem I found that 3/5 is the probability. Is this right and how do you arrive at it using Bayes theorem?

My personal recommendation would be: stay away from Bayes Theorem for a little while, until you understand the concepts and issues. At that point, Bayes results become handy shorthands that help you get answers quickly---after you know what it is you should be trying to do. In other words: understanding and intuition come first, formulas come later.

So, what is happening in this problem? An approach my students often found useful back in the Stone Age when I was still teaching is essentially a "tabular" method: image a school with a large student population---say 1000 students. How many are girls? How girls are geeks? From that, how many students altogether are geeks? Once you have figured that out, can you see how to complete the calculations?

I will just do a couple of steps to get you started: 30% of the students are girls, so N(girls) = 300. We are given that 4% of the girls are geeks, so N(Geeky girls) = 0.04*300 = 12. You are told that 2% of all geeks are girls, and you know how many girls that is; so how many geeks are there?
 
thats exactly how I did. Multiplied the number of geeky girls by 50 to get the total number of geeks. I just wanted to see how to set the problem up with Bayes theorem.
 
aaaa202 said:
I just wanted to see how to set the problem up with Bayes theorem.
The form of Bayes' theorem cited by you and by LCKurtz appear to be different, but as marcusl already said, they are equivalent. Personally, I'd go with the simpler form.

Using that simpler form, Bayes' theorem says that
P(\text{geek}|\text{girl})P(\text{girl}) = P(\text{girl}|\text{geek})P(\text{geek})The question gives values for every single one of these except for P(\text{geek}), and that one missing value is the exactly the one to be solve for. So simply substitute the known values and solve for the unknown P(\text{geek}).

For now I'll leave it up to you to translate the word problem text to the mathematical terms such as P(\text{geek}|\text{girl}).
 
I prefer to use specific numbers rather than percentages. Let's say there are 1000 students in the school. 30% of the students are girls so there are 300 girls. 4% of the girls are "geeks" so there are 12 "girl geeks". Those 12 girls are 2% of the geeks: letting N be the number of geeks, we have .02N= 12 so N= 12/.02= 600 geeks. Yes, 600/1000= 3/5.
 
That's correct, and that is equivalent to how aaaa202 solved the problem.

However, the question is listed "under applications of Bayes theorem", so presumably a solution based on Bayes' theorem is what is desired.
 
  • #10
aaaa202 said:
thats exactly how I did. Multiplied the number of geeky girls by 50 to get the total number of geeks. I just wanted to see how to set the problem up with Bayes theorem.

OK, so you used Bayes Theorem already and so have answered your own question.
 
  • #11
I just couldn't see how to write it using the notation of P(AlB) etc but now I do - thank you :)
 
Back
Top