Tuesday, January 29, 2008

Probability, and a stupid error by me

In case anyone is reading this who doesn't know the background, I was engaged in a lengthy discussion concerning statistics and the types of inferences that were or were not valid from them. During this discussion, another person proposed a simple probability problem, and I made an error in evaluating the answer. I think we disputed on this in well over a hundred posts before I realized the mistake I made. It wasn’t the first time, and I have been on the correct side of such exchanges more often the wrong side, historically. That’s about all I expect.

Recently when referring back to this discussion, the other poster said I had made a specific kind of error. Since I had made a completely different error, I thought I should be correct about the type of oversight I had made. Rather than possibly do another hundred posts on probability in a message board actually devoted to the Utah Jazz (JazzFanz), I decided to bring that discussion over here.

The problem: your partner flips two coins in secret, and you choose one at random and it is heads. What is the probability the other one is heads?

My incorrect reasoning: there were four possible outcomes from the flip: TT, HT, TH, and HH. All four outcomes were equally likely. However, you know that TT did not occur. Therefore, among the three remaining possible flips, two of them would have tails, and one would have heads, so it is twice as likely the other coins is tails as heads. The probability is 1/3. Yes, it was stupid of me.

His (correct) reasoning: we have information only about one coin, and no information about the other. The probability is 1/2.

However, he seems to believe the problem was with my methodology, rather than the implementation of that methodology, so I want to be clear that the correct methodology is this: you have to adjust by the probability that heads would be shown for each type of flip. I did that for TT, by saying it was not possible, but I did not do so for the HT or TH groups. In each case, the odds of revealing heads at random (H) is 1/2, so you have to adjust for that in the calculation of the probabilities. Basically, you are twice as likely to get a head from a HH combination as from HT or TH. In terms of odds, it's [1/2 * P(HT) + 1/2 * P(TH)] : 1 * P(HH), or 1:1, making the probability 1/2.

If his method is easier, why did I use mine? Habit, I suppose. Looking at all the possibilities lets you answer a deeper range of questions than a mere comparison of knowledge method. For example, you can use it to evaluate the following question.

You get an offer to play a game. The rules are you flip two coins. You must reveal one coin, and it must be head if you have one. If the other player guesses the value of the second coin, he gets $1. For the game to be fair, how much should you get when he is wrong?

Edited to remove vertical bars and for clarification.

33 comments:

One Brow said...

Response to a comment left at JazzFanz, for some reason.

So then, he wins, he gits a dolla. You win, he pays you $3.
That's what I got, too, using the same set-considering logic.

Havin done said alla dat, Eric, I still say the same thang about the error last time round. Of course the "correct methodology" (applied correctly, of course) will yield the right answer to any math question, but any considerations of "sets" are totally irrelevant when ya aint got no set. What the odds of guessin one, and only one, coin flip? Whatever they is, it aint got nuthin to do with tryin to guess 2 flips, or 3 flips, or....
You may have missed this, but you just used a set-based consideration to discuss the guesses of 1, and only 1, coin flip, to use your terminology. To put it another way, if you know ahead of time that the result are independent, you can ignore the others. However, regardless of whether the results are independent, the set-based approach works.

"I want to be clear that the correct methodology is this:..."

Spoze you ax me how many points AK scored last night and I got the box score in front of me. I say: I aint gunna tell ya dat, straight up, but Imma tell ya this: I'm takin what he scored, and I'm addin 5 to it. Now I'm doublin that number. Now I'm doublin it again. Now I'm dividin that number by 4. After doin alla that there, I got 25. Now, you tell me, what he score?

You're naturally gunna subtract back off the 5 I added, and say 20. And you're gunna be right. But is that the "correct methodology" for tellin a guy a number in a boxscore? Or is the correct method to just haul off and say: "It says here he scored 20."

I don't consider either methodology wrong, either in your example or in the original problem. Of course, in your example there were calcualtions thrown in for no apparent reason, while in the original problam I was attempting to use a more general approach that would work regardless of independence.

