Puzzler of 02/18/2012: use Bayes' theorem: P(A|B) = P(B|A) * P(A) / P(B)

The shady gambler who steps from the shadows will win his bet iff the card drawn is red on both sides.

Let A be the event: red on both sides before seeing face; P(A) = 1/3 ☚ roll over
Let B be the event: a red face shows up; P(B) = 1/2 ☚ roll over
Let B|A be the event: red face shows up given that red is on both sides; P(B|A) = 1 ☚ roll over

Then A|B is the event: red on both sides given that red face up; P(A|B) = 1*(1/3)/(1/2) = 2/3 ☚ roll over

So is it an even bet? NO! the gambler wins two times out of three. ☚ roll over

Oh good lord. Leaving aside the fact that in the real world, the well-dressed gentleman would be cheating, there are three possible other sides to the card and only one of them is green, so he’s offering even money when you have a 1 in 3 chance of being right. The green-green card is a red herring.

No math necessary.

Here’s the real world reason you don’t take the bet (and that’s what the Puzzler asks, should you take the bet):

“You stumble out of one of the saloons, having spent most of your money on women and wine – and you’re about to squander the rest – when you hear someone call out to you. From the inky shadows emerges a well-dressed gentleman who proposes a game of chance.”

In what universe does that end well?

Littlemouse–I have information on good authority that the well-dressed gentleman that appeared from the inky shadows was Thomas Bayes, who derived Bayes’ theorem mentioned in the OP. Thomas Bayes was a minister who liked to do research in probability theory. Now do you really think a minister would try to cheat another person?
Thomas Bayes is known for this theorem which led to a branch of statistics called Bayesian statistics. However, he thought that his real contribution was a couple of theological papers that he wrote.

Thank you, Triedaq. Having never read a book, that was news to me.

Until I retired this past May, I taught mathematics and computer science courses. I liked to read about the mathematicians and computer science people who developed theories relevant to what I was teaching. I would share the interesting information about their lives with my students. I wanted them to realize that there are real people behind the mathematics and computer science.

One of the really great moments in my career was when the late opera bass singer, Jerome Hines gave a concert on my campus. The day after his performance, he asked to come to the mathematics department and discuss a mathematical theory he developed. We had a great time with him and his theory was really quite mathematically sophisticated.

I really like this forum with contributions from people who work in many different areas as well as automotive mechanics and it is interesting to me to read about the interests of the mechanics (and I am not a mechanic) who contribute to this board.

Triedag…such are the advantages of college courses when you can actually test kids on topics you did not cover in class, leaving more time for enrichment. Do that with kids too many times in high school and you are open for a visit from the department head, principal, superintendent and irrate parent, all after your head for not spoon feeding Johnny/Mary his/her topic pablum. :=\ Great moments in our careers are fewer and further/farther between and you take the smaller ones when ever you can.
Mention Jerome Hines in a high school math class, and the first question you’ll get is "so Mr. C, what draft choice did he go ? " :=)

“Do that with kids too many times in high school and you are open for a visit from the department head, principal, superintendent and irrate parent, all after your head for not spoon feeding Johnny/Mary his/her topic pablum”.
Dagosa–unfortunately, you are right. My son teaches 3rd grade in a laboratory school and everything is data driven. He turns in weekly lesson plans and if his plans said that he is to be teaching math at 9:30 a.m., he had better be teaching math. His school recently had a tornado warning and all the students had to go to the basement of the building for 30 minutes until the all-clear was sounded. I guess he was supposed to have somehow forseen that and put it in his lesson plan for the day.

I went to a small school in the country. Back in 1954, I was in a study hall in 7th grade and had finished my work, so I was allowed to go to the library. I picked up an issue of Popular Science and found the following puzzle: An engineer needs a 16 1/2 ohm resistor in a circuit he is constructing. He opens his parts drawer and finds he has four 10 ohm resistors and nothing else. Can he connect these 10 ohm resistors to get 16 1/2 ohms?"

I asked the teacher who was monitoring the study hall. She said that she didn’t remember enough from her high school physics, but she took me down to talk the the high school physics teacher. He showed me the formulas for series resistance and parallel resistance and told me to figure it out. On the way back to the study hall, the teacher who was monitoring the study hall said, “When you figure it out, come show me your solution”. I did figure out the solution and showed the teacher. To me, this represents really great teaching. These teachers took an interest in me, but made me work to figure out the answer.

