# Is there a probability mass function:$f_X(x)=0,\forall x \in \mathbb R$?

I've seen the definition of probability mass function and descrete random variable on wikipedia:

In probability theory and statistics, a probability mass function (pmf) is a function that gives the probability that a discrete random variable is exactly equal to some value.

When the image (or range) of $X$ is finite or countably infinite, the random variable is called a discrete random variable and its distribution can be described by a probability mass function which assigns a probability to each value in the image of $X$.

But how is the image of $X$ countably infinite?

It seems to lead to a fact:if $X$ is uniform on $\mathbb Q$,the pmf of $X$ is f(x)=0(Because $\mathbb Q$ is inifinity large,it must be zero).

So,$\int_{-\infty}^\infty{f(x)}=0$.

But I know a property of pmf is $\int_{-\infty}^\infty{f(x)}=1$,it is also written in wikipedia:

Suppose that $X: S → A (A ⊆ \mathbb R)$ is a discrete random variable defined on a sample space $S$.Thinking of probability as mass helps to avoid mistakes since the physical mass is conserved as is the total probability for all hypothetical outcomes x:$$\sum_{x \in A} f_X(x)=1$$

So where does error happen?

• The error is that you have assumed a uniform distribution exists for infinite sets: the contradiction you produce shows that such a distribution cannot exist. – Chappers Apr 11 '17 at 3:48
• @Chappers thx :3 – Taa Apr 11 '17 at 4:51