Chatroom
 

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Bad Astronomy and Universe Today Forum > General > Questions and Answers
Register FAQ Members List Calendar Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-September-2007, 03:11 AM
CodeSlinger's Avatar
CodeSlinger CodeSlinger is online now
Senior Member
 
Join Date: Jul 2007
Location: Gilead-that-Was
Posts: 732
Default question about "infinity" in math

Suppose you had a random number generator that was capable of generating real numbers of infinite precision (this would be something better than current computer PRNG's, which can only produce numbers of fixed precision, and aren't really truly random). What is the probability of this RNG generating an integer-like number (something like 24.0)? The number of integers and real numbers that can be generated are both infinite, but intuitively, the infinity of integers should be "smaller" than the infinity of real numbers.
Reply With Quote
  #2 (permalink)  
Old 10-September-2007, 03:26 AM
Jens's Avatar
Jens Jens is online now
Senior Member
 
Join Date: Jun 2005
Location: Tokyo
Posts: 1,858
Default

My intuition is that there there would be no possibility, because there are infinitely more real numbers than integers. Of course, no computer could ever do that, so the question may be meaningless.
__________________
As above, so below
Reply With Quote
  #3 (permalink)  
Old 10-September-2007, 03:48 AM
01101001's Avatar
01101001 01101001 is offline
Senior Member
 
Join Date: Mar 2004
Posts: 10,348
Default

Quote:
Originally Posted by Jens View Post
My intuition is that there there would be no possibility, because there are infinitely more real numbers than integers.
Yeah. That would be the same probability of its generating a number with a fractional part of .999...
__________________
0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 0 0 1 1 0 1 0 0 1 0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 0....
Reply With Quote
  #4 (permalink)  
Old 10-September-2007, 04:24 AM
Delvo Delvo is offline
Senior Member
 
Join Date: Oct 2006
Posts: 2,154
Default

But then, each time you use the thing, whatever number you got, the odds of getting that number were zero before it happened.
Reply With Quote
  #5 (permalink)  
Old 10-September-2007, 05:37 AM
CodeSlinger's Avatar
CodeSlinger CodeSlinger is online now
Senior Member
 
Join Date: Jul 2007
Location: Gilead-that-Was
Posts: 732
Default

Can the probability of getting any number be zero? With a hypothetical perfect RNG, the probability of getting any number should be equal to the probability of getting any other number. So if the probability of getting one number is zero, then they would all be zero. Doesn't this mean the RNG would spit out NO numbers whatsoever? But it does (or should), so the probability should be a small but non-zero number.

Jens, yes, I do agree that no computer may ever be able to serve as such as perfect RNG. But for the purposes of this exercise, let's pretend that we do have such a thing. Let's say it's the dice that God plays with
Reply With Quote
  #6 (permalink)  
Old 10-September-2007, 05:53 AM
Ken G's Avatar
Ken G Ken G is online now
Senior Member
 
Join Date: Oct 2005
Posts: 9,986
Default

You could easily make this a precise question simply by increasing both the precision and range and watching what happens to the probability of getting an integer. The probability is simply the range over the precision, it makes no difference how large each of those is. Thus you can't just say "both are infinite", because what will always matter is their ratio.
Reply With Quote
  #7 (permalink)  
Old 10-September-2007, 06:46 AM
mfumbesi's Avatar
mfumbesi mfumbesi is online now
Senior Member
 
Join Date: Nov 2005
Location: Pretoria, Afric'de Sud
Posts: 640
Default

If you have a "true" random number generator and your range is infinity, I think the probabilities of generating a number say 10.0 (Or any number) is zero Or alternatively 1 to infinite, which realistically is zero.
Reply With Quote
  #8 (permalink)  
Old 10-September-2007, 06:51 AM
Ken G's Avatar
Ken G Ken G is online now
Senior Member
 
Join Date: Oct 2005
Posts: 9,986
Default

Any specific number, yes, but as for getting an integer, it's the ratio of range to precision. If I have a precision that only includes one place after the decimal point, my range can be anything you like, even infinite (in principle, of course that's impossible in practice), and the chance of getting an integer is always 1/10. If I have two decimal places, it's 1/100, etc. But my full precision must include all the places to the left of the decimal as well, so that's where the range comes in. Thus getting back to the OP, even if I have infinite precision and infinite range, I still have to specify how much of that infinite precision is used on the left of the decimal place, and how much on the right, in terms of a ratio.
Reply With Quote
  #9 (permalink)  
Old 10-September-2007, 06:57 AM
astromark's Avatar
astromark astromark is offline
Senior Member
 
Join Date: Jun 2004
Location: Wanganui, New Zealand.
Posts: 2,375
Default

quote, "The number of integers and real numbers that can be generated are both infinite, but intuitively, the infinity of integers should be "smaller" than the infinity of real numbers. end quote"... Umm....

Hay wait a minite... that can't be right, can it?
Infinite is infinite... There can be no 'larger' portion of infinite possibilities. Any less than infinite, is not infinite. How did you let this go?
Reply With Quote
  #10 (permalink)  