“Do not accustom yourself to use big words for little matters.” (Samuel Johnson)
Sometimes, a special tool is the perfect thing for the job. However, often one hammer can be used on 50 different types of nails. In my view, I was using a little word for a little matter.

Anonymous said...

Testin.

Anonymous said...

OK, I guess dat works.

Anonymous said...

Well, Eric, I just say dat what aint relevant aint relevant. Ya can throw in all kinda irrelevant thangs, and it don't make the right answer wrong, but it don't add nuthin, neither. As I read your post, you're takin a simple situation, then addin in unnecssary complications, then extication yourself from them artifical complications so ya can git back to the simple situation ya done started with, and then givin the simple answer. Why bother with all that when it wasn't never necessary from the get-go, I ax ya?

Anonymous said...

Sometimes guys go wrong tryin to reverse all the artifical complications they throw in, and end up with the wrong answer, know what I'm sayin?

Anonymous said...

"You may have missed this, but you just used a set-based consideration to discuss the guesses of 1, and only 1, coin flip, to use your terminology."

Naw, that's just equivocatin on the word "set." I was talkin about sets of flips, not sets of outcomes. Ya don't never need to consider what would happen if ya flipped a coin twice, if you're just only dealin with one flip. Ya can, aint no law against it, er nuthin, but it just aint got no kinda nuthin to do with the problem at hand, ya know?

Anonymous said...

"... I was attempting to use a more general approach that would work regardless of independence..."


I don't get this neither, Eric. You talk about makin (unnecessary, really) "adjustments" to the set odds. In order to know which adjustment to make, you need to know if you're dealin with dependent or independent outcomes, doncha?

Anonymous said...

Spoze I go to a joint like Jazzfanz, and say: I just looked out my winda, and seen a black car and then a red fire truck go by, and I got to thinkin: Ya ever seen a fire truck that aint red?

About 75% of the responses will be along the lines of "All cars aint black, fool."

Anonymous said...

For years, I usta work at dat there foundry, where they had acres and acres of big-ass industrial machinery, ya know? One time, every busted down, and couldn't nobody do nuthin, so the bossman called up some hot-shot expert ta come in and fix it all.

The shows up, ax a shitload of questions for about 15 minutes, then wanders off to a compressin machine in the middle of the plant. He takes out a ballpeen hammer, taps dat machine, and, presto! Everythang back ta workin again, ya know?

Bossman, he say: Thanks, expert-man, send me a bill for this here, eh? Expert-man, he say: Aint no need for dat. I just write one up right here. Then he takes his self out a pencil and writes out a invoice for $10,000.

Bossman, he say: What!? $10,000 for one tap with a ballpeen hammer!? Expert-man, he say: Yeah, ya gotta point there, lemme revise that bill, eh? So, then, he take it back and make it say:

1. One tap with ballpeen hammer: $1

2. Knowin where to tap: $9,999.

Anonymous said...

Now, Eric, ya might be sayin: Looky here, anonymous, how dat relevant to nuthin, eh?

Well, relevance is the whole damn point, see? Let's say math formulaes are ballpeen hammers. Ya might memorize 1,000 of them, but they aint no help unless ya know where to go tappin with em, eh?

Knowin what's relevant is a whole lot more important than just knowin stuff, see?

One Brow said...

Welcome on board, aintnuthin. Feel free to stick around and comment on other topics, as well.

For my other regular reader (so far, anyhow), aintnuthin and I have regularly disagreed and agreed on JazzFanz. He has an unusual style of writing and likes to makes his points in a sideways manner, but none of that takes away from his insights, which I don’t always agree with, but are always well-considered.

Well, Eric, I just say dat what aint relevant aint relevant. Ya can throw in all kinda irrelevant thangs, and it don't make the right answer wrong, but it don't add nuthin, neither. As I read your post, you're takin a simple situation, then addin in unnecssary complications, then extication yourself from them artifical complications so ya can git back to the simple situation ya done started with, and then givin the simple answer. Why bother with all that when it wasn't never necessary from the get-go, I ax ya?

