# Random Variables and Statistic

I'm studying Statistical Inference by Casella and I'm confused with the definitions of random variable & statistic.

So let we have the probability space $(\Omega, F, P)$ where $\Omega$ is the sample space, $F$ is the $\sigma-algebra$ and $P$ is the probability function. Then we define "a" random variable, a function that maps every element in the sample space to a real number in the interval $[0,1]$.

After that we define a statistic; Let $X_1, X_2, .., X_n$ be a random sample of size n from a population and let $T(x_1, x_2, .., x_n)$ be a function whose domain includes the sample space of $(X_1, X_2, .., X_n)$. Then the random variable/vector $T(X_1, X_2, .., X_n)$ is called a statistic.

This is the part where I stuck. I think that we can define lots of different random variables on a probability space and then define different distribution functions. But what is the relation between our sample space, random variables and "a" statistic?