Sanding our assholes with 150 grit.

Simple Math (Probability) Question

I light of a few other threads I realized I don't remember some of probability as well as I should. I'll some it up with a simple question, to I'm looking for both the answer and explaination for how to arrive at that answer:
Let's say a statistical study has shown that one car in 3 will turn right at a particular stop sign. Three cars come to the stop sign in turn. What are the chances that one of the three cars will turn right?
Permalink Joel Coehoorn 
August 23rd, 2005
Exactly one, or at least one?
Permalink Aaron F Stanton 
August 23rd, 2005
"What are the chances that one of the three cars will turn right?" is kind of ambiguous, anyway. If you're saying "what is the probability that any one of those cars will turn right?" the probability is 1/1, or 100%.

However, if you're saying "what is the probability that an individual car of those three will turn right?" the chance is 1/3, or about 33% -- it doesn't matter how many cars there are, each one has the same chance. But I think you're probably asking the first one.

Probability has a funny use of language like that. It uses the same words as normal language, but with different weights. ;)
Permalink Snark 
August 23rd, 2005
Assuming an infinite number of randomly-distributed cars, the chance that at least 1 will turn is equal to one minus the probability that none will turn. The probability that one won't turn is 2/3 ... the probability that all three won't turn is (2/3)**3 i.e. 8/27 ... and so the probability that at least one will turn is 19/27.

The probability that exactly one will turn is equal to the probability that only the first will turn plus the probability that only the 2nd will turn plus the probability that only the third will turn ... the probability that only any given car will turn is (1/3)*(2/3)*(2/3) i.e. 4/27 ... and so the probability that one of any 3 cars will turn is 12/27.
Permalink Christopher Wells 
August 23rd, 2005
... serves me right for not defining my language more precisely. We're all winners!
Permalink Snark 
August 23rd, 2005
"If you're saying "what is the probability that any one of those cars will turn right?" the probability is 1/1, or 100%."

Er, no it isn't. Even if an infinite number of cars passed the probability never reaches 100%; it gets close, but never quite reaches it. It's like tossing a coin -- there's a 50% chance of getting heads each time, but that doesn't mean that if you toss two coins you've got 100% chance of getting heads...
Permalink Mat Hall 
August 23rd, 2005
> Er, no it isn't.

Well it *is* if there are only three cars in the whole world, and you're told that one in three cars will turn right.
Permalink Christopher Wells 
August 23rd, 2005
No, the chance is still 1/3 for any given car in the 3. As an aggregate, in your very small world scenario, there is a 100% chance that ONE car will turn right.
Permalink muppet 
August 23rd, 2005
"Well it *is* if there are only three cars in the whole world, and you're told that one in three cars will turn right."

It depends on your interpretation of "one in three cars will turn right" -- if you mean "one in three cars MUST turn right" then yes, if you have three cars passing then the chaces of one turning right is 100%, but if you mean "when a car reaches the junction there is a 1 in 3 chance it will turn right" then even if there were only three cars in the universe and they only ever visited the junction once it's still not a given that one will turn right. As we were talking probability I was assuming the latter interpretation. If it meant the former then it was a bit of a pointless question. :)
Permalink Mat Hall 
August 23rd, 2005
> If it meant the former then it was a bit of a pointless question. :)

Yes, but the former is the "monty hall" scenario which is what Snark was referring to.
Permalink Christopher Wells 
August 23rd, 2005
Yeah, I took it as a coin-flip kind of question, but the better reading is probably the other one. So the question should be rephrased to "if any particular car has a one-in-three chance of turning right, then out of three cars, what is the chance that at least one car ends up turning to the right?" But I'll admit that I perversely chose the incorrect reading of the question. ;)
Permalink Snark 
August 23rd, 2005
Christopher Wells' first post was the correct analysis.
Permalink AllanL5 
August 23rd, 2005
i think this is how you work it out:

L L L .66 * .66 * .66 = 8/27 : no
L L R .66 * .66 * .33 = 4/27 : yes
L R L .66 * .33 * .33 = 2/27 : yes
L R R .66 * .33 * .33 = 2/27 : yes
R L L .33 * .66 * .66 = 4/27 : yes
R L R .33 * .66 * .33 = 2/27 : yes
R R L .33 * .33 * .66 = 2/27 : yes
R R R .33 * .33 * .33 = 1/27 : yes

so its 19/27 chance?
Permalink Kenny 
August 23rd, 2005
oops... what chris said...
Permalink Kenny 
August 23rd, 2005
"Yes, but the former is the "monty hall" scenario which is what Snark was referring to."

Not really. In order for it to be the Monty Hall scenario you'd have to ask a totally different question:

"Three cars, one will turn right. Pick which one you think it will be, then I'll eliminate one of the other two. I now offer you the choice of sticking with your first choice or switching to the remaining car. Which option is best?"

All in all, probability will most likely give you a headache. :)
Permalink Mat Hall 
August 23rd, 2005
hey if you wanna be really anal about it, you have to redo your statistical calculations after the first car turns left or right...
Permalink Kenny 
August 23rd, 2005
I'm wondering if anyone knows what really good books in probability and stats are, comparable to the maturity of (say) Feynman's book on physics?

I don't mind going back in time much, so if there's a good translation of Pascal or something...
Permalink Tayssir John Gabbour 
August 23rd, 2005
> L R L .66 * .33 * .33 = 2/27 : yes

That should be -

L R L .66 * .33 * .66 = 4/27 : yes

> All in all, probability will most likely give you a headache.

