I am really confused about capitalization of variable names in statistics. When should a random variable be presented by uppercase letter, and when lower case?

For a probability $P(X \leq x)$, what do $x$ and $X$ mean here?


4 Answers 4


You need to dissociate $x$ from $X$ in your mind—sometimes it matters that they are "the same letter" but in general this is not the case. They are two different characters and they mean two different things and just because they have the same name when read out loud doesn't mean anything.

By convention, a lot of the time we give random variables names which are capital letters from around the end of the alphabet. That doesn't have to be the case—it's arbitrary—but it's a convention. So just as an example here, let's let $X$ be the random variable which represents the outcome of a single roll of a die, so that $X$ takes on values in $\{1,2,3,4,5,6\}$. Now I believe you understand what would be meant by something like $P(X\leq 2)$: it's the probability that the die comes up either a 1 or a 2. Similarly, we could evaluate numbers for $P(X\leq 4)$, $P(X\leq 6)$, $P(X\leq \pi)$, $P(X\leq 10000)$, $P(X\leq -230)$ or $P(X\leq \text{any real number that you can think of})$. Another way to say this is that $P(X\leq\text{[blank]})$ is a function of a real variable: we can put any number into [blank] that we want and we end up with a unique number. Now a very common symbol for denoting a real variable is $x$, so we can write this function as $P(X\leq x)$. In this expression, $X$ is fixed, and $x$ is allowed to vary over all real numbers.

It's not super significant that $x$ and $X$ are the same letter here. We can similarly write $P(y\leq X)$ and this would be the same function. Where it really starts to come in handy that $x$ and $X$ are the same letter is when you are dealing with things like joint distributions where you have more than one random variable, and you are interested in the probability of for instance $P(X\leq \text{[some number] and } Y\leq\text{[some other number]})$ which can be written more succinctly as $P(X\leq x,Y\leq y)$. Then, just to account for the fact that it's hard to keep track of a lot of symbols at the same time, it's convenient that $x$ corresponds to $X$ in an obvious way.

By the way, for a random variable $X$, the function $P(X\leq x)$ a very important function. It is called the cumulative distribution function and is usually denoted by $F_X$, so that $$F_X(x)=P(X\leq x)$$

  • $\begingroup$ clear and mechanical non abstract explanations like this are very rare +1 $\endgroup$
    – Seph
    Jan 6, 2018 at 22:13
  • $\begingroup$ So for $P(X \leq x)$, both $X$ and $x$ are random variables? While meaning is clear, what to call what becomes ambiguous. $\endgroup$ Nov 21, 2018 at 9:14
  • $\begingroup$ @ParthibanRajendran, no, $X$ is a random variable, but $x$ is a "real variable". $\endgroup$
    – Joe
    Mar 4, 2022 at 12:26

When one writes $P(X\leqslant x)$, one usually means that $X:\Omega\to\mathbb R$ is a random variable and $x$ a real number, so that $P(X\leqslant x)=P(A)$ where $$ A=\{X\leqslant x\}=\{\omega\in\Omega\mid X(\omega)\leqslant x\}=X^{-1}((-\infty,x]). $$

  • $\begingroup$ Can you always find inverse of $X$ so that you can use $X^{−1}((−∞,x])$ in your explanation? $\endgroup$ Jul 4, 2013 at 6:44
  • $\begingroup$ @Trismegistos One does not require that $X$ has an inverse. Quite generally, $X^{-1}(B)=\{\omega\in\Omega\mid X(\omega)\in B\}$, as already explained in the answer. $\endgroup$
    – Did
    Jul 4, 2013 at 9:03
  • 1
    $\begingroup$ @Trismegistos in this context $X^-1(S)$ refers to the preimage of $X$, which always exists. $\endgroup$
    – crf
    Jul 4, 2013 at 17:37
  • $\begingroup$ $+1$ for the (partial) explanation of this notation for dealing with random variables. Is there an easily-described formal translation for more general expressions involving (potentially multiple) random variables? $\endgroup$
    – dfeuer
    Jul 10, 2013 at 7:15
  • $\begingroup$ @dfeuer Such as? $\endgroup$
    – Did
    Jul 10, 2013 at 14:53

$P(X\leq x)$ means the probability that the random variable $X$ is less than or equal to the realization $x$. The lower case $x$ is a fixed constant, whereas $X$ is a random variable.


An uppercase letter is usually for a random variables which is a function on events with a real number as its return value. A lowercase letter is for a realization of a random variable, which is a value. So $P(X<x)$ means the probability that the range of the function $X$ is less than the value $x$.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .