Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2017-04-17 03:12:15

bossk171
Member
Registered: 2007-07-16
Posts: 305

Conditional Probabilty Question

From a precalculus text:

There are two precalculus sections at West High School. Mr. Abel's class has 12 girls and 8 boys, while Br. Bonitz's class has 10 girls and 15 boys. If a West High precalculus student chosen at random happens to be a girl, what is the probability she is from Mr. Abel's class?

This problems also comes with the hint: The answer is not 12/22. The answer in the book is 3/5. I'm lost.

Here's my (presumably wrong) logic.

Let E = The student is a girl
and F = The student is in Mr. Abel's class

Then, P(F|E) = P(E and F)/P(E) = (12/45)/(22/45) = 12/22 which not only doesn't match the book's answer, but also directly contradicts the hint the book gives.

What am I not seeing?

Thank You

Last edited by bossk171 (2017-04-17 03:34:44)


There are 10 types of people in the world, those who understand binary, those who don't, and those who can use induction.

Offline

#2 2017-04-17 23:15:43

Bob
Administrator
Registered: 2010-06-20
Posts: 10,053

Re: Conditional Probabilty Question

hi bossk171

I agree with you.  I used a probability tree and arrived at the same as you did using Bayes.

The ultimate test of a probability is to run a simulation.  I used BBC BASIC because it's fairly easy to follow the code.

   10 DIM A$(45)
   20 FOR i = 1 TO 45
   30   READ A$(i)
   40 NEXT i
   50 countG = 0:countA = 0
   60 FOR j = 1 TO 10000000
   70   p = RND(45)
   80   IF RIGHT$(A$(p),1) = "G" THEN countG = countG + 1 :IF LEFT$(A$(p),1) = "A" THEN countA = countA + 1
   90 NEXT j
  100 PRINT countA/countG
     
  999 END
1000 DATA AG,AG,AG,AG,AG,AG,AG,AG,AG,AG,AG,AG
1010 DATA AB,AB,AB,AB,AB,AB,AB,AB
1020 DATA BG,BG,BG,BG,BG,BG,BG,BG,BG,BG
1030 DATA BB,BB,BB,BB,BB,BB,BB,BB,BB,BB,BB,BB,BB,BB,BB


This sets up the 45 data items and then runs a simulation 10000000 times.  (less than a minute on my laptop)

It identifies just the girls 'found' and then whether they're in class A.

I got 0.545576.... which is a lot closer to 12/22 than to 3/5.

The only thing I can think of to explain this is that the questioner didn't mean exactly what is written in the question.  Cannot think of an alternative that will give 3/5 though. dizzy

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#3 2017-04-17 23:37:27

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Conditional Probabilty Question

This question is sort of a paradox, some people give 6 / 11 as the answer., some 12 / 22 as the answer and a horrible book gives 3 / 5.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#4 2017-04-18 05:35:53

thickhead
Member
Registered: 2016-04-16
Posts: 1,086

Re: Conditional Probabilty Question

P(G/Abel)=12/20=3/5=0.6
P(G/Bonitz)=10/25=2/5=0.4
P(Abel/G)=P(G/Abel)/{P(G/abel)+P(G/Bonitz)}=0.6/(0.6+0.4)=0.6
This is established rule.


{1}Vasudhaiva Kutumakam.{The whole Universe is a family.}
(2)Yatra naaryasthu poojyanthe Ramanthe tatra Devataha
{Gods rejoice at those places where ladies are respected.}

Offline

#5 2017-04-19 04:20:07

bossk171
Member
Registered: 2007-07-16
Posts: 305

Re: Conditional Probabilty Question

Thanks! Shortly after posting this I wrote a Python script to confirm my suspicions.

import random

students = []
# Mr. A's Class
for i in range(20):
    if i < 12:
        students.append('AF')
    else:
        students.append('AM')

# Mr. B's Class
for i in range(25):
    if i < 15:
        students.append('BM')
    else:
        students.append('BF')


for s in ['AM', 'AF', 'BM', 'BF']:
    print '%s: %s' % (s, students.count(s))


abel_count = girl_count = 0.0

for i in range(1000000):
    student = random.choice(students)

    if student[1] == 'F': # If a student is a girl...
        girl_count += 1

        if student[0] == 'A': # If that student is in Mr. A's class...
            abel_count += 1

print abel_count/girl_count

There are 10 types of people in the world, those who understand binary, those who don't, and those who can use induction.

Offline

#6 2017-04-19 06:40:27

Bob
Administrator
Registered: 2010-06-20
Posts: 10,053

Re: Conditional Probabilty Question

hi bossk171

And what was the final result?

I'm still thinking about thickhead's post.  I feel he is correct but I don't yet understand fully why this is so.

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#7 2017-04-22 11:12:59

Bob
Administrator
Registered: 2010-06-20
Posts: 10,053

Re: Conditional Probabilty Question

The correct formula is

If we assume that P(A) = P(B) then this reduces to thickhead's formula and the result 3/5 follows.

But the question does not say that a class is chosen first with equal probability.

If a West High precalculus student chosen at random

The classes are unequal so P(A) is not equal to P(B).

The correct calculation is

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#8 2017-04-22 19:10:29

thickhead
Member
Registered: 2016-04-16
Posts: 1,086

Re: Conditional Probabilty Question

bob bundy wrote:

The correct formula is

If we assume that P(A) = P(B) then this reduces to thickhead's formula and the result 3/5 follows.

But the question does not say that a class is chosen first with equal probability.

If a West High precalculus student chosen at random

The classes are unequal so P(A) is not equal to P(B).

The correct calculation is

Bob

Just for fun let us change number of boys in each class.
Abel' class  boys=20  girls=12  total 32
Bonitz's class   boys=25  girls=10  total 35


{1}Vasudhaiva Kutumakam.{The whole Universe is a family.}
(2)Yatra naaryasthu poojyanthe Ramanthe tatra Devataha
{Gods rejoice at those places where ladies are respected.}

Offline

#9 2017-04-22 19:19:30

Bob
Administrator
Registered: 2010-06-20
Posts: 10,053

Re: Conditional Probabilty Question

hi thickhead

Agreed!

Please don't misunderstand me.  I found your earlier post very helpful.  I couldn't see where 3/5 came from until then.  The difficulty lies with the wording of the question.  If it said " A class is chosen at random, and then a student within that class is chosen at random",  then I would be happy with 3/5 as an answer.

But the question only says a student is chosen at random, so that makes each of the 45 students equally likely to be picked.  Knowing a girl has been picked further reduces us to 22 of the students.  The number of boys becomes irrelevant.

When exam questions are made in the UK, the paper is then checked by someone else independently, in order to try to avoid this sort of thing.  I wonder which book this came from?

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#10 2023-05-05 03:34:29

cpei1
Novice
Registered: 2023-05-05
Posts: 1

Re: Conditional Probabilty Question

I can think of two different situations:
1) I close my eyes and choose a class at random and go in the class and pick a student and came back to my office.  I found the student is a girl student.
    what is the probability she is from Abel's class ---- answer= 3/5
2) All the students from two classes are mixed up in the playground.  I close my eyes and pick a student.  when i opened the eyes it was a girl student.
    what is the probability she is from Abel's class --- answer=12/22

Offline

#11 2023-05-30 14:47:05

Fruityloop
Member
Registered: 2009-05-18
Posts: 143

Re: Conditional Probabilty Question


Offline

Board footer

Powered by FluxBB