Old 10-September-2007, 07:11 AM
Ken G's Avatar
Ken G Ken G is online now
Senior Member
 
Join Date: Oct 2005
Posts: 9,986
Default

There are indeed different "levels of infinity". For example, there are an infinite number of rational numbers between 0 and 1, and an infinite number of irrationals there as well, but if you truly pick a random point on a line from 0 to 1, it will always be an irrational number. This is because the irrationals are 'uncountably infinite' and the rationals are 'countably infinite'. The latter means that since rationals can be expressed as fractions, you can count them (indeed, overcount them) by going 1/1, 1/2, 1/3, 2/3, 1/4, 2/4, 3/4, 1/5, 2/5, 3/5, 4/5,... see the pattern? But you cannot do that with the irrationals. Or another way to think of that, rationals have repeating decimals, irrationals don't -- so the latter are arbitrarily more numerous in a given range with arbitrary precision. But the OP also specified that the range was arbitrarily large, so that's why we haven't enough information to tell how likely the integers, or the rationals, will be compared to the irrationals.
Reply With Quote
  #11 (permalink)  
Old 10-September-2007, 11:06 AM
Kullat Nunu's Avatar
Kullat Nunu Kullat Nunu is offline
Senior Member
 
Join Date: Sep 2003
Location: Earth
Posts: 2,687
Default

Quote:
Originally Posted by CodeSlinger View Post
What is the probability of this RNG generating an integer-like number (something like 24.0)?
Infinitely small, that is 0. The probability of a given value in a continuous probability function is always 0, even if the function is limited.

Quote:
Originally Posted by CodeSlinger View Post
The number of integers and real numbers that can be generated are both infinite, but intuitively, the infinity of integers should be "smaller" than the infinity of real numbers.
Your intuition is right, there are "different-sized" infinities. The size of an infinity is called cardinality. The cardinality of the set of real numbers, Aleph-1, is larger than the cardinality of the set of integers, Aleph-0 which is the smallest possible infinity. Interestingly, one can't prove mathematically that there are intermediate cardinalities between those two.
__________________
Science is a way of trying not to fool yourself. The first principle is that you must not fool yourself, and you are the easiest person to fool.
-- Richard Feynman
Reply With Quote
  #12 (permalink)  
Old 10-September-2007, 01:02 PM
JohnD JohnD is offline
Senior Member
 
Join Date: Oct 2002
Posts: 1,388
Default

You're getting hung up on infinity.
Whatever the odds are for getting, say, 23.99999999999999999999999999999999999999999999999 999999999999999999999999999999999999999999999 etc.etc., they are exactly the same as getting 24. Of course that first number is not infinitely precise, but anyway, I hope the point is made.

This fallacy prevents peole using "1 2 3 4 5 6" as their lottery number, when the odds of that coming up are exactly the same as any other number.

John
Reply With Quote
  #13 (permalink)  
Old 10-September-2007, 01:27 PM
a1call's Avatar
a1call a1call is offline
Senior Member
 
Join Date: Jun 2005
Posts: 365
Default

Probability of getting anything in an infinite set is:
1/infinity
Which is undefined, not 0. It is the same as divide by 0.
It is a common misunderstanding.
__________________
"They reasoned that an object situated at the center and related equally to the extremes in every direction can have no impulse to move in any specific direction. In fact, they compared the situation of such an object with that of a man violently but equally hungry and thirsty, standing at the same distance from food and drink and unable to decide in which direction to move." - Aristotle
Reply With Quote
  #14 (permalink)  
Old 10-September-2007, 02:57 PM
CodeSlinger's Avatar
CodeSlinger CodeSlinger is online now
Senior Member
 
Join Date: Jul 2007
Location: Gilead-that-Was
Posts: 732
Default

Thanks for the responses ladies and gents After reading through your replies and a1call's linked page, I *think* I got it. The probability of getting an integer (or any other number) from the hypothetical perfect RNG is simply 1/infinity, an infinitely small number tending to, but *not* equal to, zero. The way I "visualize" this is that as I run (execute, crank through) the RNG more and more times, the ratio of integers versus real numbers will continue to decrease and converge on zero. The same way that as I flip a coin more and more times, the ratio of heads to tails will converge to 1:1.