I’m afraid today that teachers and students have to spend so much time covering “content” that moments like mine that are “off the subject” are missed.

You two are right - my son had a physics teacher in HS that was widely criticized by parents for being ‘too hard’, ‘not following the book’, etc, etc…

Guess what? His is the one class my son said REALLY prepared him for college…go figger…

Texases–When my son went to college, I advised him to listen to upperclassmen and find out which professors they complained about being “too hard” and then take courses from those “hard” professors. Unfortunately, my son took my advice. What happened was that he graduated from college and became a teacher and can’t support me in my old age. I should have mapped out an easy route for him where upon graduation from college he could have found a job that had high pay.

Supposedly AP courses provide that added incentive and enrichment with higher expectations. In the public school I taught , there were parents who thought AP courses should be provided for their child, regardless of past performances. It became a status symbol you could cajole your way into instead of earning. Too much politics in these school courses was why even the department head wondered why calculus was no longer an AP course. It seemed we have to offer AP calculus just to teach the subject the way it should be taught. I’m sure it’s the same in other subject areas too.

Triedag…don’t get me wrong, I love the arts, especially music. But, one of the reasons for lost teaching time in my math classes, was block scheduling, 80 minute classes 2 to 3 times a week. Obstensively to provide enrichment, the music department pulled kids out on a regular basis (my advanced math classes typically were loaded with band and chorus members) for practice and performances. I could go an entire week and some times two around holidays and not see many of these kids in my class. In college…no problem. In a public school, it meant special tutoring after school and watered down the courses. These things sometimes separate the public from the private school I taught at a short time. That was the big reason I sent my own kids to the private school. They each participated in both band and athletics without missing classes. Higher expectations without the politics.

One memorable event occurred when my daughter complained to me that her AP Science teacher wasn’t teaching her everything during class. Instead of going to the school to complain which she expected, I said to her " that’s wonderful. He’s doing you a favor. You are now getting a taste of what college courses can be like. I suggest, instead of complaining, you get together with the other students who feel the same and form a study group. Break topics up according to their strength and teach each other, AFTER school. In less then a year dear, you’ll be on your own without mommy or daddy to hold your hand. Start preparing".

. In the public school I taught at, there were still parents who thought AP courses should be provided for their child, regardless of past performances.

That’s one reason I sent my kids to private school.

They had three levels (standard, Honors, and AP). The public schools had the same.

But the standard level in my kids school was equivalent to the public schools Honors or in some cases AP. My daughter took AP Calc, Physics and Chemistry. And at my daughters high-school you had to be ACCEPTED into the AP class. The average in her class on the AP exam was 3.5. The HIGHEST on the AP exam at the public high-school was 3.0. My daughter got 5.0 on all three AP exams. And MIT gave her college credit for her AP classes. Many schools will only give credit for 4 or higher.

@dogasa…One of the main problems in the public high-school near us is the quality of the Math teachers. Of all the math teachers they have at the school…only 2 actually have degrees in Math or Science. One use to teach in the middle school where my sons and daughter went. He had a degree in History…but because he had is “Teachers certificate” he was considered qualified to teach ANY subject. He barely understood the 7th grade math he was teaching. At least the private schools my kids attended (and still attending) the teachers are far more qualified to teach Match and Science. One of the teachers has a PHD in Physics from RPI. GREAT teacher…Retired from GE when GE moved their Jet engine plant out of Lynn MA.

“In less then a year dear, you’ll be on your own without mommy or daddy to hold your hand. Start preparing”.
dagosa–I agree with you 100%. Unfortunately, in too many classes today (and this includes college courses), there is too much memorization required with little application. I have had students ask “What should we memorize for the test?” My answer to this: “You will see problems on the test that you didn’t see in class. If you have kept up with the outside work, you should be able to do these problems”. What I found disturbing, particularly in my last ten years of teaching, is that I had younger colleagues who never picked up assignments. One colleague complained to me that his linear algebra students, when asked if any had questions over the assigned work, none had a question. Yet, when it came to a test, these students did poorly. I asked him if he picked up the assignments and the answer was NO. He didn’t think that one should have to pick up and grade assignments.
In my last years of teaching, our classrooms were equipped with digital camera devices. We could place an object under the camera and it would be projected on a screen. One of the funny, but sad experiences I had was just before class started, a group of students were snickering and one told me that I wasn’t teaching the way I should. I asked how I was supposed to teach. The student responded, “You are supposed to project the textbook onto the screen and read it to us. That is what our other professors do”. I responded, “I’m not your other professors. I think you are all able to read for yourselves”. During a free period, I walked down the hall and I had colleagues that were teaching just the way the students described. My students weren’t really critical of me–they knew what a couple of other faculty were doing was a joke.
There is a book that came out a year ago titled “Academically Adrift–Limited Learning on College Campuses”. Roughly 4000 students were tested in critical thinking, problem solving and writing skills on 20 different college campuses. The conclusion was that students were making little or no gains in their first two years of college. As a nation, we are going through the mortgage crisis. I am afraid that the next big hit will be public higher education. With college loan debt exceeding credit card debt and many college graduates not employable, there is a big problem on the horizon.

