Suppose that $a = 5$. In this case, $a$ is not random since it is always equal to $5$. Can $a$ instead be interpreted as a random variable $X$ such that \begin{equation} p(X=x) = \begin{cases} 1 &\text{if} \quad x = 5 \\ 0 &\text{otherwise} \end{cases} \end{equation} If so, would $a$ be interpreted as a discrete random variable, as indicated by the probability mass function above, or as a continuous random variable?

  • 2
    $\begingroup$ Looks like Dirac's delta distribution probabilitycourse.com/chapter4/4_3_2_delta_function.php $\endgroup$
    – Many
    Commented Jun 10, 2021 at 12:26
  • 1
    $\begingroup$ Sometimes this is called a "constant random variable." stats.stackexchange.com/search?q=%22constant+random+variable%22 $\endgroup$
    – Sycorax
    Commented Jun 10, 2021 at 15:31
  • 3
    $\begingroup$ Label all faces of die "5:" because that does not change the random nature of the outcome of rolling it, perforce it defines a random variable. That variable just happens to have a constant value. Yes, we could declare that such variables are special and agree to not call them "random"--but then the statements of many theorems about random variables would have to be cluttered with exceptions and special cases. $\endgroup$
    – whuber
    Commented Jun 10, 2021 at 20:09

1 Answer 1


Given a probability space $(\Omega, \mathscr F, P)$, a random variable is a Borel function $X : \Omega\to\mathbb R$. That's all there is to it.

For $a\in\mathbb R$ let $X_a : \Omega\to\mathbb R$ be defined by $X_a(\omega) = a$ for all $\omega\in\Omega$. Consider a Borel set $B \subseteq \mathbb R$. Then $$ X_a^{-1}(B) = \{\omega\in \Omega : X_a(\omega) \in B\} = \begin{cases}\Omega & a \in B \\ \emptyset & a \notin B\end{cases}. $$ No matter how coarse the $\sigma$-algebra $\mathscr F$ is, it will always be the case that $\{\emptyset, \Omega\}\subseteq \mathscr F$ so this means that $X_a$ is Borel.

The distribution for $X_a$ is $P\circ X_a^{-1}$ and $$ (P\circ X_a^{-1})(B) = \mathbf 1_{a\in B} $$ i.e. any set containing $a$ has a measure of $1$ and any set not containing $a$ has a measure of zero. Effectively this is a point mass of $1$ on $a$, and the corresponding pmf is just $P(X=x) = \mathbf 1_{x = a}$.

This distribution is not absolutely continuous w.r.t. the Lebesgue measure so it does not have a pdf in the usual sense. The Dirac delta is a way to treat it as if it does, but really integrating with respect to a Dirac delta is just using a different measure.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.