LFD Book Forum Problem 1.1
 User Name Remember Me? Password
 FAQ Calendar Mark Forums Read

 Thread Tools Display Modes
#1
08-22-2015, 02:50 PM
 Rotimi Junior Member Join Date: Aug 2015 Posts: 3
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?
#2
08-23-2015, 11:11 PM
 yaser Caltech Join Date: Aug 2009 Location: Pasadena, California, USA Posts: 1,477
Re: Problem 1.1

Quote:
 Originally Posted by Rotimi 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.
__________________
Where everyone thinks alike, no one thinks very much
#3
09-09-2015, 12:48 PM
 eshmrt Junior Member Join Date: Sep 2015 Posts: 2
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.
#4
09-09-2015, 11:20 PM
 yaser Caltech Join Date: Aug 2009 Location: Pasadena, California, USA Posts: 1,477
Re: Problem 1.1

Quote:
 Originally Posted by eshmrt 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.
__________________
Where everyone thinks alike, no one thinks very much
#5
12-07-2015, 05:28 AM
 henry2015 Member Join Date: Aug 2015 Posts: 31
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...
#6
12-08-2015, 02:57 AM
 yaser Caltech Join Date: Aug 2009 Location: Pasadena, California, USA Posts: 1,477
Re: Problem 1.1

Quote:
 Originally Posted by henry2015 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.
__________________
Where everyone thinks alike, no one thinks very much
#7
12-09-2015, 02:37 AM
 henry2015 Member Join Date: Aug 2015 Posts: 31
Re: Problem 1.1

Argh, sorry, my bad. misread the symbol.

Thanks for confirming
#8
12-09-2015, 08:01 PM
 yaser Caltech Join Date: Aug 2009 Location: Pasadena, California, USA Posts: 1,477
Re: Problem 1.1

Quote:
 Originally Posted by henry2015 Argh, sorry, my bad. misread the symbol.
No worries. Happens in the best families.
__________________
Where everyone thinks alike, no one thinks very much

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home General     General Discussion of Machine Learning     Free Additional Material         Dynamic e-Chapters         Dynamic e-Appendices Course Discussions     Online LFD course         General comments on the course         Homework 1         Homework 2         Homework 3         Homework 4         Homework 5         Homework 6         Homework 7         Homework 8         The Final         Create New Homework Problems Book Feedback - Learning From Data     General comments on the book     Chapter 1 - The Learning Problem     Chapter 2 - Training versus Testing     Chapter 3 - The Linear Model     Chapter 4 - Overfitting     Chapter 5 - Three Learning Principles     e-Chapter 6 - Similarity Based Methods     e-Chapter 7 - Neural Networks     e-Chapter 8 - Support Vector Machines     e-Chapter 9 - Learning Aides     Appendix and Notation     e-Appendices

All times are GMT -7. The time now is 07:28 PM.

 Contact Us - LFD Book - Top