Brain Teasers ? or 50 Years On........... ?
Posted by: Don Atkinson on 02 June 2015
50 Years on…….
50 years ago, I was doing what many 18 year olds are doing this week and over the next few weeks……………….their A-Levels.
Mine were Pure Maths; Applied Maths; Physics and Chemistry. We also had a new subject called The Use of English.
About 10 years ago I started a few “Brain Teaser” threads on this forum. One or two people complained that many of the so-called Brain Teasers were no more than A-Level maths dressed up. That was true of a few teasers, but most were real teasers, especially the ones like “The Ladder” posted by Bam and also the one about the maximum number of 1cm diameter spheres that can be packed into a 10x5x5 cm box.
Any way, never mind Brains or Teasers, I guess one or two other Forumites are also looking back 50 years and would be delighted to tease their brains with calculus, probability, spherical geometry, geometric progressions, Newton’s Laws of Motion ……………………….no ? Then probably best if you drink your weekly 21 units tonight and wake up in the Music Room tomorrow to recover from the nightmare !
First one to follow shortly, and please, please add your own favourites !!
another one:
25 Naim 'forumites' (hmmm... sounds like ants) turn up at Naim factory for a Statement demo. They will be sitting in one single row -- non-ideal, but well, thats the way its gonna be.
There are 2 forumites one of which is a vociferous supporter of SL cables and the other of Chord STA.
Naim are concerned that the demo may degenerate into an disussion over merits of these cables so are wondering about the odds of these 2 folks sitting next to each other during the demo.
they figure that if the probability of this happenig is less than 0.1 then its not worth worrying about.
is it?
what about if only 20 people turn up -- and the two 'troublesome' folks still turn up?
enjoy
ken
another one:
25 Naim 'forumites' (hmmm... sounds like ants) turn up at Naim factory for a Statement demo. They will be sitting in one single row -- non-ideal, but well, thats the way its gonna be.
There are 2 forumites one of which is a vociferous supporter of SL cables and the other of Chord STA.
Naim are concerned that the demo may degenerate into an disussion over merits of these cables so are wondering about the odds of these 2 folks sitting next to each other during the demo.
they figure that if the probability of this happenig is less than 0.1 then its not worth worrying about.
is it?
what about if only 20 people turn up -- and the two 'troublesome' folks still turn up?
enjoy
ken
Is this like getting numbers in a lottery?
Getting one seat is 1/25; getting a second seat 1/24 so the chance of the two people sitting together is 1/600?
As for 20 only turninng up are there still 25 seats available?
As for 20 only turninng up are there still 25 seats available?
No, if 20 turn up, there will then only be 20 seats available.
enjoy
ken
another one:
25 Naim 'forumites' (hmmm... sounds like ants) turn up at Naim factory for a Statement demo. They will be sitting in one single row -- non-ideal, but well, thats the way its gonna be.
There are 2 forumites one of which is a vociferous supporter of SL cables and the other of Chord STA.
Naim are concerned that the demo may degenerate into an disussion over merits of these cables so are wondering about the odds of these 2 folks sitting next to each other during the demo.
they figure that if the probability of this happenig is less than 0.1 then its not worth worrying about.
is it?
what about if only 20 people turn up -- and the two 'troublesome' folks still turn up?
enjoy
ken
Is this like getting numbers in a lottery?
Getting one seat is 1/25; getting a second seat 1/24 so the chance of the two people sitting together is 1/600?
As for 20 only turninng up are there still 25 seats available?
Lionel, good start, but.............
....................If two people are going to sit together, then in effect there are only 2x24! ways in which 23 people plus a pair (ie 25 people in total) can be allocated to the seats.
Of course, 25 individuals could be allocated seats in 25! ways.
The probability of the pair sitting together is much higher than 1 in 600.
BTW (since we all went to school so long ago !!) 25! means 25 x 24 x 23 x 22 x.............3 x 2 x 1
so 24!/25! = 1/25
another one:
25 Naim 'forumites' (hmmm... sounds like ants) turn up at Naim factory for a Statement demo. They will be sitting in one single row -- non-ideal, but well, thats the way its gonna be.
There are 2 forumites one of which is a vociferous supporter of SL cables and the other of Chord STA.
Naim are concerned that the demo may degenerate into an disussion over merits of these cables so are wondering about the odds of these 2 folks sitting next to each other during the demo.
they figure that if the probability of this happenig is less than 0.1 then its not worth worrying about.
is it?
what about if only 20 people turn up -- and the two 'troublesome' folks still turn up?
enjoy
ken
Is this like getting numbers in a lottery?
Getting one seat is 1/25; getting a second seat 1/24 so the chance of the two people sitting together is 1/600?
As for 20 only turninng up are there still 25 seats available?
Lionel, good start, but.............
....................If two people are going to sit together, then in effect there are only 2x24! ways in which 23 people plus a pair (ie 25 people in total) can be allocated to the seats.
Of course, 25 individuals could be allocated seats in 25! ways.
The probability of the pair sitting together is much higher than 1 in 600.
BTW (since we all went to school so long ago !!) 25! means 25 x 24 x 23 x 22 x.............3 x 2 x 1
so 24!/25! = 1/25
Who said people were being "allocated"? If left to their own devices surely person 1 has 1 in 25 choices; person 2 has 1 in 24 etc? edit: in the same way as getting any 2 numbers, adjacent or not, in a lottery?
another one:
25 Naim 'forumites' (hmmm... sounds like ants) turn up at Naim factory for a Statement demo. They will be sitting in one single row -- non-ideal, but well, thats the way its gonna be.
There are 2 forumites one of which is a vociferous supporter of SL cables and the other of Chord STA.
Naim are concerned that the demo may degenerate into an disussion over merits of these cables so are wondering about the odds of these 2 folks sitting next to each other during the demo.
they figure that if the probability of this happenig is less than 0.1 then its not worth worrying about.
is it?
what about if only 20 people turn up -- and the two 'troublesome' folks still turn up?
enjoy
ken
Is this like getting numbers in a lottery?
Getting one seat is 1/25; getting a second seat 1/24 so the chance of the two people sitting together is 1/600?
As for 20 only turninng up are there still 25 seats available?
Lionel, good start, but.............
....................If two people are going to sit together, then in effect there are only 2x24! ways in which 23 people plus a pair (ie 25 people in total) can be allocated to the seats.
Of course, 25 individuals could be allocated seats in 25! ways.
The probability of the pair sitting together is much higher than 1 in 600.
BTW (since we all went to school so long ago !!) 25! means 25 x 24 x 23 x 22 x.............3 x 2 x 1
so 24!/25! = 1/25
Who said people were being "allocated"? If left to their own devices surely person 1 has 1 in 25 choices; person 2 has 1 in 24 etc? edit: in the same way as getting any 2 numbers, adjacent or not, in a lottery?
Hi Lionel, to answer your question - "Nobody".
You are right.
The first person to select a seat can do so in any one of twenty-five ways.
The second person can choose his seat in any one of twenty-four ways
the third person etc
down to the second off last person can choose either of two seats
and the last person can choose from only one seat.
Hence the number of ways in which 25 people could find themselves seated is 25 x 24 x 23............x 3 x 2 x1 = 1.55E+25 ie an awfully big number !
The two adversaries could be any of these 25 people eg numbers 7 and 15, for example, and they could pick any one of 19 and 11 seats respectively as they enter the room. By this time, it might not even be possible for them to unwittinly select seats adjacent to each other. And if it was possible to select adjacent seats, there is no guarantee that they will.
I think that with 25 listeners, there is a 2/25 = 0.08 probability they will find themselves together and with 20 listeners the probability will be 2/20 = 0.1 probability and Naim would be concerned.
But I could easily be wrong
Going back to the Lottery analogy, I think the probability of picking 6 numbers out of 49 is
P = 49!/(43!*6!) = 13,983,816
But again I could be wrong - I'll have a quick look on the webb
Phew !
Just looked ! all is ok !
Phew !
Just looked ! all is ok !
I think you guys are making it too complex. First guy randomly takes a seat. He could take and end seat (2/25) or a non end seat (23/25).
In case 1, the chance of the second chap (assuming he also chooses a seat at random) sitting next to him is 1/24. In the case 2 (non-end seat) it is 2/24.
By using a simple diagram, I get the probability of adjacent seats to be 48/625. It is a conditional probability (Bayesian) problem. The probability is the green area (2 + 46 = 48) divided by the total area (25 x 25 = 625)
seating_diagram by Winky, on Flickr
For the 20 seat case, by the same logic it is 38/400
Phew !
Just looked ! all is ok !
I think you guys are making it too complex. First guy randomly takes a seat. He could take and end seat (2/25) or a non end seat (23/25).
In case 1, the chance of the second chap (assuming he also chooses a seat at random) sitting next to him is 1/24. In the case 2 (non-end seat) it is 2/24.
By using a simple diagram, I get the probability of adjacent seats to be 48/625. It is a conditional probability (Bayesian) problem. The probability is the green area (2 + 46 = 48) divided by the total area (25 x 25 = 625)
seating_diagram by Winky, on Flickr
For the 20 seat case, by the same logic it is 38/400
hmmmmm !!
Your figures are VERY close to mine. Mine are 0.08 and 0.1 respectively and yours are 0.077 to 2 dp and 0.095 respectively.
I didn't think my logic was at all complicated.
For the 25 guest version................
There are 24 x 2 ways in which a pair can sit together. ie 24 combinations x 2 because for each combination the pair could be L/R or R/L.
The number of ways in which 25 people could choose to sit is 25!
Treating the "Pair" as a single unit means we are looking at the probability of seating that pair together as (2x24!)/(25!)
Which reduces to 2/25 or 0.08
Similarly (2x19!)/(20!) reduces to 0.1
But keeping it simple doesn't necessarily make mine right ......................I think we need a few more experts to join in before we reach a conclusion .................even ken c might be having second thoughts
Phew !
Just looked ! all is ok !
I think you guys are making it too complex. First guy randomly takes a seat. He could take and end seat (2/25) or a non end seat (23/25).
In case 1, the chance of the second chap (assuming he also chooses a seat at random) sitting next to him is 1/24. In the case 2 (non-end seat) it is 2/24.
By using a simple diagram, I get the probability of adjacent seats to be 48/625. It is a conditional probability (Bayesian) problem. The probability is the green area (2 + 46 = 48) divided by the total area (25 x 25 = 625)
seating_diagram by Winky, on Flickr
For the 20 seat case, by the same logic it is 38/400
Hi winky,
The "Phew!" etc, only referred to the (UK) "lottery" element, as mentioned by Lionel.
I typed my post then realised just before posting that others would simply use the Webb to check, so thought i'd best do that also, and quickly !
However, I am more confident about my 0.08 and 0.1 than before, but not absolutely 100% (just 99.9% )
Phew !
Just looked ! all is ok !
I think you guys are making it too complex. First guy randomly takes a seat. He could take and end seat (2/25) or a non end seat (23/25).
In case 1, the chance of the second chap (assuming he also chooses a seat at random) sitting next to him is 1/24. In the case 2 (non-end seat) it is 2/24.
By using a simple diagram, I get the probability of adjacent seats to be 48/625. It is a conditional probability (Bayesian) problem. The probability is the green area (2 + 46 = 48) divided by the total area (25 x 25 = 625)
seating_diagram by Winky, on Flickr
For the 20 seat case, by the same logic it is 38/400
hmmmmm !!
Your figures are VERY close to mine. Mine are 0.08 and 0.1 respectively and yours are 0.077 to 2 dp and 0.095 respectively.
I didn't think my logic was at all complicated.
For the 25 guest version................
There are 24 x 2 ways in which a pair can sit together. ie 24 combinations x 2 because for each combination the pair could be L/R or R/L.
The number of ways in which 25 people could choose to sit is 25!
Treating the "Pair" as a single unit means we are looking at the probability of seating that pair together as (2x24!)/(25!)
Which reduces to 2/25 or 0.08
Similarly (2x19!)/(20!) reduces to 0.1
But keeping it simple doesn't necessarily make mine right ......................I think we need a few more experts to join in before we reach a conclusion .................even ken c might be having second thoughts
I think mine is slightly wrong. When the second person sits there are only 24 seats left, of course. I think my answer therefore should be:
48/(24 x 25) = 0.8000 for the 25-person case
and
38/(19 x 20) = 0.1000 for the 20-person case
So we agree!
(2x24!)/(25!)
Which reduces to 2/25 or 0.08
Similarly (2x19!)/(20!) reduces to 0.1
are indeed correct.
thanks for looking in guys -- very interesting analyses!
you can now advise Naim Audio that they should invite more than 20 'demoees' to reduce the chance of a tiresome 'which cable is better' argument to less than 10%
enjoy
ken
Phew !
Just looked ! all is ok !
I think you guys are making it too complex. First guy randomly takes a seat. He could take and end seat (2/25) or a non end seat (23/25).
In case 1, the chance of the second chap (assuming he also chooses a seat at random) sitting next to him is 1/24. In the case 2 (non-end seat) it is 2/24.
By using a simple diagram, I get the probability of adjacent seats to be 48/625. It is a conditional probability (Bayesian) problem. The probability is the green area (2 + 46 = 48) divided by the total area (25 x 25 = 625)
seating_diagram by Winky, on Flickr
For the 20 seat case, by the same logic it is 38/400
hmmmmm !!
Your figures are VERY close to mine. Mine are 0.08 and 0.1 respectively and yours are 0.077 to 2 dp and 0.095 respectively.
I didn't think my logic was at all complicated.
For the 25 guest version................
There are 24 x 2 ways in which a pair can sit together. ie 24 combinations x 2 because for each combination the pair could be L/R or R/L.
The number of ways in which 25 people could choose to sit is 25!
Treating the "Pair" as a single unit means we are looking at the probability of seating that pair together as (2x24!)/(25!)
Which reduces to 2/25 or 0.08
Similarly (2x19!)/(20!) reduces to 0.1
But keeping it simple doesn't necessarily make mine right ......................I think we need a few more experts to join in before we reach a conclusion .................even ken c might be having second thoughts
I think mine is slightly wrong. When the second person sits there are only 24 seats left, of course. I think my answer therefore should be:
48/(24 x 25) = 0.8000 for the 25-person case
and
38/(19 x 20) = 0.1000 for the 20-person case
So we agree!
This must almost be a first brilliant !
(2x24!)/(25!)
Which reduces to 2/25 or 0.08
Similarly (2x19!)/(20!) reduces to 0.1
are indeed correct.
thanks for looking in guys -- very interesting analyses!
you can now advise Naim Audio that they should invite more than 20 'demoees' to reduce the chance of a tiresome 'which cable is better' argument to less than 10%
enjoy
ken
I had presumed that your question was purely hypothetical ken...............
..............you know full well that ALL 25 (or 20) participants would have strong an varied opinions about cables these days and they would squabble all day about cables, then DSP, then source-first, then cd v LP then..................this is a dead-cert; 1.0; 100%
Great A Level questions btw ken.
Phew !
Just looked ! all is ok !
I think you guys are making it too complex. First guy randomly takes a seat. He could take and end seat (2/25) or a non end seat (23/25).
In case 1, the chance of the second chap (assuming he also chooses a seat at random) sitting next to him is 1/24. In the case 2 (non-end seat) it is 2/24.
By using a simple diagram, I get the probability of adjacent seats to be 48/625. It is a conditional probability (Bayesian) problem. The probability is the green area (2 + 46 = 48) divided by the total area (25 x 25 = 625)
seating_diagram by Winky, on Flickr
For the 20 seat case, by the same logic it is 38/400
seating_diagram by Winky, on Flickr
Updated diagram agreeing with 8%
Phew !
Just looked ! all is ok !
I think you guys are making it too complex. First guy randomly takes a seat. He could take and end seat (2/25) or a non end seat (23/25).
In case 1, the chance of the second chap (assuming he also chooses a seat at random) sitting next to him is 1/24. In the case 2 (non-end seat) it is 2/24.
By using a simple diagram, I get the probability of adjacent seats to be 48/625. It is a conditional probability (Bayesian) problem. The probability is the green area (2 + 46 = 48) divided by the total area (25 x 25 = 625)
seating_diagram by Winky, on Flickr
For the 20 seat case, by the same logic it is 38/400
seating_diagram by Winky, on Flickr
Updated diagram agreeing with 8%
I like your diagrams winky. They certainly help to visualise what's going on.
I had to sketch a couple of diagrams before I managed to get my 0.08 and 0.1.
A Level results out today and I would say that on balance this forum did rather well in Maths...................
.............so far, but, to continue.................
another rather straight forward warm up question:-
Simplify the expression (x - y)( x^2 + xy + y^2)
(You can check your simplification by substituting x=3 and y=2 in both the original and your simplified version)
A Level results out today and I would say that on balance this forum did rather well in Maths...................
.............so far, but, to continue.................
another rather straight forward warm up question:-
Simplify the expression (x - y)( x^2 + xy + y^2)
(You can check your simplification by substituting x=3 and y=2 in both the original and your simplified version)
x^3 - y^3
Another Bayesian problem....
Assume a certain disease that has a frequency in the general population of 1:10,000. A test exists that is "95% accurate". That is it it will give correct results 95% of the time, but 5% of the time that a carrier is tested, it will show a false negative; and 5% of the time it will show a false positive for someone who is clear of the disease.
A person presents for a random screening test. No other indicators or symptoms are present. They test positive. What is the chance they actually have the disease?
Another Bayesian problem....
Assume a certain disease that has a frequency in the general population of 1:10,000. A test exists that is "95% accurate". That is it it will give correct results 95% of the time, but 5% of the time that a carrier is tested, it will show a false negative; and 5% of the time it will show a false positive for someone who is clear of the disease.
A person presents for a random screening test. No other indicators or symptoms are present. They test positive. What is the chance they actually have the disease?
The number of False-Positives is very high at 5%, so I guess the probability of actually having the disease is quite low ?
In a population of (say) 1 million, only about 100 would actually HAVE the disease (your 1 in 10,000), but about 50,000 would test False Positive (your 5%)
So the probability of actually having the disease would be about 100 in 50,000 (say 1 in 500) or about 0.2%
This all seems somewhat counter-intuitive. So i'll sleep on it unless someone with more confidence gives a better and more intuitive analysis eg one of our resident Doctors who must be dealing with this sort of thing every day ?
Another Bayesian problem....
Assume a certain disease that has a frequency in the general population of 1:10,000. A test exists that is "95% accurate". That is it it will give correct results 95% of the time, but 5% of the time that a carrier is tested, it will show a false negative; and 5% of the time it will show a false positive for someone who is clear of the disease.
A person presents for a random screening test. No other indicators or symptoms are present. They test positive. What is the chance they actually have the disease?
The number of False-Positives is very high at 5%, so I guess the probability of actually having the disease is quite low ?
In a population of (say) 1 million, only about 100 would actually HAVE the disease (your 1 in 10,000), but about 50,000 would test False Positive (your 5%)
So the probability of actually having the disease would be about 100 in 50,000 (say 1 in 500) or about 0.2%
This all seems somewhat counter-intuitive. So i'll sleep on it unless someone with more confidence gives a better and more intuitive analysis eg one of our resident Doctors who must be dealing with this sort of thing every day ?
false positives by Winky, on Flickr
I get 499.95 false positive Vs 0.95 true positives. The answer is 0.95/(0.95+499.95) = 0.19% chance they have the disease. The positive test has increased their chance from a background of 1/10,000 or 0.01% chance, though. It has increased their chance of having the disease "by 20 times" would scream the alarmist headline.
The lesson is that some of these things are indeed counter-intuitive. For rare diseases, global random screening tests that don't use some pre-conditional sorting to select a subset in which the disease is much less rare are very difficult to justify. And that a small risk can be multiplied many times and still be a small risk.
The same result in formulas:
If 'A' is the event that someone has the disease (p(A)=1/10000) and 'B' is the event that a test scores positive (p(B) yet to determined), then we want to know the conditional probability p(A|B):
Given that (B) the test is positive how likely is it that (A) the patient has the disease?
Using Bayes' theorem one can determine p(A|B) via the formula:
p(A|B) = p(B|A)*p(A)/p(B)
We have p(B|A) (95%), p(A) (1/10000) but we still need p(B), which is the sum
p(B) = p(B|A)*p(A) + p(B|not A)*p(not A)
p(not A) is 1-p(A) and p(B|not A) is 5%. This leads to
p(B) = 0.95/10000 + 0.05*0.9999 ≈ p(B|not A) = 5%
And for p(A|B)
p(A|B) = 0.95/10000/0.05 = 0.19% ≈ 20*p(A)
So if the test scores positive, the probability that the patient has the disease is approximately 0.2%.
If the probability p(B|not A) was lower, e.g. 0.1%, then p(A|B) would be
p(A|B) = 0.95/10000/(0.95/10000+0.001*0.9999) = 8.67%
and the test would be more reliable.
The same result in formulas:
If 'A' is the event that someone has the disease (p(A)=1/10000) and 'B' is the event that a test scores positive (p(B) yet to determined), then we want to know the conditional probability p(A|B):
Given that (B) the test is positive how likely is it that (A) the patient has the disease?
Using Bayes' theorem one can determine p(A|B) via the formula:
p(A|B) = p(B|A)*p(A)/p(B)
We have p(B|A) (95%), p(A) (1/10000) but we still need p(B), which is the sum
p(B) = p(B|A)*p(A) + p(B|not A)*p(not A)
p(not A) is 1-p(A) and p(B|not A) is 5%. This leads to
p(B) = 0.95/10000 + 0.05*0.9999 ≈ p(B|not A) = 5%
And for p(A|B)
p(A|B) = 0.95/10000/0.05 = 0.19% ≈ 20*p(A)
So if the test scores positive, the probability that the patient has the disease is approximately 0.2%.
If the probability p(B|not A) was lower, e.g. 0.1%, then p(A|B) would be
p(A|B) = 0.95/10000/(0.95/10000+0.001*0.9999) = 86.7%
and the test would be more reliable.
Nice. I always go to the diagram for conditional probability. I am a visual person, I guess. To tighten the results, as you say, a better test (lower false positive outcomes) really helps. So does a pre-screen that uses assessment of risk factors to lower P(A) in the tested population from the 1:10,000 occurrence. This can focus screening even if their are false negatives in the pre-screen.
Ah ha !
I now see that I could tidy up my initial figures (without changing any of the principles) and use precise numbers rather than the rounded off ones I initially used.
In a population of 1,000,000 the number with the disease will be 100. The number without will be 999,900.
Of these 999,900 5% will be False positives ie 49,995
Of the 100 with the disease, only 95 will test positive.
So the total number of people testing positive will be 49,995 + 95 = 50,090
and the probability of someone testing positive of actually having the disease will be 95/50,090 = 0.1897%
This is the same as winky's figures (which were rounded off to 2dp) but slightly different to fritzen's (who gets 0.19% precisely)
But I guess we are al pretty close to the mark at 0.2%
This is the same as winky's figures (which were rounded off to 2dp) but slightly different to fritzen's (who gets 0.19% precisely)
But I guess we are al pretty close to the mark at 0.2%
That's because I've rounded the intermediate result for p(B) from 5.009% to 5%. Otherwise the result would have been 0.1897% too. So the three calculations are equivalent.
As an extension of the original problem:
What is the probability that a patient whose test is negative is indeed without disease?