Another quick way to see the solution: no matter which color turns up, the con man will bet you that the unseen side of the card is the same color. The only way you would win is if you had picked the red/green card, and you have only a 1 in 3 chance of having done that. So his odds are twice as good as yours.

Trie…“there is a big problem on the horizon”. Being the wide eye, flower child of the 60s, I feel we tackle education ( as well as healthcare) head on. Everyone gets it free from cradle to grave. I don’t think many will believe me if I said it’s the cheapest way to go. Bottom line, a single payer in both determines the cost and quality of the product. My logic is different then others. But then, I would like to see single payer Vette ownership too.

@Dsorgnzd:
Here is a similar problem: The cowboy turns his back and the gambler lays out the three cards on a table. He peaks under each card and knows the colors that are face down. The cowboy turns around and is asked to select the card with the opposite color on the reverse. The cowboy points at the card he guesses is oppositely colored, say #1. His odds in winning are 1 in 3. The gambler picks another card, say #3, and flips it over, showing that it has the same color on both sides. The gambler now gives the cowboy the option of switching his selection to card #2, or staying pat with his original selection of card #1.

The question: What now are the cowboys odds of winning if he stays with his original selection of card #1? What are the cowboys odds of winning if he switches to card #2? Explain your reasoning.

Bayesian statistics are a large component of financial analysis algorithms. Those who are knowledgeable in Bayesian statistics and graduate from a prestigious GSB school can almost write their six-figure ticket to a firm on Wall Street.

Jon Corzine graduated in my class in 1975. He was a whiz in Bayesian statistics. Too much of a whiz in other things as it worked out.

That’s the Monte Hall problem and it’s been done to death.

“Time is based on the rotation speed of the earth with 24 hours equal to one trip around the earth at the equator.”

I’m an old geizzer. I can’t possibly remember my probability classes and definitely not Bayes Theorem. I just listed out all the possible combinations for the three cards. Then it was easy to see a certain number of the combinations had a red card showing. And a certain subset of those had what the questions asked, and the other ones didn’t. It’s just a questions of whether the set of red card ups that had what the question asked, was that greater than the set of red card ups that didn’t? Does that sound correct?

Sounds good to me. That’s how probability starts out, making a list of all possible combinations.

GeorgeSanJose"I can't possibly remember my probability classes and definitely not Bayes Theorem. I just listed out all the possible combinations for the three cards. ... Does that sound correct?"
I don't know ... you lost me somewhere in the middle of your post.

The cowboy has two strategies: When asked to make a choice after the gambler flips a red/red or a green/green card, he can either stand pat with his first decision, or switch and point to another card.

If he stands pat, his odds of winning are 1/3, the same as it was before the gambler flipped the card.

If he always switches his selection, his odds of initially picking a red/red or a green/green card on the first selection are 2/3. But now he wins because the gambler must flip the remaining red/red or green/green card and the cowboy wins after switching has selection to the remaining card, which must be the card with differing face colors.

So the cowboys strategies and odds of winning are —

  • Stand pat and win one out of three; or
  • Always switch picks and win two out of three.

This could be solved by a modification of Bayes’ theorem using three variables, but I don’t think it’s worth the effort.

OMG.
yes! take the bet.

To Click and Clack:

I disagree with your published answer
> TOM: So you’re saying the chances of winning are two to one in favor of
> red?

about dependent probabilities:
Multiplication Rule 2:
When two events, A and B, are dependent, the probability of both
occurring is:
P(A and B) = P(A) * P(B | A)