Ken G, in belated response to your question, I was thinking that the hypothetical perfect RNG would have infinite precision on both the left hand side and the right hand side of the decimal point. As you said, if there is one decimal point precision, the odds would be 1/10, if there are two, the odds would be 1/100. So given infinite precision on the RHS, the odds should be (if I'm thinking about this correctly) 1/infinity. Same result as above, slightly different path. Which I take to be a good sign; if the two reasoning gave different results, my noodles would really be baked!

Thank you, everyone, for humoring me
Reply With Quote
  #15 (permalink)  
Old 10-September-2007, 04:53 PM
Ken G's Avatar
Ken G Ken G is online now
Senior Member
 
Join Date: Oct 2005
Posts: 9,986
Default

Quote:
Originally Posted by CodeSlinger View Post
So given infinite precision on the RHS, the odds should be (if I'm thinking about this correctly) 1/infinity.
That's true if you have finite precision on the LHS-- but that's not the case if you have an infinite range of numbers. You have to specify the digits of precision on both sides, or at least their ratio if they tend to infinity, before you can know what the probability of getting an integer is. There's no escaping the fact that there's no way to actualize an infinite decimal expansion, you need a finite algorithm to generate it and only that algorithm can answer the OP. You are right that the probability of getting any particular number tends to zero as either the range or the precision tends to infinity, for any random algorithm.
Reply With Quote
  #16 (permalink)  
Old 10-September-2007, 04:55 PM
CodeSlinger's Avatar
CodeSlinger CodeSlinger is online now
Senior Member
 
Join Date: Jul 2007
Location: Gilead-that-Was
Posts: 732
Default

Ok, this part I still don't understand. Why does the precision on the LHS matter in the probability of getting an integer? Only the RHS differentiates integers from non-integers.
Reply With Quote
  #17 (permalink)  
Old 10-September-2007, 05:01 PM
Disinfo Agent Disinfo Agent is offline
Senior Member
 
Join Date: Apr 2004
Posts: 6,242
Default

Quote:
Originally Posted by CodeSlinger View Post
Suppose you had a random number generator that was capable of generating real numbers of infinite precision (this would be something better than current computer PRNG's, which can only produce numbers of fixed precision, and aren't really truly random). What is the probability of this RNG generating an integer-like number (something like 24.0)? The number of integers and real numbers that can be generated are both infinite, but intuitively, the infinity of integers should be "smaller" than the infinity of real numbers.
Your problem is lacking information. You say you have a random number generator, but as soon as you abandon finite probability spaces (and the integers are certainly infinite) you must specify which kind of randomness you're talking about.

Quote:
Originally Posted by CodeSlinger View Post
Can the probability of getting any number be zero?
Yes.

Quote:
Originally Posted by CodeSlinger View Post
With a hypothetical perfect RNG, the probability of getting any number should be equal to the probability of getting any other number. So if the probability of getting one number is zero, then they would all be zero.
It depends on what you mean by "perfect" RNG. The probability need not be zero for all real numbers.

Quote:
Originally Posted by CodeSlinger View Post
Doesn't this mean the RNG would spit out NO numbers whatsoever?
No, it doesn't, actually.
__________________
"All your bias are belong to us." Ara Pacis
"A witty saying proves nothing." Voltaire
Reply With Quote
Old 10-September-2007, 05:06 PM
Disinfo Agent
This message has been deleted by Disinfo Agent.
  #18 (permalink)  
Old 10-September-2007, 05:11 PM
peter eldergill peter eldergill is offline
Senior Member
 
Join Date: Jan 2005
Location: Toronto
Posts: 1,448
Default

I remember a thread I started a while ago about "flawed questions", if anyone remembers.

Like :"Can Jesus miocrowave a burrito so hot that even He can't eat it?"

(Obviosly not intended to start some sort of religious debate, unless you're Homer Simpson or Ned Flanders)

I'm wondering if this is a flawed question?

I think the probability is 0, as you could probably define a density function and try to calculate the area under the curve at a single point.

Wow..this question is a bugger, isn't it?

But is it a flawed question?

Pete

Note: I suppose you could try to calculate the probability of finding a random integer from the real number system and it would still be 0 (or a limit as x goes to infinity), but how about an interval of real numbers?
__________________
PJE

There's so much I don't know about astrophysics. I wish I had read that book by that wheelchair guy.
Reply With Quote
  #19 (permalink)  
Old 10-September-2007, 05:17 PM
CodeSlinger's Avatar
CodeSlinger CodeSlinger is online now
Senior Member
 
Join Date: Jul 2007
Location: Gilead-that-Was
Posts: 732
Default

Hello Disinfo Agent,

What are the different kinds of randomness? The kind of randomness I was thinking about for the hypothetical RNG is one where given infinite time, all real numbers would be enumerated. Would this be perfect uniform randomness?

You said that the probability of getting a number can be zero, and went onto say that this does not mean the RNG would spit out no numbers whatsoever. Can this be in the case of a perfect uniform RNG (if that is the right term for what I'm thinking about), where the probability of getting any number should be equal to the probability of any other number? Can an event that has zero probability still occur?
Reply With Quote
  #20 (permalink)  
Old 10-September-2007, 05:22 PM
CodeSlinger's Avatar
CodeSlinger CodeSlinger is online now
Senior Member
 
Join Date: Jul 2007
Location: Gilead-that-Was
Posts: 732
Default

Quote:
Originally Posted by peter eldergill
Note: I suppose you could try to calculate the probability of finding a random integer from the real number system and it would still be 0 (or a limit as x goes to infinity), but how about an interval of real numbers?
The first part is precisely what I was trying to ask in the OP. My current thinking is that it is not zero, but an infinitely small number that tends to zero. For the second part, I think the answer should be the same, since for any given interval there are still an infinite number of real numbers contained within.
Reply With Quote