# Random Variable Vs. Probability Function Intuition?

In a book on probability I'm reading they begin by defining random experiment, outcome, sample space & event, then using these notions they define & a probability space in terms of the sample space, a sigma field & a probability function.

After about 80 pages of working with this theory, i.e. Bayes theorem, conditional probability etc... they introduce the notion of a random variable & the distribution function of a random variable.

They give the impression that a random variable is a function of the outcomes, & that it is defined independently of the notion of a probability function, which this stack answer seems to imply:

Probability measures assign values (probabilities) to sets in the $\sigma$-algebra $\mathcal{A}$. On the other hand, random variables are functions $f\colon \Omega\to E$ that are measurable in this sense: If $B \in \mathcal{E}$, then $f^{-1}(B) \in \mathcal{A}$. https://math.stackexchange.com/a/124504

yet other sources I've seen seem to conflate the two notions or even imply they mean the same thing :(

What is a random variable a) intuitively, b) mathematically & c) in a way that distinguishes it from a probability function, i.e. a nice intuitive example of a situation where you can't just use a probability function you need a random variable. I can't believe I got through a course on probability without understanding this :(

Thanks!

The word experiment because of its connection in chemistry, or physics clouds our understanding. It need not be that in statistics we "conduct" the experiment as in science tightly controlling the settings. No.

To understand where probability models can fit in, one should come out of textbook examples of probability associated with gambling (cards, dice, coin tosses). Then we see natural examples of random variables that will give us intuition. Many times we are not interested in the outcome directly, but on some aspect (that could be measured with numbers) of the outcome.

For example a telemarketing executive might call all numbers from a printed phone book in the order. Making the call is a random experiment. We don't know who would pick it up, whether it would be busy etc all these are not predictable in advance.

One random variable could be the duration of the call. (a numerical measurement on the outcome of the dialling of the call.) Another random variable (in the same experiment, that is same sample space) could be how much of sales (measured in dollars) the executive could accomplish by that call.

Another "experiment". Assume a restaurant opens at noon everyday. Who the first customer is unpredictable, so it is a random experiment. The sample space here is potentially whole population of the city. A random variable for this experiment could be "how much the customer dined" (the bill paid). Another could be for how long the customer stayed in the restaurant. Another random variable could be how many persons came in a group as the first batch of customers (a family dining out, a person treating friends, a group of co-workers coming out together from office for lunch)

Intuitively you can think of random variable , as a reward associated with any event . Suppose you play a game where you throw a six-sided dice . Depending on the outcome of the dice you get a particular outcome , say if you get $1$ you will get $1\$$, similarly for other outcomes . So the reward you will be getting after throwing the dice once is a random variable which take values from$1$to$6$. It is random because you don't know its value before you have thrown the dice ( ie you have not done the experiment ) . You can say it is a value associated with a probabilistic experiment . It differs from the probability distribution function in the way that it is the value that is associated with the outcome of the probabilistic experiment , but what the outcome of the experiment will be has nothing to do with the value associated it . • If I understood correctly the random variable is typically a function which map outcomes to a real value (in your example$\lbrace1,...,6\rbrace -> \mathbb{R}$) while a probability distribution or probability density function map the "image" of the random variable to a probability value ( in your example$\mathbb{R} -> [0,1]$). In the @PVanchinathan examples you have a set of call C(a finite set) and the random variable represent the mapping$C -> \mathbb{R} $where the real value is the duration and the probability function or probability density function associate the duration to a$[0,1]\$ Feb 6, 2019 at 20:19
• @Bemipefe yes you are right. Feb 7, 2019 at 8:02
• @abkds doesn't probability map the sets of the sigma-algebra F to [0, 1], and not the "image" of a random variable to [0, 1]? Mar 5 at 19:23