# Lowercase $x$ vs Uppercase $X$ in statistics

There are many definitions online but they do not seem to align, or at least do not clearly correspond to, the usages I see elsewhere. For example: this website defines the difference is being $$X$$ refers to a set of population elements; and $$x$$, to a set of sample elements. $$N$$ refers to population size; and $$n$$ to sample size.

However in this post we see:

Now consider $$X \sim U(0,1)$$ and the sequence of random variables $$X_n = \left(1 + \frac{1}{n}\right) X$$. This is a sequence of RVs with $$X_1 = 2X$$, $$X_2 = \frac{3}{2} X$$, $$X_3 = \frac{4}{3} X$$ and so on. In what senses can we say this is getting closer to $$X$$ itself?

I do not understand what $$X$$ and $$n$$ mean here. I thought $$X$$ was a function that mapped from the sample space $$\Omega$$ to the reals? If that's the case what does $$X_n$$ mean here? Are there $$n$$ (the size of the sample space) possible functions that map from $$\Omega$$ to the reals?

• To complement the clear answer of jld below, I would add that you are entirely correct when you say that you can think of a sequence of random variables $X_1, \dots, X_n$ as $n$ different functions (in your example) that map from $\Omega$ to the reals $\mathbb{R}$. However, when you write "Are there $n$ (the size of the sample space) possible functions..." be aware that the size of the sample space, as the number of possible outcomes in $\Omega$ is wholly distinct from the size of the sample, the number of observations of a random variable we collect. Jun 16 '21 at 20:14

In this context, capitalisation is usually used to distinguish random variables from fixed values, so you are correct to interpret $$X: \Omega \rightarrow \mathbb{R}$$ as a random variable. The post specifies that it is considering a sequence of random variables $$X_n : \Omega \rightarrow \mathbb{R}$$, so there are an infinite number of these random variables, of the form:
\begin{align} X_1(\omega) &= (1+\tfrac{1}{1}) X(\omega), \\[6pt] X_2(\omega) &= (1+\tfrac{1}{2}) X(\omega), \\[6pt] X_3(\omega) &= (1+\tfrac{1}{3}) X(\omega), \\[6pt] &\ \ \vdots \\[6pt] X_n(\omega) &= (1+\tfrac{1}{n}) X(\omega), \\[6pt] &\ \ \vdots \\[6pt] \end{align}
Finally, the value $$n$$ here has nothing to do with the size of $$\Omega$$ or any other substantive property of the sample space. It is merely an index used to specify the form of the random variables in the sequence --- the post could just as easily have used the index $$i$$, or any other variable notation here.
You are correct that $$X$$ is a Borel function $$X : \Omega\to\mathbb R$$. A realization of $$X$$ is a particular real number $$X(\omega)$$, and such a number may be referred to as $$x$$. This means, for example, the event $$\{X = x\}$$ is more formally written as $$\{\omega\in\Omega : X(\omega) = x\}$$.
We can define as many functions as we want from $$\Omega$$ to $$\mathbb R$$, so e.g. we can imagine having $$X_1, X_2, \dots : \Omega\to\mathbb R$$. If $$X_i = a_i X$$ for constants $$a_i\in\mathbb R$$ then each function $$X_i$$ is also Borel so these are all random variables too. $$n$$ is often used to index a sequence of random variables so I could refer to $$X_n$$ as an arbitrary element of the sequence of functions $$X_1, X_2, \dots$$ instead of using $$X_i$$ or some other indexing variable. This use of $$n$$ is totally different from that of a sample size, although often the sequence of RVs in question comes from imagining taking bigger and bigger samples so $$X_n$$ may correspond to a sample of $$n$$ things, but it doesn't have to.
We can then ask about how the sequence of RVs evolves by letting $$n \to \infty$$. For example, in your case since $$a_n \to 1$$ as $$n\to\infty$$ we'll have $$X_n$$ converging on $$X$$ in some sense.