I was going through this article and, on this page, I encountered the definition of a random variable and a sample space. According to this page:
A random variable is a set of possible values from a random experiment.
It then takes the example of flipping a coin, defines $Heads=0$ and $Tails=1$, and says that $X = \{0, 1\}$ is a random variable.
Next, it defines sample space as
A random variable's set of values is the sample space.
It then takes the example of throwing a dice, and states that the sample space is $\{1, 2, 3, 4, 5, 6\}$.
So, both terms are defined to be a set of outcomes for an experiment and, as a result, I got confused and couldn't differentiate between them.
What is the difference between sample space and random variable?
I've consulted WIkipedia too and although I can understood the article on Sample Space but the article on Random Variable appears too technical and I couldn't comprehend it.