Probability question: What is the chance that the third number is the largest?
Asked by
PhiNotPi (
12686)
July 31st, 2011
There are three numbers A, B, and C. “A” could be any real (not just integers) number between 1 and 5, both inclusive, with equal probability. “B” could be any number between 2 and 4. “C” could be any number between 1 and 7.
What is the chance that C is greater than both A and B?
Observing members:
0
Composing members:
0
15 Answers
53/105
i may be wrong though
ah i just saw the “Not just integers”
disregard my post, i suck c-
Hmmm… of course there are an infinite number of real numbers between 1 and 5, but it’s four times as many numbers as exist between 1 and 2 (some infinities are bigger than others). I’m going to call the infinite number of real numbers that exist between two consecutive integers x.
So there’s 4x numbers in A, 2x numbers in B, and 6x numbers in C. The number of possible permutations of A,B,C is 48x.
If C is anything between 5 and 7 (2x numbers) then it will definitely be larger than both A and B, regardless of the values of A and B. So for 16x out of 48x permutations, this will definitely be true.
If C is between 1 and 2 it will definitely be smaller than B, regardless of what A and B are. So that’s 8x out of 48x permutations where it’s false.
If C is between 2 and 5, it starts getting a lot trickier. Let me think about this for a moment.
You always ask such stimulating math questions, @PhiNotPi. Lurve.
@Mariah Well, if C is between 4 and 5, then we can ignore B and just focus on C. But the hardest part would be between 2 and 4. I thought about the graphical approach, where you use geometry and areas to solve the problem, but that only works with two unknowns, not three. We would need to have some sort of 3D visualization, but I don’t know what that would look like.
In my above response “and just focus on C” should be “and just focus on A”.
Okay, so doing this geometrically was a really really good suggestion. That’ll absolutely work.
So if we were just comparing A to C, for example, we’d graph A on the x axis, C on y. Draw a rectangle of dimensions [1,5]x[1,7] and the total area is the denominator of your probability. The portion of the rectangle located above the line y=x is the numerator of the probability. It seems almost suspiciously simple now.
Taking that to three dimensions adds only a small amount of difficulty. It’ll be a rectangular prism of dimensions [1,5]x[2,4]x[1,7]. The total volume of this prism is your denominator (so 48, as I was getting at above) and your numerator will be the volume that results when you unite z>x U z>y. Fortunately everything’s linear here. I’m not the best at picturing 3D objects in my head so give me a minute while I puzzle this one out…
Wow, sorry that took so long. I drew the shape in a 3D modeling program, did the union, and broke the resulting solid into smaller solids that we have formulas to compute the volume for. I’m sure there’s a more elegant way to do it, but this should work. The answer I got for the numerator is 27.6 repeating or 83/3. I’m trying to figure out now if that could be right, because I’m not sure it makes sense with a non-integer numerator.
@Mariah
“Hmmm… of course there are an infinite number of real numbers between 1 and 5, but it’s four times as many numbers as exist between 1 and 2 (some infinities are bigger than others).”
All intervals have the same cardinality; given any two intervals, there is a bijection between them.
@ratboy…Really? My intuition says there is an infinite number of real numbers between 0 and 1, but it is a subset of, say, the interval from 0 to 4, which contains 4 “infinities” equal in size to that between 0 and 1. But then, the concept of infinity is so rarely intuitive, I would not be too surprised if I was wrong. If you could link me to a proof or explanation, that’d be fantastic.
Oof. Infinity goes against intuition yet again. Thanks.
@Mariah A non-integer numerater is ok, because you have set the demoninater. If the answer to a problem was ½, but we set the denominater to be 3, the numerater would turn out to be 1.5, which is a non-integer. The actual answer would not change.
I read something about the sizes of infinity once. Odd numbers are the same size as whole numbers, which have the same size as integers, which has the same size as rational numbers, which has the same size as the rational numbers on the complex plane, but which is infinitely smaller than all real numbers. Weird things happen.
@PhiNotPi Yeah, I should have known from the start I was wrong on the infinity thing, because I’ve read that before about odd numbers, whole numbers, and integers. I can’t completely reconcile how a subset can be the same size as the set, but you put it best….weird things happen. I wouldn’t have it any other way; the weirdness is so awesome.
Just apply the principle favorable divided by all possibilities. Works for all sorts of probability questions.
@mattbrowne That doesn’t really help. There are infinitely many possibilties for each variable.
I ran a Monte Carlo simulation in Python3 with 1,000,000 trials and the odds that C is greater than A and also greater than B is 0.576637, or 57.6637%.
Here’s the code (unfortunately Fluther mangels the indentations which are critical in Python):
import random
def simulateProbabilityTrial():
””“returns True if C > A and C > B”””
A = random.uniform( 1.0, 5.0 )
B = random.uniform( 2.0, 4.0 )
C = random.uniform( 1.0, 7.0 )
if C > A and C > B:
return True
else:
return False
trialSize = 1000000
i = 0
successCount = 0
while i < trialSize:
if simulateProbabilityTrial() is True:
successCount += 1
i += 1
print( “Probability = ”, (successCount / trialSize) )
Answer this question
This question is in the General Section. Responses must be helpful and on-topic.