Are random variables functions or experiments? I don't understand the definition of the weak law of large numbers, it says that if you have an infinite sequence of independent and identically distributed random variables if you add the random variables and divide by the amount of random variables then it aproaches the mean $\mu$.
But a random variable is a function of probabilities and in every example what they use is an experiment not a function(for example the number of heads on $100$ tosses) , so what the definition actually means by this? Do you have to add up the functions? :c
 A: If I understood your question well:
Let $X_1,\cdots,X_n$ be (integrable) random variables, independent and identically distributed with mean $\mu$. The law of large numbers says that $\frac 1n\sum_{k=1}^nX_k\underset{n\to+\infty}{\longrightarrow}\mu$, where the convergence holds in probability (weak law of large numbers), and even almost surely (strong law of large numbers).
Yet you are often in the situation where you consider for example $x_1,\cdots,x_n$ the results of $n$ tosses (e.g. $x_k=1$ for head and $0$ for tail). Then how does the law of large number can be applied, as $x_k$ is a real number, but $X_k$ is a random variable?
My understanding is the following:
$x_1,\cdots,x_n$ are realisations of independent and identically distributed random variables $X_1,\cdots,X_n$, so there exists an outcome $\omega$ such that $x_1=X_1(\omega),\cdots,x_n=X_n(\omega)$. By the law of large numbers, the probability of the set $A=\{\omega'\in\Omega\mid\vert\frac1n\sum_{k=1}^nX_k-\mu\vert>\varepsilon\}$ vanishes as $n$ goes to $+\infty$. So we often make the assumption that $n$ is large enough, so that $\mathbb P(A^\complement)$ is negligible, and as a consequence, the case $\omega\in A^\complement$ is very unlikely to happen, hence we suppose $\omega\in A$. Therefore, we will write that $\frac1n\sum_{k=1}^nx_k\simeq\mu$.
EDIT : since apparently the above was not clear, let me clarify a bit more. Recall that we consider the existence of a universe $\Omega$, which is the set of all possible outcomes of a given random experiment. For example, in the case of a toss, you can be minimalist and only consider two possible outcomes: head or tail, hence $\Omega=\{\textrm{head},\textrm{tail}\}$ (or $\{0,1\}$, or whatever). Another possibility would be to let $\Omega$ be an abstract set that you do not try to describe, but just imagine that it contains all relevant outcomes that might have an impact on the result of the toss. For instance it would contain outcomes such as "the coin is ejected vertically with a force of 10 Newton, in a room full of air at 20°C, at 1m of the ground, etc". As a probabilist, I personally consider that the latter is a better practice (I mean, not to try to describe $\Omega$, and leave it as an abstract space). Maybe you are surprised that we have a choice on what the universe is, whereas there should be only one, the "real" one. It is because we are not considering reality, but a modelling of it. Never forget it...
Many times (not to say every time), we are not interested in the outcome itself, but in an expression whose value depends on the outcome. For example in the case of a toss, you don't care that the coin was ejected vertically at 10N etc., you only care about whether it is head or tail (if you were minimalist and chose $\Omega=\{\textrm{head},\textrm{tail}\}$, then of course you would be interested in the outcome itself, but this situation rarely happens outside this kind of toy models). So you consider the random variable $X$, which maps any outcome $\omega$ to the result head or tail. Hence we have $X:\Omega\to\{\textrm{head},\textrm{tail}\}$.
When you consider $n$ tosses, you implicitly consider $n$ random variables $X_1,\cdots,X_n$, where $X_k$ is the result of the $k$-th toss. What you observe in the experiment is the outcome $\omega$, where for instance $\omega$ is the outcome "I ejected the first coin at 10N, etc., for the second coin a bird entered the room, so it distracted me in the way I tossed the coin, so I tossed it at 7.5N at 45° etc., bla bla bla, and for the last toss I threw the coin in the direction of bla bla bla, etc". As a result, you observe for example that the first toss is head. So $X_1(\omega)=\{\textrm{head}\}$, or equivalently, $x_1=\{\textrm{head}\}$. Formally speaking, the result of the $k$-th toss is $x_k=X_k(\omega)$.
Now, let us talk a bit about convergence. Let $(Y_n)_{n\in\mathbb N}$ be a sequence of (real-valued) random variables, and $\mu\in\mathbb R$. What does it mean that $Y_n$ converges to $\mu$ as $n\to+\infty$? An easy definition would be: it means that for any outcome $\omega\in\Omega$, the sequence $Y_n(\omega)$ converges to $\mu$ as $n\to+\infty$. But that is actually not a very useful definition in practice. A much more interesting definition is the almost sure convergence: we say that $Y_n$ converges almost surely to $\mu$ as $n\to+\infty$ iff the set of all outcomes $\omega\in\Omega$ such that $Y_n(\omega)$ converges to $\mu$ as $n\to+\infty$ has probability $1$. In other words, $\mathbb P(\{\omega\in\Omega\mid Y_n(\omega)\underset{n\to+\infty}{\longrightarrow}\mu\})=1$. This means that there potentially exist outcomes $\omega$ such that $Y_n(\omega)$ does not converge, but we would never observe them in an real experiment because the universe affects them a probability $0$ to happen (if we do, it means that our model is wrong somewhere).