A = picking a card with red on either side
B = probability of a card with red on one side is also red on the other
P(A) = 2/3
P(B) = 1/2
P(A and B) = 2/3 * 1/2 = 1/3

(at the bottom I’ll directly respond to Mechaniker’s reponse).

I imagine you’ll get a lot of other people also writing to
tell you.
The odds are that the con man is wrong. it’s only 1/3 likely that
the other side of the card is red.
run a simulation. you’ll see.

RAY: Believe it or not. You can believe it because what
you’re dealing with is not cards–
you’re dealing with the sides. When you see the red side
up,
you could be seeing one or the other face of the red card.
That’s what most people don’t grasp

It’s true that you don’t know if a card showing red has red on the other side.
That’s the point of the question.
Your conclusion is wrong.
You seem to conclude that because there are more red sides, it’s more likely
to see red on the other side.

To help you visualize, consider a situation with 1000 cards.
Let’s say 500 are green on both sides; 499 have both red and green;
and 1 has red on both sides.

As in your puzzler, there are more red sides than green sides.
given that it’s not a green/green card
green sides = 499
red sides = 499 + 2

Here, P(A) = 1/2
P(B) = 1/500
P(A and B) = 1/2 * 1/500 = 1/1000

Alternatively, consider only 1 card out of 1000 that have red on both sides
What do you think your chances are of picking that card?
Doesn’t it seem to you that it would be unlikely. say 1/1000.
Given that it’s not a green/green card, there are more red sides possible,
but do you really think you’d have been more likely to pick that 1 card in 1000
instead of one of those cards with red and green ?

This is similar to the “Monty Hall” situation. shown 3 doors, all closed.
the contestant picks one.
Monty opens a door, showing a booby prize, and asks if you should switch.
The answer is yes. Your chances are 2/3 that the door you didn’t pick is the
winner.

To visualize, again consider 1000 doors.
only one good door.
you pick a door.
Monty opens 998 doors with bad prizes.
Should you switch ?
yes.
The chances are 1/1000 that you picked the good door.
The chances of the other door you didn’t pick is 999/1000 of having
the good prize behind it.

The fact that doors were opened doesn’t increase your original odds.
But, you now have more information, and you know that 998 doors were wrong.
Chances were 999/1000 that you didn’t pick the right door, and now that
you know 998 of the other doors were wrong, the one remaining door is
likely to hide the good prize with a probability of 999/1000
Switch your choice.

For the puzzler, take the bet.
You’ll be right 2/3 of the time.


Mechaniker says:

use Bayes’ theorem: P(A|B) = P(B|A) * P(A) / P(B)
Let A be the event: red on both sides before seeing face; P(A) = 1/3
Let B be the event: a red face shows up; P(B) = 1/2
Let B|A be the event:
red face shows up given that red is on both sides; P(B|A) = 1

Then A|B is the event: red on both sides given that red face up;
P(A|B) = 1*(1/3)/(1/2) = 2/3

With all due respect, I think this is a mis-application of Bayes’ theorem.

You don’t get to pick the side.
You pick a card.
you say P(B|A) = 1
but that assumes you’ve picked the red/red card.
You define A to be the event of picking the red/red card.
Of course, if you pick the card with red/red, the probability of the other
side being red is 1.
But you don’t know that A has occurred.
All you know is that red is visible.

It should be:
The initial event, A, is picking a card. some have red, some don’t.
It should be that:
A = picking a card with red on some side.
P(A) = 2/3

now that you’ve picked a card with red showing, what’s the probability that
the other side is red? there are two possibilities, 1/2 are red.
B = probability that other side is red
P(B) = 1/2

using Multiplication Rule 2:
When two events, A and B, are dependent, the probability of both
occurring is:
P(A and B) = P(A) * P(B | A)

The application of Bayes’ theorem should be:
P(B | A) = 1/2
P(A) = 1/3
P(B) = 1/2

P(A|B) = 1/2 * (1/3) / (1/2) = 1/3

so the chances of having picked the red/red card are 1/3
you’d be right 2/3 of the times to take the bet with the con man.


This also is an answer to Mechaniker February 22

The question: What now are the cowboys odds of winning if he stays with his
original selection of card #1? What are the cowboys odds of winning if he
switches to card #2? Explain your reasoning.

the cowboy should switch his choice.
just like the Monty Hall situation.

I agree with your post on Mechaniker February 23