If I theoretically had a true random number that picks any positive integer, then the expected value should be infinity by the following logic. Expected value will be n/2 for the sequence $ 0 ,1,2,3,...n$ (This can be proven with Guass formula). Thus if $n$ is infinite, then the expected sum will be infinite. However, any random integer chosen will be less than infinity. How can I resolve this paradox?
Expected value of a random positive integer
857 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 3 best solutions below
On
The interesting issue you've outlined is this: what's the actual probability that you pick a particular integer $i$?
If you pick from the sequence $0,1,\dotsc,n$, then the probability is $\frac{1}{n}$ as long as $i\leq n$.
To have a true random variable over all the positive integers, one reasonable-looking way is to take the limit as $n\rightarrow\infty$.
What happens? The probability of picking exactly $i$ is now the limit of $\frac{1}{n}$ as $n\rightarrow\infty$, that is, zero.
The natural generalization of a random variable to infinite sets is what's called a probability measure: basically a function from (set of possible outcomes) to (probability the outcome is in that set).
We require some conditions on the function so that the mathematics remains well-behaved, one of them is countable additivity: if we have a countable sequence of disjoint events, the probability of (any one of them happening) is the sum of the (probabilities of each).
With the integers, since each single integer has probability zero, clearly adding up a bunch of zeros is not the same as 1 (the probability of picking any of them), and so this is an invalid probability measure.
In other words, "taking the limit as $n\rightarrow\infty$" broke the math and this resulting "uniformly random positive integer" is ill-defined.
On
As others have noted, there does not exist a uniform distribution over the positive integers.
Suppose such a thing did exist; what kind of numbers would it output? Pick some number K (eg Graham's number or TREE(3)). What are the odds the number you get is in [1,K] vs (K,100K]? So no matter what K you pick, you're far more likely to get a larger number than a smaller number. In other words, the output of such an RNG will almost certainly be colossal.
The other thing to note is that expectation values are defined in the infinite limit. Consider the example given by @jmerry. With probability 1, any finite sample will be finite. The problem is that in the infinite limit, the finite sample increases without bound.
One resolution of this paradox: there's no such thing as a (uniform) random integer. While there are many probability distributions we could use to choose an integer, all of them have some values more likely than others.
See also here for a good explanation.
Of course, even with that in mind, we can still construct a random variable that has infinite expected value despite being finite with probability $1$. For example, take a variable which is $2^n$ with probability $2^{-n}$ for each positive integer $n$, and zero otherwise. The expected value there is $1+1+1+\cdots=\infty$. Just like how improper integrals can diverge, expected values can fail to exist.