LFD Book Forum

LFD Book Forum (http://book.caltech.edu/bookforum/index.php)
-   Chapter 1 - The Learning Problem (http://book.caltech.edu/bookforum/forumdisplay.php?f=108)
-   -   Problem 1.1 (http://book.caltech.edu/bookforum/showthread.php?t=4613)

Rotimi 08-22-2015 02:50 PM

Problem 1.1
 
I could not use Bayes' theorem to solve Problem 1.1 but I thought of an 'alternative' method which gave me the answer 2/3. I want to know if this method is right or not. It's as follows:

Since there are 2 black balls and 1 white ball left are choosing the first black ball, the chances that the second ball is black is 2/3 since there are 3 balls left.

Is this method right or not?

yaser 08-23-2015 11:11 PM

Re: Problem 1.1
 
Quote:

Originally Posted by Rotimi (Post 12007)
I could not use Bayes' theorem to solve Problem 1.1 but I thought of an 'alternative' method which gave me the answer 2/3. I want to know if this method is right or not. It's as follows:

Since there are 2 black balls and 1 white ball left are choosing the first black ball, the chances that the second ball is black is 2/3 since there are 3 balls left.

Is this method right or not?

This would have been right if the question had specified that we picked the second ball from all remaining balls. However, the second ball is picked only from the same bag that produced the first (black) ball, so the logic of the problem is different.

For instance, if we changed the statement of the problem to having two bags one with two black balls and one with two white balls, and you picked a bag that produced a black ball, the second ball will be black with probability 100%, notwithstanding that the total remaining balls in both bags are two white and one black.

eshmrt 09-09-2015 12:48 PM

Re: Problem 1.1
 
Can you elaborate on the hint for this problem? It seems to me that in your alternative problem you aren't using Bayes' Theorem. Wouldn't using Bays' dictate that you would say P[A|B] stands for the probability that the second ball is black assuming that the first ball is black, which in your problem would be 100% and P[B] stands for the probability that the first ball is black, which would be 50% because either the bag with two white balls or the bag with two black balls could be chosen. Therefore P[A|B]P[B] = 1/2.

I understand your result intuitively. I just don't understand how Bayes' Theorem is being applied to arrive at that result as direction by the hint in the textbook.

yaser 09-09-2015 11:20 PM

Re: Problem 1.1
 
Quote:

Originally Posted by eshmrt (Post 12032)
Can you elaborate on the hint for this problem? It seems to me that in your alternative problem you aren't using Bayes' Theorem. Wouldn't using Bays' dictate that you would say P[A|B] stands for the probability that the second ball is black assuming that the first ball is black, which in your problem would be 100% and P[B] stands for the probability that the first ball is black, which would be 50% because either the bag with two white balls or the bag with two black balls could be chosen. Therefore P[A|B]P[B] = 1/2.

I understand your result intuitively. I just don't understand how Bayes' Theorem is being applied to arrive at that result as direction by the hint in the textbook.

Your calculation is correct, but what you are calculating is the joint probability. What the problem asks for is the conditional probability. You got both right.

In the original problem, the conditional probability is not as straightforward to compute as in the simplified case here. One way to use Bayes' theorem in the original problem is to determine the joint P(A,B) for all combinations of A and B, and from that you can calculate all other probabilities including the conditional probability.

henry2015 12-07-2015 05:28 AM

Re: Problem 1.1
 
Hi professor, with your example -- having two bags one with two black balls and one with two white balls.

I thought we had:
P[first ball is black] = P[B] = 1/2
P[first ball is black and second ball is back] = P[A and B] = 1/2
P[second ball is black given first ball is back] = P[A | B]
= P[A and B] / P[B] (by Bayes' Theorem)
= 1/2 / 1/2
= 1

eshmrt said "P[A|B]P[B] = 1/2" and you said the calculation is right...so I am confused.

Maybe I miss something...

yaser 12-08-2015 02:57 AM

Re: Problem 1.1
 
Quote:

Originally Posted by henry2015 (Post 12221)
Hi professor, with your example -- having two bags one with two black balls and one with two white balls.

I thought we had:
P[first ball is black] = P[B] = 1/2
P[first ball is black and second ball is back] = P[A and B] = 1/2
P[second ball is black given first ball is back] = P[A | B]
= P[A and B] / P[B] (by Bayes' Theorem)
= 1/2 / 1/2
= 1

eshmrt said "P[A|B]P[B] = 1/2" and you said the calculation is right...so I am confused.

Maybe I miss something...

I can't see the discrepancy that is confusing you. "P[A|B]P[B] = 1/2" is correct because P[B]=1/2 and P[A|B]=1, both of which you correctly arrived at.

henry2015 12-09-2015 02:37 AM

Re: Problem 1.1
 
Argh, sorry, my bad. misread the symbol.

Thanks for confirming :)

yaser 12-09-2015 08:01 PM

Re: Problem 1.1
 
Quote:

Originally Posted by henry2015 (Post 12223)
Argh, sorry, my bad. misread the symbol.

No worries. Happens in the best families. :)


All times are GMT -7. The time now is 10:57 AM.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
The contents of this forum are to be used ONLY by readers of the Learning From Data book by Yaser S. Abu-Mostafa, Malik Magdon-Ismail, and Hsuan-Tien Lin, and participants in the Learning From Data MOOC by Yaser S. Abu-Mostafa. No part of these contents is to be communicated or made accessible to ANY other person or entity.