Brain Teasers
Prime Probability
Probability
Probability puzzles require you to weigh all the possibilities and pick the most likely outcome.Probability
Given any positive whole number, what is the probability it is prime?
Hint
Use Prime Number Theorem.Answer
Zero.Basically, all we need to do is divide the number of prime numbers by the number of positive whole numbers.
But yes, they are both infinite, so we should consider taking the limits.
As in the Prime Number Theorem, PI(x) denotes the number of primes less than x.
We can rearrange this directly to give...
lim[x->infinity] { PI(x)/x} = lim[x->infinity] {1/log x}
Since the right hand side is 0, this gives us 0 for the answer.
(A probability of 0 does not necessarily mean impossible. These situations usually arise when infinite quantities are involved.)
Hide Hint Show Hint Hide Answer Show Answer
What Next?
View a Similar Brain Teaser...
If you become a registered user you can vote on this brain teaser, keep track of which ones you have seen, and even make your own.
Solve a Puzzle
Comments
Beyond Infinity! Beyond me, anyway!
that theorem was . but it was good
I didn't get it Oh well great one anyways
Sorry this is clearly incorrect and very disappointing from someone who claims to be a Maths teacher.
http://primes.utm.edu/howmany.shtml
Follow this link and read consequence 3 of the prime number theorem.
The probability of any number x being a prime number is 1/ln(x).
Intuitively the answer given in this teaser is wrong because if you asked a group of people to select a random integer, obviuously some of those people would select a prime number so the probability is not zero in fact it is not even all that small.
Finally, a probability of zero means it cannot happen despit the comment made in this teaser.
http://primes.utm.edu/howmany.shtml
Follow this link and read consequence 3 of the prime number theorem.
The probability of any number x being a prime number is 1/ln(x).
Intuitively the answer given in this teaser is wrong because if you asked a group of people to select a random integer, obviuously some of those people would select a prime number so the probability is not zero in fact it is not even all that small.
Finally, a probability of zero means it cannot happen despit the comment made in this teaser.
OK, I beg to differ here, you caught me out with dogs thing, but I know what I'm talking about here.
Clearly a human choosing a positive integer is limited to a finite set of integers, and so has a non-zero chance of selecting a prime.
I never mentioned anything about a human choosing an integer, I just said if n is any positive integer.
You have you're wires crossed somewhere here.
And you are also wrong about 0 probability being impossible.
Generally it is, but not always.
Clearly a human choosing a positive integer is limited to a finite set of integers, and so has a non-zero chance of selecting a prime.
I never mentioned anything about a human choosing an integer, I just said if n is any positive integer.
You have you're wires crossed somewhere here.
And you are also wrong about 0 probability being impossible.
Generally it is, but not always.
I did say given any positive integer, so this probability has to hold for all of them.
I suppose it comes down to wording again...
But I am considering the primes as a 'group', not individually.
Hmm, I'll have a think about that
I suppose it comes down to wording again...
But I am considering the primes as a 'group', not individually.
Hmm, I'll have a think about that
You cannot apply the definition of probabiliy to an infinite set unless you can establish an equivalence to a finite set. For example. no matter what finite sample of even natural numbers are selected, the number of odds and evens will be equal. Therefore the probability will be 1/2. The definition says the number of ways the prime number can be chosen (infinite) divided by the number of elements in the sample space (infinite). Infinity is not a number but a way of expressing the unboundedness of a set.
For any finite integer selected, the probability that the selected integer is prime is approximately 1/ln(x). The larger the integer selected, the less chance there is that it will be prime. But in order to have the probability become zero you will have to define an infinitely large integer which you cannot do.
Now this is a complex issue because as the size of the sample space increases, the density of the prime numbers decreases so there is no constant comparison with a finite set.
Also, the density of primes expected after the chosen integer will be small in comparison. Therefore the estimate of 1/ln(x) will become increasingly accurate as x increases. In any case , the answer is clearly not zero.
For any finite integer selected, the probability that the selected integer is prime is approximately 1/ln(x). The larger the integer selected, the less chance there is that it will be prime. But in order to have the probability become zero you will have to define an infinitely large integer which you cannot do.
Now this is a complex issue because as the size of the sample space increases, the density of the prime numbers decreases so there is no constant comparison with a finite set.
Also, the density of primes expected after the chosen integer will be small in comparison. Therefore the estimate of 1/ln(x) will become increasingly accurate as x increases. In any case , the answer is clearly not zero.
So what if I said, n is a positive integer, what is the probability it is even.
I would say 1/2.
Since an integer has a 50,50 chance of being even.
My original question was really about how much space the primes take up.
Well given any epsilon>0, it must be less than epsilon%, since the prime number theorem dictates that they get less dense the deeper you go into the integers.
So basically the primes take up 0% of the positive integers.
Which leads to my original question, and hence the probability of 0.
I would say 1/2.
Since an integer has a 50,50 chance of being even.
My original question was really about how much space the primes take up.
Well given any epsilon>0, it must be less than epsilon%, since the prime number theorem dictates that they get less dense the deeper you go into the integers.
So basically the primes take up 0% of the positive integers.
Which leads to my original question, and hence the probability of 0.
If I select any integer from 1 to 10 the P that it is prime = 4/10.
If I select any integer from 11 to 20 the probability that it is prime is 4/10.
Now If I decide to choose an integer by firstly selecting the range either from 1 to 10 or from 11 to 20 then the probability it is prime is:
0.5 x 0.4 + 0.5 x 0.4 = 0.4
Now I can continue indefinitely extending the range of my numbers and even if I find sets where there are no primes, the probability will be:
0.5 x L + 0.5 x 0 = 0.5 x L where L was the last probability I calculated. It will never be zero although the more times I do this, the smaller it will get.
The problem is if you select an integer then it must be a finite integer, so you cannot select inifinity!
If I select any integer from 11 to 20 the probability that it is prime is 4/10.
Now If I decide to choose an integer by firstly selecting the range either from 1 to 10 or from 11 to 20 then the probability it is prime is:
0.5 x 0.4 + 0.5 x 0.4 = 0.4
Now I can continue indefinitely extending the range of my numbers and even if I find sets where there are no primes, the probability will be:
0.5 x L + 0.5 x 0 = 0.5 x L where L was the last probability I calculated. It will never be zero although the more times I do this, the smaller it will get.
The problem is if you select an integer then it must be a finite integer, so you cannot select inifinity!
All integers are finite, and infinity isn't a real number anyway lol.
Suppose I said to consider the interval [0,10].
The rationals take up 0% of this space, so the probability of a number in [0,10] being a rational is 0.
This is totally different to saying someone chooses a number from [0,10], since they only have a finite subset of [0,10] to choose a number from, then the probability of their number being rational becomes positive.
Its a similar thing with the primes, but it's more difficult, since we are comparing sizes of 2 countable sets, not 1 countable and 1 uncountable.
Suppose I said to consider the interval [0,10].
The rationals take up 0% of this space, so the probability of a number in [0,10] being a rational is 0.
This is totally different to saying someone chooses a number from [0,10], since they only have a finite subset of [0,10] to choose a number from, then the probability of their number being rational becomes positive.
Its a similar thing with the primes, but it's more difficult, since we are comparing sizes of 2 countable sets, not 1 countable and 1 uncountable.
Again not correct. The rationals do not take up 0% of the space. It may be an exceedingly small infinity (aleph 0 )compared to the infinity taken up by the irrationals (aleph 1) but you cannot say because it's very small it is 0. In fact you cannot compare infinities the way you are trying to do.
For example, every number (rational or irrational) between 0 and 1 has a one to one correspondence with another number between 1 and 2 found by simply adding one. Also, every number between 0 and 1 has a one to one correspondence with another number bigger than 1 called its reciprocal. In your language then the space taken up by the numbers between 1 and 2 is the same as the space taken up by all of the numbers bigger than 1. The conclusion must be that there ARE NO NUMBERS BIGGER THAN 2. This is clearly wrong because you cannot count infinities and compare them like you do with finite quantities.
For example, every number (rational or irrational) between 0 and 1 has a one to one correspondence with another number between 1 and 2 found by simply adding one. Also, every number between 0 and 1 has a one to one correspondence with another number bigger than 1 called its reciprocal. In your language then the space taken up by the numbers between 1 and 2 is the same as the space taken up by all of the numbers bigger than 1. The conclusion must be that there ARE NO NUMBERS BIGGER THAN 2. This is clearly wrong because you cannot count infinities and compare them like you do with finite quantities.
Do you realise that I'm refering to Lesbegue Measure, not cardinality(as such) when comparing spaces taken up.
For example (0,1) has lesbegue measure of exactly 1.
The set formed by taking the reciprocal of elements from (0,1) , (where the reciprocal function is clearly bijective) is the interval (0,infinity) which has a lesbegue measure of infinity.
Basically sets of equal cardinalities, (eg formed using bijections) such as (0,1) and (1,infinity) under 1/x, do not necessarily have the same lesbegue measure.
For example (0,1) has lesbegue measure of exactly 1.
The set formed by taking the reciprocal of elements from (0,1) , (where the reciprocal function is clearly bijective) is the interval (0,infinity) which has a lesbegue measure of infinity.
Basically sets of equal cardinalities, (eg formed using bijections) such as (0,1) and (1,infinity) under 1/x, do not necessarily have the same lesbegue measure.
perhaps just say the probability is "virtually zero?" I'm sure this could get an argument also, but I'd venture to guess that even a majority of those who like the math teasers aren't likely to delve so far into the concept behind considering this sort of probability, or even if it is rational to consider it at all. I tend to agree that it cannot be calculated so simply, and that if such a probability exists it would be a very small positive value. But considering both sets under inspection are infinite, or at least one is and one is generally considered to be, it's probably not reasonable to try to calculate. Even taking that into account, I found the proposition thought provoking. I even googled "prime numbers" and printed out some info to chew on. Thanks!
People we don't need a story for a comment!
i know i shouldn't ask but what is the prime number theorum
I have no idea what the prime number therum or whatever it is is. Will someone tell me?
I agree that you really cannot apply probability to a continuum, because you wind up with L'Hopital's rule.
Let me rephrase that. You wind up with a condition that resembles L'Hopital's rule except you don't truly have an equation to apply it to.
As far as I remember the definition of probability, it clearly says that probability is the possibility of occuring of an event from a set of a finite set of possible outcomes. In other words, probability cannot be applied to infinite numbers or infinity. Hence this teaser is wrong and irrelevant. It should be deleted.
As several have commented, it is very tricky going to infinity, so lets stop at a finite number, N. Now what is the probability of drawing a prime?
Contrary to the analysts it is not logn! Over the entire process (global) pP is the number of actual successes, the number of accumulated primes, pi(n), over the total number of possible successes, n. But locally pP is the reciprocal of the size of the local event space which is the size of the gap between primes. Thus, logically, from the two equivalent definitions of pP, we have the prime probability theorem, gap = n/pi(n).
If anyone is interest will be glad to email short ms.
Contrary to the analysts it is not logn! Over the entire process (global) pP is the number of actual successes, the number of accumulated primes, pi(n), over the total number of possible successes, n. But locally pP is the reciprocal of the size of the local event space which is the size of the gap between primes. Thus, logically, from the two equivalent definitions of pP, we have the prime probability theorem, gap = n/pi(n).
If anyone is interest will be glad to email short ms.
As several have commented, it is very tricky going to infinity, so lets stop at a finite number, N. Now what is the probability of drawing a prime?
Contrary to the analysts it is not 1/logn! Over the entire process (global) pP is the number of actual successes, the number of accumulated primes, pi(n), over the total number of possible successes, n. But locally pP is the reciprocal of the size of the local event space which is the size of the gap between primes. Thus, logically, from the two equivalent definitions of pP, we have the prime probability theorem, gap = n/pi(n).
If anyone is interest will be glad to email short ms.
Contrary to the analysts it is not 1/logn! Over the entire process (global) pP is the number of actual successes, the number of accumulated primes, pi(n), over the total number of possible successes, n. But locally pP is the reciprocal of the size of the local event space which is the size of the gap between primes. Thus, logically, from the two equivalent definitions of pP, we have the prime probability theorem, gap = n/pi(n).
If anyone is interest will be glad to email short ms.
Here are two arguments that prove conclusively that the answer given in this teaser is incorrect.
[1] Firstly let us select an integer from the set of integers. According to your assertion here the probability that it is a "one" is zero. Only one possibilty divided by an infinite number in the sample space. Similarly the probability that it is a "two" is also zero. And so on. Thus the probability that it is a 1 or a 2 or a 3 or.. etc is 0 , 0 , 0 etc.
Therefore the probability that it is an integer is the sum of the probabilities of each integer = 0 + 0 + 0... = 0. Thus by your logic, the probability of choosing an integer frfom the set of integers is zero when in fact the correct answer is 1 since it must be by definition an integer.
[2] Secondly, select one integer from the set of integers from 1 to 10. What is the probability it is prime? P = 4/10. Now I will continuously double the sample space. Let me assume that there are no primes between 10 and 20. The the probability is (4/10 + 0) / 2 = 2/10. But since I know that there are primes between 10 and 20, the probability must be higher than this. Thus the actual probability of a prime between 10 and 20 is P(20) > 2/10. doubling again P(40) > 1/10 etc. Doubling the sample space to infinity give me P(n) > limit n-> infinity (0.4 / 2^n) ie P(n) > 0.
Youir method is incorrect and you answer is also incorrect.
[1] Firstly let us select an integer from the set of integers. According to your assertion here the probability that it is a "one" is zero. Only one possibilty divided by an infinite number in the sample space. Similarly the probability that it is a "two" is also zero. And so on. Thus the probability that it is a 1 or a 2 or a 3 or.. etc is 0 , 0 , 0 etc.
Therefore the probability that it is an integer is the sum of the probabilities of each integer = 0 + 0 + 0... = 0. Thus by your logic, the probability of choosing an integer frfom the set of integers is zero when in fact the correct answer is 1 since it must be by definition an integer.
[2] Secondly, select one integer from the set of integers from 1 to 10. What is the probability it is prime? P = 4/10. Now I will continuously double the sample space. Let me assume that there are no primes between 10 and 20. The the probability is (4/10 + 0) / 2 = 2/10. But since I know that there are primes between 10 and 20, the probability must be higher than this. Thus the actual probability of a prime between 10 and 20 is P(20) > 2/10. doubling again P(40) > 1/10 etc. Doubling the sample space to infinity give me P(n) > limit n-> infinity (0.4 / 2^n) ie P(n) > 0.
Youir method is incorrect and you answer is also incorrect.
ok peole comments should be either good job it was easy cool or something short not a whole paragraph or capter book leats relax good job
I'm confused. Only in Algebra 2 && Trigonometry here.
Ahhh, there are always such fun arguments when infinity is involved.
If anyone has read through the comments and is still wondering who is right, let me assure you that the original author is right, and Jimbo doesn't know what he is talking about. He clearly understands neither infinity nor limits.
It is certainly true that something can have a zero chance of happening and still happen. Consider choosing a random real number between zero and one. One valid way to do this would be to put a decimal point and then add digits, choosing each one randomly, for an infinite number of digits. What are the chances that you choose exactly 0.5 (with an infinity of zeroes behind it)? Well, the chance is zero. flat zero. Not almost zero, or close to zero. It is zero. That doesn't mean that the number doesn't exist, just that there is no chance you'll choose it, if you are choosing randomly.
Say you've just chosen a number by this technique. What are the chances of that number being chosen again? Zero. Really, In fact, the chance was zero of that number being chosen at all, before you picked it. The chance for any one number to be picked is zero. Of course, assuming you can actually pick a number, you have to pick one whose chances of being picked was zero, since they all are.
You can only talk about non-zero chances when you talk about groups of numbers. If you choose a random number between 0 and 1, what are the chances that the number will be less than 0.5? 0.5, of course. This is only because the group we picked is a non-infinitesimal portion of the whole. What are the chances that the number will be rational? zero. That's because the rational numbers are countable -- for every one of them, there are an infinite number of irrational numbers in any given range. They represent an infinitesimal subset of all the numbers.
Consider, again, choosing a number by choosing digits for infinity. For a number to be rational, there has to be a repeating sequence in the numbers you choose, and that sequence has to repeat FOREVER! Once you've established the sequence, you have to randomly choose the correct number EVERY TIME, for infinity. What are the chances of THAT? Well, zero.
If anyone has read through the comments and is still wondering who is right, let me assure you that the original author is right, and Jimbo doesn't know what he is talking about. He clearly understands neither infinity nor limits.
It is certainly true that something can have a zero chance of happening and still happen. Consider choosing a random real number between zero and one. One valid way to do this would be to put a decimal point and then add digits, choosing each one randomly, for an infinite number of digits. What are the chances that you choose exactly 0.5 (with an infinity of zeroes behind it)? Well, the chance is zero. flat zero. Not almost zero, or close to zero. It is zero. That doesn't mean that the number doesn't exist, just that there is no chance you'll choose it, if you are choosing randomly.
Say you've just chosen a number by this technique. What are the chances of that number being chosen again? Zero. Really, In fact, the chance was zero of that number being chosen at all, before you picked it. The chance for any one number to be picked is zero. Of course, assuming you can actually pick a number, you have to pick one whose chances of being picked was zero, since they all are.
You can only talk about non-zero chances when you talk about groups of numbers. If you choose a random number between 0 and 1, what are the chances that the number will be less than 0.5? 0.5, of course. This is only because the group we picked is a non-infinitesimal portion of the whole. What are the chances that the number will be rational? zero. That's because the rational numbers are countable -- for every one of them, there are an infinite number of irrational numbers in any given range. They represent an infinitesimal subset of all the numbers.
Consider, again, choosing a number by choosing digits for infinity. For a number to be rational, there has to be a repeating sequence in the numbers you choose, and that sequence has to repeat FOREVER! Once you've established the sequence, you have to randomly choose the correct number EVERY TIME, for infinity. What are the chances of THAT? Well, zero.
The original answer is correct. Jimbo's logic is about as fallacious as you can get. In response to his first "conclusive" proof:
[1] The set of integers in the original example is infinite. The chances of selecting any bounded group of numbers (c) in an infinite set is lim x->∞ c/x = 0.
[2] Now, Jimbo has noted that the numerator is increasing. This is true. However, the denominator is increasing at a faster rate. No matter how this is model, as we move toward infinity the answer becomes zero. For example lim->∞ (x^(n-1))/(x^n) = 0.
Obviously, this example does not correspond exactly to the prime number case, but the denominator (the set of all numbers) is increasing at a faster rate than the numerator (primes), so the logic holds. The answer is zero.
[1] The set of integers in the original example is infinite. The chances of selecting any bounded group of numbers (c) in an infinite set is lim x->∞ c/x = 0.
[2] Now, Jimbo has noted that the numerator is increasing. This is true. However, the denominator is increasing at a faster rate. No matter how this is model, as we move toward infinity the answer becomes zero. For example lim->∞ (x^(n-1))/(x^n) = 0.
Obviously, this example does not correspond exactly to the prime number case, but the denominator (the set of all numbers) is increasing at a faster rate than the numerator (primes), so the logic holds. The answer is zero.
Zero is wrong : the primes are infinity and the Prime Number Theorem gives a good estimation of the ratio between primes < n and n ; this is the P to choose a prime.
Not different, apart the complexity of the Prime Numbers Theorem, from the probability of choosing an odd number : they are half of the integers and the P is 0,5.
Not different, apart the complexity of the Prime Numbers Theorem, from the probability of choosing an odd number : they are half of the integers and the P is 0,5.
I'm with Jimbo. Infinity divided by infinity is not zero, and zero probability means an event is impossible, not merely unlikely. The probability of picking a prime might be infinitesimal, but it is definitely non-zero.
I have no idea who is right here. I do however wonder whether this problem really belongs in Braingle. It seems more like something from an advanced mathematics textbook. In general my understanding was that these puzzles are supposed to be about mental agility using a normal person's level of knowledge. If not, we could have situation puzzles that require knowledge of the details of the Thirty Years War or something.
Perhaps it would have helped if the author could explain in more detail what it means that something that is possible has a probability of zero. That was new to me and I would like to understand it. Could something have a probability of 1 but not be certain, as well?
Perhaps it would have helped if the author could explain in more detail what it means that something that is possible has a probability of zero. That was new to me and I would like to understand it. Could something have a probability of 1 but not be certain, as well?
To post a comment, please create an account and sign in.
Follow Braingle!