Top entries
- I am the reason for Hungarian notation in Android
- Dynamic language, refactoring: pick one
- Announcing Kobalt 1.0
- The Kobalt diaries: Templates
- Hardcore multicore with TestNG
- More on parallel topological sorting
- The return of statically typed languages
- Structural typing vs/ duck typing
- Agile people still don’t get it
- Various ways to get randomness wrong
- Coding challenge
- Coding challenge wrap up
Recent Comments
- Laurent Simon on It’s called Dependency “Injection” for a reason
- Michael Bayne on It’s called Dependency “Injection” for a reason
- pj on What Kotlin could learn from Rust
- John on What Kotlin could learn from Rust
- Cedric on What Kotlin could learn from Rust
Archives
- February 2023
- May 2022
- November 2021
- October 2021
- June 2021
- January 2021
- September 2020
- August 2020
- July 2020
- June 2020
- July 2017
- March 2017
- February 2017
- August 2016
- June 2016
- May 2016
- April 2016
- February 2016
- January 2016
- November 2015
- October 2015
- August 2015
- July 2015
- June 2015
- May 2015
- April 2015
- March 2015
- December 2014
- July 2014
- June 2014
- May 2014
- January 2014
- August 2013
- July 2013
- March 2013
- February 2013
- January 2013
- December 2012
- September 2012
- August 2012
- July 2012
- June 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- April 2009
- March 2009
- February 2009
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006
- February 2006
- January 2006
- December 2005
- November 2005
- October 2005
- September 2005
- August 2005
- July 2005
- June 2005
- May 2005
- April 2005
- March 2005
- February 2005
- January 2005
- December 2004
- November 2004
- October 2004
- September 2004
- August 2004
- July 2004
- June 2004
- May 2004
- April 2004
- March 2004
- February 2004
- January 2004
- December 2003
- November 2003
- October 2003
- September 2003
- August 2003
#1 by Danil on October 27, 2011 - 2:05 pm
HHH = A
HHT = B
HTH = B
HTT = C
THH = B
THT = B
TTH = B
TTT = D
25%
“It’s all in the wrist.”
#2 by Danil on October 27, 2011 - 2:06 pm
‘cept that I threw in some Bs that should be Cs π
#3 by Cedric on October 27, 2011 - 2:06 pm
Wrong π
#4 by Cedric on October 27, 2011 - 2:06 pm
Still wrong π
#5 by tjsnell on October 27, 2011 - 2:16 pm
You should switch doors.
#6 by HimJim on October 27, 2011 - 2:24 pm
0
#7 by Cerdeira on October 27, 2011 - 2:40 pm
The right answer is 50%
Because the probability is 25% but because you have 2 25% in 4 possible π 2/4 = half so 50% π
My brain is hurting me π
Cheers,
JoΓ£o Cerdeira
#8 by Daniel Spiewak on October 27, 2011 - 3:06 pm
Here’s the trick: the answer 25% appears twice, thus it cannot be correct since, if it were, the correct answer would be 50% instead of 25%. Unfortunately, 50% is also incorrect, since it only appears once, and this the probability of selecting *that* answer at random is 25%, not 50%. By a similar argument, we can eliminate 60%. Thus, there is no correct answer to this question.
In other news: this is awesome.
#9 by Cedric on October 27, 2011 - 3:11 pm
Daniel: it is awesome indeed. And your answer is incorrect π
#10 by Uncle Bob on October 27, 2011 - 3:14 pm
A question that appeared on a chemistry exam:
Write a question suitable for a chemistry exam and then answer it.
#11 by Pedro Furlanetto on October 27, 2011 - 3:21 pm
I got the same conclusion you did but at the G+
#12 by Pedro Furlanetto on October 27, 2011 - 3:59 pm
I meant “Daniel, I got the same conclusion you did but at the G+”
#13 by Michael Chermside on October 27, 2011 - 4:10 pm
Like Daniel said, except that the answer is 0 percent. The question never stated that the answer must be A, B, C, or D. And I am assuming that “chose an answer at random” means to choose from amongst A, B C, and D with uniform likelihood.
#14 by Runar on October 27, 2011 - 4:21 pm
The question has a type error, and the answer is bottom. It’s an infinite regression that alternates between 25% and 50% but never converges.
I’m sorry, but paradoxes are not profound. Bottoms lead to nontermination, not enlightenment.
#15 by Cedric on October 27, 2011 - 4:26 pm
Runar: wow, you must be fun at parties π
Anyway, your answer is wrong. There is a correct answer and it’s one of the four listed. No tricks.
Having said this, you are touching on something interesting with your “type error” observation, which I’ll cover in my answer.
#16 by Daniel Spiewak on October 27, 2011 - 4:28 pm
So, there’s something a little interesting about the fact that we’re choosing an answer uniformly at random. Thus, we have a 50% chance of selecting 25%, and a 25% chance of selecting 50%. This, I believe, is the key to the answer…
0.25 * 0.5 = 0.125
0.5 * 0.25 = 0.125
0.125 + 0.125 = 0.25
Thus, the correct answer is 25%, which is to say, both A and D.
#17 by rdm on October 27, 2011 - 5:23 pm
If “choose an answer to this question at random” means pick one option from {A,B,C,D{ then 50% of the answers will be 25%, 25% of the answers will be 50%, and 25% of the answers will be 60%. If it means pick a distinct value from the set 25%, 50%, 60% then the answers would be 1/3 of each. Since a 1/3 probability has nothing to do with the available answers let’s ignore that.
That leaves the question of “correctness”. And a question here is whether there is a single correct value or whether there is a series of correct values. But let’s assume that there is a single correct value. But, that single correct value depends on what “correctness” means. One possibility is that correctness corresponds to the numerical values listed. But this concept leads to contradictions. Another possibility is that there is one correct answer and that that answer is either A, B, C or D and that we do not know what that answer is.
If this latter definition of correctness is being used (and it’s sadly representative of educational testing), then the answer is obvious.
#18 by Rik on October 27, 2011 - 8:35 pm
It depends on the answer. If answer is 25%, it is 50%. Otherwise 25%.
#19 by Micharl on October 27, 2011 - 10:08 pm
The answer is B
#20 by Patrick Gras on October 27, 2011 - 11:27 pm
There is 0% chance I will be correct,
because if I may choose:
25% with 50% of chances
50% with 25% of chances
60% with 25% of chances
but I have no chance to choose:
X% with X% chances…
#21 by Dominique Gallot on October 27, 2011 - 11:31 pm
If you carefully read the question, you will understand that there are no correct answers
ΒIf YOUΒ, so the number of answer is 1, your result can be only wrong or correct. Therefore the only valid responses are 0% or 100%, which anyway are not in the list.
#22 by Maarten on October 27, 2011 - 11:56 pm
e. 20%
#23 by RaphaΓ«l Jolly on October 28, 2011 - 12:14 am
The question doesn’t imply that the answer is in the list. So, 0%
#24 by fischi on October 28, 2011 - 12:35 am
Dominique, i think you are on the right track.
Noone said you had to choose an answer from the given (4) choices – so there a two theories:
* it is an open question, so the possibility of random answers is infinite, therefore the propability of getting it right is nearly 0%. as 0% is not listed, i assume the question to be yes or no.
* in this case, randomly chosen, you get the 50% propability.
The answer (if you follow this type of thinking) would be B, 50%.
Cedric will tell us, if i got it right. If it is purely mathematical AND you have to choose from the FOUR answers given, i will have to reconsider π
#25 by Denis on October 28, 2011 - 1:01 am
50% because probability of 25% is 2/4 = 0.5 = 50%. There is no such thing as “depends” because only 25% is the correct answer.
#26 by Dennis Lenaerts on October 28, 2011 - 1:45 am
By “choosing an answer at random”, you do mean de set of possible answers is {A,B,C,D}, and the probabilities are uniformly distributed across all four answers, right?
If not, you could just choose within {A,B} with 1/2 probability for each answer, and B would be correct.
#27 by Kevin Wright on October 28, 2011 - 2:20 am
I say it’s a bit of a trick question. It doesn’t state that your answer absolutely must be one of those listed.
There’s a 25% chance that you’ll pick 50%
A 25% chance that you’ll pick 60%
and a 50% chance that you’ll pick 25%
Therefore, the chance that you’ll be correct by randomly choosing one of the listed answers is 0%
#28 by Michael on October 28, 2011 - 2:47 am
If you choose your answer by logic and reason, then your pick is not random any more.
The criterion to decide, if an answer is correct, is to assert, that you have picked truly randomly. So, when you try to pick randomly and i make assertions on each pick (guessing), how often would i assert right?
I would flip a coin.
#29 by Manu on October 28, 2011 - 3:22 am
the probability that it’s not 25% are 50%, for 50% it’s 25% and for 60% it’s also 25% hence:
0.25 *0 .5 = .125
0.5*0.25= 0.125
0.6*0.25=0.15
this adds up to a probability of 40% that it’s none of the answers so the probability should be 1-0.4 which leaves us with 60%
#30 by fla on October 28, 2011 - 7:24 am
One random answer ? It could be anything. So my guess is that i have 1/infinity to find the correct answer π
#31 by adam on October 28, 2011 - 8:30 am
the answer is 1
#32 by John O'Brien on October 28, 2011 - 9:01 am
Suppose we take a different problem as our starting point.
Assuming that we have two options, option A and option B, and the correct answer is 10% of the time is option A, and 90% of the time is Option B. If we chooose either option randomly, and we have
an equal chance of choosing either option, what are the chances we choose the correct option?
In order to answer this problem, we need to figure out what the chances are that the correct answer will be option A, and we will choose option A, or that the correct answer will be option B, and
we will choose option B.
So..
Option Chance it is Correct Chance we Chose this Option Percentage of the Time we Chose Correctly
A 10% 50% 5%
B 90% 50% 45%
So, for option A, it is the correct answer and we choose it as the correct answer 10% * 50% of the time = 5% of the time.
For option B, we choose it and it is the correct answer 90% * 50% = 45% of the time.
Adding them together, 5% + 45% of the time = 50% of the time we choose the correct answer, if we choose randomly.
Now let’s notice something interesting about this problem. Since the chance that Option A is correct or Option B being correct in sum is 100% (10% + 90% = 100%), we don’t actually need to know that
chance that option A is correct or the chance that option B is correct. Indeed, since they sum to 100%, and the chance that we choose either one is 50%/50%, any combination of the chance that A is
correct or that B is correct will yield the same percentage of the time we choose the correct answer (that is, 50%).
This will be true so long as the chance that we choose either option is evenly split, and the chance that all options are correct sums to 100%.
Now, if we add four options, and do the same calculation, we get that there is a 25% chance that we choose the right answer.
Option Chance is it Correct Chance we Chose this Option Percentage of the Time we Chose Correctly
A 25% 25% 6.25%
B 25% 25% 6.25%
C 25% 25% 6.25%
D 25% 25% 6.25%
6.25% + 6.25% + 6.25% + 6.25% = 25%
But, hang on, you say, if that is the case, then the correct answer is both A and B.
Okay, I say. So, let’s articulate that as another table, where choosing option A is correct 100% of the time, and choosing option D is correct 100% of the time. Now we end up in a very different circumstance than in the first case, when we just had options A and B. Since the two options are correct, the sum chance that of any option being correct is 200%, not 100%.
Chance it is Correct Chance we Chose this Option Percentage of the Time we Chose Correctly
A 100% 25% 25%
B 0% 25% 0%
C 0% 25% 0%
D 100% 25% 25%
50.00%
Which would make the *real* correct answer 50%. Does that mean that the real correct answer is to say that 50% was correct 100% of the time?
Let’s articulate that as another table, where choosing option D is correct 100% of the time.
Chance it is this option Chance we Chose this Option Percentage of the Time we Chose Correctly
A 0% 25% 0%
B 100% 25% 25%
C 0% 25% 0%
D 0% 25% 0%
25%
So it appears we have a paradox. If the correct answer is 25%, then we will choose that answer 50% of the time. If the answer is 50%, then we will choose that answer 25% of the time.
Of course, part of the problem is the phrasing “if you choose to answer this question at random,” which is imprecise. I have taken it to mean if you chooose one of the four options randomly, with
an equaly chance of choosing any of the four options.
If instead (as other commenters have noted) you take the whole answer set as the options to choose among (so the correct answers to choose are either 25%, 50%, or 60%), then the problem does have a
solution, but it is not one of the solutions listed.
Chance it is this option Chance we Chose this Option Percentage of the Time we Chose Correctly
A 33% 33% one ninth
B 33% 33% one ninth
C 33% 33% one ninth
33%
What if, instead, we presume that “correctness” is intepreted not as the dereferenced value of the answer (where the answer is 25%), but instead as a specific answer (say, either option A or D).
If that is the case, there there are two circumstances. A has 100% chance of being right, and D has 0% chance. Or D has 100% chance of being right, and A has 0% chance.
Chance it is this option Chance we Chose this Option Percentage of the Time we Chose Correctly
A 100% 25% 25%
B 0% 25% 0%
C 0% 25% 0%
D 0% 25% 0%
25%
Chance it is this option Chance we Chose this Option Percentage of the Time we Chose Correctly
A 0% 25% 0%
B 0% 25% 0%
C 0% 25% 0%
D 25% 25% 25%
25%
Either way, 25% is still the right answer, if you define “correctness” as being possible to be applied to just A or D. This circumstance is possible in a computer system (imagine a system that blindly takes just A as the right answer, ignoring the fact that D has the same value), but may be harder to imagine with a human grader.
#33 by Rochester on October 28, 2011 - 9:41 am
Right answer: What a waste of time!
#34 by dave on October 28, 2011 - 10:01 am
C.
When guessing at multiple choice questions, people choose C 60% of the time. I’m totally making that up, but it sounds good π
#35 by Marcel on October 28, 2011 - 10:39 am
One solution:
First we should know the question to the optional answers. If we know the question, we can determine the correct answer. Based on the correct answer we can determine the probability of chosing the correct answer randomly (if the correct answer should be listed as an optional answer at all).
As the question itself is unknown, we cannot determine the probability as “this question” cannot refer to the question “, what is…”.
Second solution:
If “this question” should refer to the question “, what is…”, the result would be:
An answer to this ‘question’ cannot be determined. As I cannot see the answer ‘cannot be determined’ under A,B,C or D, the probability is 0%.
#36 by Leon on October 28, 2011 - 7:59 pm
The tricky part of course is formalizing the problem. “If *you* choose an answer to this question at random” means you are making a sequence of random choices, and then see how frequently the particular probability you pre-selected appears in that sequence. So, for example, there is a chance that you pick option C and see it 60% of the time in a particular random sequence, although that chance is obviously small.
Let’s consider a set of all possible sequences, and see how many of them will yield the right answer for each selection. After N choices made, we have 4 ^ N sequences (ignore for now that A and D are same, we’ll get to it later), each of them equally probable. How many of those have option B appearing at 50% rate? That’s choose N/2 out of N, or N!/ ((N/2)! ^ 2) multiplied by the number of remaining 3 choices (A, C, and D) in the other N/2 positions, which is 3 ^ (N/2), so we get:
(N! / ((N/2)! * (N/2)!)) * (3 ^ (N/2)) / 4 ^ N
For choice C we get:
(N! / ((N * 3/5)! * (N * 2/5)!)) * (3 ^ (N * 2/5)) / 4 ^ N
Finally, for A and D, if they were not the same, we’d get:
(N! / ((N * 3/4)! * (N/4)!) * 3 ^ (N * 3/4)) / 4 ^ N
But since A and D are the same, we have 2 ^ (N/4) ways to pick the positions for 0.25% probabilities, and only 2 (instead of 3) for the remaining ones, which is:
(N! / ((N * 3/4)! * (N/4)!) * 2 ^ (N/4) * 2 ^ (N * 3/4)) / 4 ^ N
Now, what shall we pick for N? It’s clear that as N is getting larger, probability of getting *any* of the answers *exactly* approaches 0. To understand what’s going on here, think how likely it is to flip a coin 100 times and get heads exactly 50 times. What about getting exactly 500 out of 1000? Although rate of heads will aproach 50%, probability of getting exactly half heads will reduce as number of attempts grows.
So let’s try different values for N:
N = 1 obviously doesn’t work
N = 2 gives 3/8 for option B, and can’t possibly work with A, C, and D
N = 3 can’t possibly work
N = 4 gives 27/128 for B, can’t work for C, and it gives 1/4 for A and D (25%, hooray!)
Wth N > 4 the probabilities go down as expected, for example, with N = 8 we get 7/64 for options A and D. It’s clear that larger values of N can’t possibly work.
In other words, out of all 256 (4 ^ 4) possible sequences of 4 choices, 64 have either A or D occuring only once.
Thus we can say that if you make a large number batches of 4 random choices, you’ll find out that a single 25% choice occurs in about 1/4 of them.
#37 by DR NASH on October 29, 2011 - 9:02 am
Right Answer = 0,33…
Pingback: Solution to the quiz « Otaku, Cedric's blog
#38 by Satish on October 29, 2011 - 7:46 pm
I consider myself an unlucky person while answering such questions hence the probability of my answer being right will be always on lower side. So I would choose A or D. But since I am not lucky, this might be an wrong answer so the right answer might be B or C. Among B and C, it’s C if i choose B and it’s B if i choose C.
#39 by Lars Bengtsson on October 30, 2011 - 3:17 am
The chance to choose a correct answer is 50%. Because the correct answers are A and D.
The question can be divided into two parts.
1) choose an answer at random
2) what is the probability the choise is correct.
As Cedric said the ANSWER is among a,b,c,d. But there is no restriction that the answer to 2) is the same as the answer to 1).
#40 by Dave on October 30, 2011 - 1:36 pm
Depends on who grades the answer, since the idea of correctness is clearly subjective:
– If I grade the answer, then it’s 100%
– if someone else does, it’s 0%
Since the problem states I get to choose the answer, then I’m going to pick the right one (42) and there’s a 100% chance I’m right.
A follow-on question is whether someone could prove an algorithm halts if no meta-coding (self-modifying, reflective, etc.) is disallowed.
#41 by Markus on October 31, 2011 - 1:11 pm
It’s a bit unclear what ‘this question’ is, sounds like a trick π
I’d say: one third.
#42 by Matthew on November 1, 2011 - 7:04 am
1/3
#43 by relegation on November 1, 2011 - 11:41 pm
E None of the above
#44 by Phil Mac on November 2, 2011 - 2:00 am
Um..
The answer is B.
Choosing an answer to ‘this’ question at random..
So you can only be either ‘right’ or ‘wrong’.
So it’s 50%.
No?
#45 by Jouni on November 2, 2011 - 9:52 pm
The solution given behind the link on the top of this page is incorrect.
The right answer is as follows:
If we know nothing about the distribution, the chance to answer right by random is anywhere between 25% and 50%. If we can assume that the distribution is uniform, the chanced to get the answer right by random is 1/3. Thus, none of the given options is the right answer.
Pingback: La respuesta | La Naturaleza Del Software
#46 by Henk on February 26, 2012 - 2:03 pm
In multiple choice questions, the correct answer never appears twice in the listed options, so A and D are incorrect. So either B or C are correct, and if I were to choose an answer from those two at random, I’d have a 50% chance of being right. So the right answer is B.