When you're 'dealing' with finite sets, instead of "Math (Probability)" another word for it might be "Math (Combinatorics)".
Permalink Christopher Wells 
August 23rd, 2005
" hey if you wanna be really anal about it, you have to redo your statistical calculations after the first car turns left or right..."

I don't want to keep complaining, but no you don't. They're independent events, and the outcome of one has no effect on the outcome of the next. Tossing five heads in a row makes no difference to the chances of tossing a head next time, which *sounds* wrong -- everyone knows six heads in a row is quite unlikely -- but the coin doesn't know you've just thrown five heads, so why should it care? (The chances of tossing six heads are slim, but the chances of any individual toss being heads is always 50/50.)

The [UK National] lottery is another good one. Not only do you have more chance of dying in the next hour or so than you do of winning the lottery, but if you've got five numbers then you've got reasonably good odds of getting all six (1 in 44).
Permalink Mat Hall 
August 23rd, 2005
"I don't want to keep complaining, but no you don't. "

the coin toss is different. the 1/3 probability is calculated on statistical analysis. let's say they had observed 54 cars before, and 16 had made the right, and that's how they got 33%.

if the next car makes a left, then that's only 16 out of 55. the probabilities have changed just slightly.

if you can't make adjustments for future forecasts depending on past occurances, then you would have assumed a 100% probably depending on the very first car's actions, and never changed them thereafter.
Permalink Kenny 
August 23rd, 2005
I'm assuming the 1/3 of cars turning left was calculated from a statistical analysis of, say, the behviour of the last million cars to go through, and about a third of them turned right. Let's now assume I have a loaded coin, and through tossing it a million times I discover that it's biased about 2:1 in favour of heads -- about a third of the tosses came up tails. Those two are, I would say, pretty much the same thing; you can't say with any certainty what the next car or coin will do and what the last one did has no direct bearing on what the next one will do but you can make a reasonable guess at what the results would be over enough trials.

(The only difference between the loaded coin and cars is that unless the coin changes somehow it's always going to be loaded in the same way, whereas traffic patterns will shift and perhaps during rush hour it's one in five cars that turn right. However, this is a hypothetical situation where we're given a probability and have to assume it remains unchanged.)

So, you toss a hundred coins, or let a hundred cars go through the lights. In neither case will those hundred have any effect on the results for the next hundred. Each individual event has the same probability as the one before it and the one after it.

If, as you assert, the probability changes because of the number of cars that turn right in any given interval, then surely it also changes when you're not looking. What if you count two hundred cars, go to lunch for an hour, and then come back? Did it change while you were gone? Is it how it was when you left? Or has it gone back to how it was when you started? And how did the cars "know" you were counting them?

To summarise, a series of random fixed-probability independent events will, with a sufficient sample, produce similar aggregate results regardless of where you start in the sequence, how long the sequence is, and even whether you count every event, every other event, every fifty events, or even events picked at random.
Permalink Mat Hall 
August 23rd, 2005
<<Each individual event has the same probability as the one before it and the one after it.>>

i am not disputing that.

my assertion is that no matter which way the car turns, the initial prognosis will be in error to some degree (even if the degree is infitismal, like a one millionth of a percent) because the probability is based on statistics, not physical properties.

let me put it this way:

you have an infinite number of balls in a bag, some might be white and some might be black, and none are any other colour. you want to predict what percentage of them are black. you aren't given any other data. you take one out, and it's black. your guess is 100% of them are black. you pull another one out and its white. now your guess is that 50% of them are black. next is a white one. your guess goes down to 33%. and so on...
Permalink Kenny 
August 23rd, 2005
I understand that, but in this specific hypothetical instance we are told that the statistical study has already been done, and that the probability has stabilised at 1/3...
Permalink Mat Hall 
August 23rd, 2005
You're looking at a binomial probability distribution where each outcome can be true or false (the car turns left or right, a coin is heads or tails - with a vanishing small possibility it's sides or the driver is so incompetent he leaves the road :). Assuming the trials, ie what each car does, are independant, then the probability is given by:

( N!/n!*(N-n)! ) * p^n * (1 - p)^(N-n)

where N is the number of trials, 3 in this case, n the successful outcomes, 1 in this case, and p is the probability, 1/3 in this case. ! is the factorial. So you get

( 3!/1!*(3-1)! ) * 1/3^1 * (1 - 1/3)^(3-1)

which is

( 6/1 * 2 ) * 1/3 * (2/3)^2

or (2/3)^2 = 4/9. Or 12/27 as Chris pointed out. By hand, there are actually 3 outcomes out of 8 that a car turns right

LLL
LLR
LRL
RLL
LRR
RLR
RRL
RRR

If the probability was 1/2, it's easier to visualize the probability, but when it's not, a bit of maths is needed.
Permalink el 
August 24th, 2005
independEnt, write out 100 times...
Permalink el 
August 24th, 2005
Tayssir,

'Taking Chances: Winning With Probability' by John Haigh is a good book which comes near to what you looking for. There are lots of practical examples and the author's explanations are pretty descriptive which is good considering that it's a slippery subject.

If you can travel back in time, the pdf version of &#8216;The Value of all Chances in Games of Fortune&#8217; by Huygens, the first book on probability is available in the following link.

http://www.leidenuniv.nl/fsw/verduin/stathist/huygens/huyg1714p.pdf
Permalink Senthilnathan N.S. 
August 24th, 2005

This topic was orginally posted to the off-topic forum of the
Joel on Software discussion board.

Other topics: August, 2005 Other topics: August, 2005 Recent topics Recent topics