Sometimes guys go wrong tryin to reverse all the artifical complications they throw in, and end up with the wrong answer, know what I'm sayin?


That’s a valid point. My response would be that there is a trade-off between using a single tool, with a universal application, and using different tools to do similar jobs.

"You may have missed this, but you just used a set-based consideration to discuss the guesses of 1, and only 1, coin flip, to use your terminology."

Naw, that's just equivocatin on the word "set." I was talkin about sets of flips, not sets of outcomes. Ya don't never need to consider what would happen if ya flipped a coin twice, if you're just only dealin with one flip. Ya can, aint no law against it, er nuthin, but it just aint got no kinda nuthin to do with the problem at hand, ya know?


In both cases, we are dealing with two independently flipped coins, or if you prefer, a coin flipped twice. In both cases, we know the outcome of the first flip. In both cases, we first have to determine to what degree our knowledge of the first flip affects the probability of the second. My method works that determination into the calculation, yours is to use different calculations after you make the determination.

I’m very interested to hear what you think the difference is between "sets of flips" and "sets of outcomes", by the way.

"... I was attempting to use a more general approach that would work regardless of independence..."

I don't get this neither, Eric. You talk about makin (unnecessary, really) "adjustments" to the set odds. In order to know which adjustment to make, you need to know if you're dealin with dependent or independent outcomes, doncha?


Exactly so.

Spoze I go to a joint like Jazzfanz, and say: I just looked out my winda, and seen a black car and then a red fire truck go by, and I got to thinkin: Ya ever seen a fire truck that aint red?

About 75% of the responses will be along the lines of "All cars aint black, fool."


Yeah, that’s about right. 

For years, I usta work at dat there foundry, where they had acres and acres of big-ass industrial machinery, ya know? One time, every busted down, and couldn't nobody do nuthin, so the bossman called up some hot-shot expert ta come in and fix it all.

The shows up, ax a shitload of questions for about 15 minutes, then wanders off to a compressin machine in the middle of the plant. He takes out a ballpeen hammer, taps dat machine, and, presto! Everythang back ta workin again, ya know?

Bossman, he say: Thanks, expert-man, send me a bill for this here, eh? Expert-man, he say: Aint no need for dat. I just write one up right here. Then he takes his self out a pencil and writes out a invoice for $10,000.

Bossman, he say: What!? $10,000 for one tap with a ballpeen hammer!? Expert-man, he say: Yeah, ya gotta point there, lemme revise that bill, eh? So, then, he take it back and make it say:

1. One tap with ballpeen hammer: $1

2. Knowin where to tap: $9,999.

Now, Eric, ya might be sayin: Looky here, anonymous, how dat relevant to nuthin, eh?


No, I know better than that. Like I say above, you like to come at a point sideways, but you seldom post pointlessly.

Well, relevance is the whole damn point, see? Let's say math formulaes are ballpeen hammers. Ya might memorize 1,000 of them, but they aint no help unless ya know where to go tappin with em, eh?

You’re right, and I sure enough screwed up using the methodology.

Knowin what's relevant is a whole lot more important than just knowin stuff, see?

Agreed.

Say, just out of curiosity, did you see the post a while back on the two-player Monty Hall problem, and did you have a response?

Anonymous said...

"Say, just out of curiosity, did you see the post a while back on the two-player Monty Hall problem, and did you have a response?"

Naw,missed dat. See it where, exactly? On this here blog, ya mean

Anonymous said...

"In both cases, we are dealing with two independently flipped coins, or if you prefer, a coin flipped twice...."

Well, we aint talkin bout the same things then. I was goin (way) back to the original problem at Jazzfanz. The first part of the question, where only the outcome of a single "flip" was relevant, ya know? I thought that's was the main part of your original post was about.

Anonymous said...

In that problem some irrelevant information was thrown in about a set, as bait, I guess, for those who might get distracted by it.

Just like the gratutious mention of a black car in my fire engine example was.

To kinda say it all over, I can't see any reason to either: (1) start with the possible outcomes for a two-flip set, then eliminate the extraneous "possible outcomes" in order to be left with the possible outcomes for one flip (why not start with the possible outecomes for 10 flips, if ya wanna go that route), or (2) how such an approach would work equally for independent vs dependent outcomes when, in either case, that's the very thing you have to determine (without the aid of any formula) before proceedin down the right path.

Anonymous said...

I guess ya can't go back and edit these posts. I figure ya know what I'm gettin at, either way, but that last post shoulda read "(2) assert" insteada "(2) how."

One Brow said...

Naw,missed dat. See it where, exactly? On this here blog, ya mean

It's laready down to page four of General Discussion on JazzFanz.

http://jazzfanz.com/boards/viewtopic.php?f=2&t=26643

One Brow said...

"In both cases, we are dealing with two independently flipped coins, or if you prefer, a coin flipped twice...."

Well, we aint talkin bout the same things then. I was goin (way) back to the original problem at Jazzfanz. The first part of the question, where only the outcome of a single "flip" was relevant, ya know? I thought that's was the main part of your original post was about.

You can only determine whether or not the outcome of the single flip is independent of the known flip by considering the manner in which you learned that flip.

In that problem some irrelevant information was thrown in about a set, as bait, I guess, for those who might get distracted by it.

No doubt, and a good trap to catch the careless, especially coming right after the six-coins-three-drawers problem.

To kinda say it all over, I can't see any reason to either: (1) start with the possible outcomes for a two-flip set, then eliminate the extraneous "possible outcomes" in order to be left with the possible outcomes for one flip (why not start with the possible outecomes for 10 flips, if ya wanna go that route),

Well, you don’t have 10 coins in the problem, only 2. In addition, the fact that you decide independence first does not mean you are not considering the outcomes for the two flip set, it mean that you are pre-grouping them into the one-flip set.

or (2) assert such an approach would work equally for independent vs dependent outcomes when, in either case, that's the very thing you have to determine (without the aid of any formula) before proceedin down the right path.

Proceeding down the right path, using the general method, incorporates independence rather than follows after it. It allows to you examine more complex cases that involve, perhaps, ten coins and varying stages regarding independence among them.

Anonymous said...

"Well, you don’t have 10 coins in the problem, only 2."

I still don't know what you're talkin about, Eric. You seem to be addressin a different problem that I am.

