# Construct a probability mass function with expected value of infinity

Is there a way to construct a p.m.f. $f(X)$ that has an expected value $E(X)=\infty$ and $Pr(X=1)=0.5$?

For example, if you have $n$ boxes and $X$ measures the number of objects in each box, how would you find a function as described above? Is there a way?

Perhaps $f$ would have a heavy-tailed distribution?

-
For finite boxes the expected value will be finite as well (unless one box have $\infty$ many objects). –  Berci Dec 14 '12 at 1:47
If $Pr(X=1) > 0$, you don't have a p.d.f. (probability density function), you have a p.m.f. (probability mass function). –  Robert Israel Dec 14 '12 at 1:49
Beat me to that. Just about to make the same comment on p.d.f. vs p.m.f.. –  user1551 Dec 14 '12 at 1:50
*fixed......... –  James Dec 14 '12 at 2:27

Suppose we have infinite many boxes $B_1,B_2,B_3,\dots$, and $B_n$ is chosen with probability $1/2^n$, say. Then put $1$ ball in $B_1$, and $2^n$ balls in the other $B_n$'s.