A
constant random variable is a
discrete random variable that takes a
constant value, regardless of any
event that occurs. This is technically different from an
almost surely constant random variable, which may take other values, but only on events with probability zero: Let be a real-valued random variable defined on a probability space . Then is an
almost surely constant random variable if there exists a \in \mathbb{R} such that \mathbb{P}(X = a) = 1, and is furthermore a
constant random variable if X(\omega) = a, \quad \forall\omega \in \Omega. A constant random variable is almost surely constant, but the converse is not true, since if is almost surely constant then there may still exist such that . For practical purposes, the distinction between being constant or almost surely constant is unimportant, since these two situation correspond to the same degenerate distribution: the Dirac measure. Almost surely constant random variables are independent of everything — that is, if X is almost surely constant, then for every event A and every measurable set B \subset \mathbb{R}, \mathbb{P}(\{X \in B\} \cap A) = \mathbb{P}(X \in B)\times\mathbb{P}(A). In particular, an almost surely constant random variable is independent of itself. Moreover, this
self-independence characterizes almost surely constant random variables: if a random variable is independent of itself, then it is almost surely constant. ==Higher dimensions==