A random variable is a mathematical concept that represents a numerical outcome of a random experiment or a random process. It is a function that assigns a numerical value to each possible outcome in the sample space of the experiment. The main purpose of a random variable is to provide a concise way of describing the probability distributions of experiments and processes.
There are two types of random variables:
1. Discrete Random Variables: These random variables take on a countable number of distinct values. Examples include the number of heads obtained after tossing a coin three times, or the number of defective items in a batch.
2. Continuous Random Variables: These random variables take on a continuum of values (i.e., any value within an interval). Examples include the time it takes for a process to complete, or the weight of a randomly selected apple from a basket.
To provide a clearer understanding, letβs consider an example:
Suppose we perform an experiment where we roll a fair six-sided die. We are interested in the number of spots showing up on the face of the die. Letβs define a random variable X as the number of spots on the face of the die after rolling it once. Since a die has six faces with an equal probability of landing face up, the random variable X can take on any value in the set {1,β2,β3,β4,β5,β6}.
To describe the probability distribution of X, we assign a probability to each of its possible values. In this case, since the die is fair and each face has an equal chance of showing up, the probability distribution for X can be expressed as:
$$P(X = x) = \frac{1}{6}\,,\quad \text{for } x \in \{1, 2, 3, 4, 5, 6\}.$$
Note that $\sum_{x = 1}^{6} P(X = x) = 1$, which is a fundamental property that the total probability of all possible values of a random variable must satisfy (i.e., the sum of all probabilities must equal 1).
In summary, a random variable is a function that assigns a numerical value to each possible outcome of a random experiment or process, and it is used to describe their probability distributions. It can be either discrete or continuous, depending on the nature of the experiment or process.