Lemme re-state the original problem (which I'm addressin) in a slightly different way: Spoze I say to you.

A gal I know had a kid last night. what are the odds of the kid bein a boy, ya figure?

Whatever your answer is, you DON'T need to consider more than one "flip" (childbirth). That would be true even if, before you gave your answer, I went on the say:

"For what it's worth, she had a kid last year too, and it was a boy."

Anonymous said...

Now, of course, if there were some inexplicable law of nature that invariably caused the sex of successive children to alternate, then the additional information would indeed be "worth" somehing (it would be relevant).

That's just another way of sayin that you know the outcome of last night's childbirth is dependent upon, not independent of, the earlier event (birth). But if it aint dependent, then it aint relevant, and ya just don't pay it no nevermind.

Anonymous said...

http://jazzfanz.com/boards/viewtopic.php?f=2&t=26643

I went to the website in that post. I read the problem, but none of the comments (so I aint cheatin, if the answer is given there).

I haven't tried to quantify odds, but intuitively I would consider the followin things:

1. If you were the only player you would improve your odds by always switchin.

2. If there are 2 players, it seems like you would happen to select the same door as the other guy 1/3 of the time. In those cases, you might just as well be the only one playin, so best to switch.

3. When the host opens a goat door, you know they aint no car there, and that the car is behind one of the other two doors (one of which you have chosen).

4. In those cases (2/3 of the time) where you have chosen a different door than your co-player, the host had no discretion in which door to open. For that reason, he has given you no useful information--no way to say whether it's better to switch or not.

Conclusion: Always switch. Even if it does not help you in 2/3 of the cases, it doesn't hurt you either. However, you still gain a benefit in those (1/3) cases where you and the other guy chose the same door to start with.

Dat right?

Anonymous said...

"Personal attacks on other commenters, unless they are public figures, will be edited out."

I want all insults about me edited, Eric, so don't go tellin nobuddy that I am the duly-appointed dawg-catcher at Shady Acres Trailer Park, OK?

"This does not apply to attacks on me."

Heh, well I guess that just goes to prove what a stupid-ass chump ya are, then, eh, Eric?

One Brow said...

"Well, you don’t have 10 coins in the problem, only 2."

I still don't know what you're talkin about, Eric. You seem to be addressin a different problem that I am.

Lemme re-state the original problem (which I'm addressin) in a slightly different way: Spoze I say to you.

A gal I know had a kid last night. what are the odds of the kid bein a boy, ya figure?

Whatever your answer is, you DON'T need to consider more than one "flip" (childbirth). That would be true even if, before you gave your answer, I went on the say:

"For what it's worth, she had a kid last year too, and it was a boy."


I think we’re agreeing on this, but with a different perspective and emphasis. Your knowledge of the birth of the boy last year has no effect on this child, so we both factor that independence into the process, differently.

http://jazzfanz.com/boards/viewtopic.php?f=2&t=26643

I went to the website in that post. I read the problem, but none of the comments (so I aint cheatin, if the answer is given there).

I haven't tried to quantify odds, but intuitively I would consider the followin things:



Conclusion: Always switch. Even if it does not help you in 2/3 of the cases, it doesn't hurt you either. However, you still gain a benefit in those (1/3) cases where you and the other guy chose the same door to start with.

Dat right?


Yes, that a good start. Let’s add a twist. You get an offer to cash out, and the goal is to choose the highest net value.

If you’re the only player, and you’re looking at a $21,000 car, you cash out at any offer over $14,000, and stick with the door under $14,000. That’s because you are two-thirds likely to win the car, and 2/3 * 21,000 = 14,000.

When there are two players, what’s your cash-out amount? We agree that switching is better, so it needs to be over $10,500.

If you use the method I did, this is not a difficult problem. So, I’m willing to suffer the occasional missteps I make in using it.

"Personal attacks on other commenters, unless they are public figures, will be edited out."


I want all insults about me edited, Eric, so don't go tellin nobuddy that I am the duly-appointed dawg-catcher at Shady Acres Trailer Park, OK?

I would never try to give you a veneer of such respectability.

Thaks for reminding me to change that, BTW. I can't edit comments, only delete them, AFAICT.

"This does not apply to attacks on me."

Heh, well I guess that just goes to prove what a stupid-ass chump ya are, then, eh, Eric?

I keep telling people that, but they never believe me.

Anonymous said...

"When there are two players, what’s your cash-out amount? We agree that switching is better, so it needs to be over $10,500."

I don't think I used the method you did, but my guess would be $11,666.66. That what you get?

Anonymous said...

My more general basic point is this, Eric: Formulaes can be useful as shortcuts, but you can never fashion a formula for a given situation until you have first thought the entire thing through, step by step.

If ya can think it through once, then ya can always do it again. If ya can't, then the formula won't be much good to you because you won't know when to use it (i.e., exactly when, and why, it applies).

I think far too many people resort to formalistic "thinkin" without really understandin the basis for the formula(s) they routinely apply.

One Brow said...

I don't think I used the method you did, but my guess would be $11,666.66. That what you get?
Apply the methodology I prefer:

After you choose a door (call it 1), you start with 9 possible cases (the door the other player has chosen, and the door the car is behind, which are independent.)

Using the first position for the other player, and the second position for the car, they are:
11, 12, 13, 21, 22, 23, 31, 32, 33.

Monty now opens door 3, and there is no car. That leaves only 11, 12, 21, and 22. Monty will open door 3 50% of the time for 11, and 100% for 12, 21, and 22.

If 11 or 21 is true, you should hold. If 12 or 22 is true, you should switch. That’s a ratio of .5 + 1 : 1 + 1, or 3:4. The probability of winning on a stay is 3/7, and on a switch is 4/7. 4/7 * 21,000 is $12,000.

My more general basic point is this, Eric: Formulaes can be useful as shortcuts, but you can never fashion a formula for a given situation until you have first thought the entire thing through, step by step.
I agree completely. That’s one reason I was referring to it as a methodology as well as a formula. A properly chosen methodology will act as a checklist for thinking things through. A formula by itself is not much value.

Anonymous said...

"Monty will open door 3 50% of the time for 11, and 100% for 12, 21, and 22."

That's the key to calculatin the exact dollar amount, of course.

You say (with numerical symbols) "That’s a ratio of .5 + 1 : 1 + 1, or 3:4." Truth be told, I don't even know where that "formula" comes from, because I would never put it that way.

I would simply think along these lines: 3 of the 4 remainin possibilities are twice as likely as the 4th (11), so ya gotta give alla them twice as much weight. So double them (2 x 3 = 6), but don't double the other one (which gets you to 7), and go from there.

Anonymous said...

I mean, I get it, but I wouldn't put it that way...too abstract for explanation purposes, know what I'm sayin?

One Brow said...

I expect we understand each other.

Anonymous said...

"I expect we understand each other." I expect we do, too, Eric, but also suspect we still don't really agree on nuthin. As I said before:
----
"Monty will open door 3 50% of the time for 11, and 100% for 12, 21, and 22."

That's the key to calculatin the exact dollar amount, of course.
-----

No "methodology" can give you that insight, as far as I can tell. It's a matter of "intuition," if you will. Methodology might help you quantify the consequences of the insight, but you have to glean it on your own, ab initio. Settin out a table of 9 possibilites, and then narrowin down that set down to 4, won't help you with that.

I've never really looked at logic as a subject that can be taught. I aint sayin it's useless, just that a person who doesn't think logically aint gunna start just because he took a logic course and memorized some patterns that are valid (invalid).

Anyone who has to stop and look at a memorized rule to see if the statement of a simple syllogism is valid by virtue of form is in big-ass trouble, logically speakin.

Anonymous said...

By the way, Eric, I made comments in a couple of your other topics. Not that they require a response, just that I figured you might never know if I didn't point it out to you.

One Brow said...

No "methodology" can give you that insight, as far as I can tell. It's a matter of "intuition," if you will.
Sometimes the methodology is so simple it feels like an intuition. For example, the methodology of assigning equal fractions to events when there is no reason to presume, or there is a constraint to prevent, that one is more likely than the other.

I've never really looked at logic as a subject that can be taught. I aint sayin it's useless, just that a person who doesn't think logically aint gunna start just because he took a logic course and memorized some patterns that are valid (invalid).
Is logic merely the derivation of additional true statements from first principles (in which case I disagree), or do you mean a process by which those principles are selected and possibly various other things as well (in which case I agree). Logic can show you a selection of axioms is internally inconsistent, but it can't find a worthwhile set for you.

Anonymous said...

"Is logic merely the derivation of additional true statements from first principles (in which case I disagree), or do you mean a process by which those principles are selected and possibly various other things as well (in which case I agree."

Well, I mean both. The second part goes without no kinda sayin, really. I mean, take a basic logic class, with simple syllogisms. Then they try to learns ya basic patterns, like modus ponens, er sum shit like that, ya know? If you gotta memorize them patterns to see the syllogism is valid (or invalid), then you're just gunna go right on head thinkin illogically after memorizin them mosta the time, anyways.

If ya don't gotta learn no patterns to see what's logical and what aint, then you're just wastin you're time tryin to study them formal patterns. Either way, logical thinkin can't really be taught by tryin to look at formulas.

One Brow said...

Well, I mean both. The second part goes without no kinda sayin, really. I mean, take a basic logic class, with simple syllogisms. Then they try to learns ya basic patterns, like modus ponens, er sum shit like that, ya know? If you gotta memorize them patterns to see the syllogism is valid (or invalid), then you're just gunna go right on head thinkin illogically after memorizin them mosta the time, anyways.

I think it is possible to learn to think in new ways, especially if you put yourself in an environment where you use such a skill regularly.