# example of cumulative distribution function being discontinuous in $\mathbb Q$

I am currently studying random variables. I know random variables whose cumulative distribution functions are continuous.

But I was wondering if there is any random variable whose cumulative distribution function is discontinuous in $x\in\mathbb Q$. I've tried to consider the fact that $\mathbb Q$ is countable but it didn't helped me a lot.

So are there any examples?

Take a sequence of positive real numbers $\{a_n\}$ such that $\sum_{n=1}^\infty a_n$ converges and call $S$ the sum. Define the sequence $\{b_n\}$ by $b_n=a_n/S$ and note that $\sum_{n=1}^\infty b_n=1$. Let $\{q_1,q_2,\ldots \}$ be an enumeration of $\mathbb{Q}$ and let $f:\mathbb{R}\to [0,1]$ be defined by $$f(x)=\sum\limits_{\{n\in\mathbb{N}:q_n<x\}}b_n$$ (this is well defined since by the absolute convergence of the series, any rearrangement will led to the same result). You can check that $f$ satisfies the properties of a cumulative distribution function and that it is discontinuous in the rational numbers.
• okay. which random variable are you considering? and why is it discontinuous in $\mathbb Q$? Let $(a_n)$ be a sequence with $a_n\to a\in\mathbb Q$. Then $f(a_n)=...\to?$ for $n\to\infty$? – Ele May 1 '14 at 14:20
• Actually this function is not a CDF since it is not continuous from the right. Use $q_n\leqslant x$ instead. – Did May 2 '14 at 6:23