Random variables
随机变量
What is a random variable?
A random variable is a function on the sample space assigning a real number to each outcome.
Sign in to read the whole lesson, with 8 exercises
Sign in / Sign upMastery goals
- Can define a random variable as a function on a sample space
- Can classify random variables as discrete or continuous
7.2 Discrete Random Variables and Their Distributions
To find the probability of a random event, we often need to set up a sample space for the random experiment, and we also meet the question of how to represent sample points and random events. A function sets up a correspondence between one set of numbers and another. In the same way, if we set up some correspondence between the sample space of a random experiment and the set of real numbers, it not only makes some random events easier to represent, but also lets us use mathematical tools to study random experiments better.
In some random experiments the sample points themselves are related to numbers, so they can be matched with real numbers directly. For example, when one die is rolled, the real number stands for "the number rolled is ". Again, when two dice are rolled, the sample space is ; using for "the sum of the numbers on the two dice", the sample point is matched with the real number .
In other random experiments the sample points have no direct connection with numbers. Then we can assign a number to each sample point as the problem requires. For example, when one product is drawn at random, there are two possible outcomes, "a defective item is drawn" and "a good item is drawn", and neither has anything to do with numbers. If stands for "a defective item is drawn" and for "a good item is drawn", that is, if we define
then the sample points of this experiment are matched with real numbers.
Similarly, when a coin is tossed, the outcome "heads up" can be represented by and "tails up" by ; when students' overall PE test results are surveyed at random, the grades excellent, good, fair, pass and fail can be given the values ; and so on.
For any random experiment, each of its sample points can always be matched with a real number. That is, we introduce a variable whose value depends on the sample point, use it to describe the correspondence between sample points and real numbers, and so turn sample points into numbers. Because which sample point occurs in a random experiment is random, the value of the variable is random too.
For Experiment 1, let stand for "the component is good" and for "the component is defective", and represent each sample point by a string of s and s of length . Then the sample space is
The correspondence between the sample points and the values of the variable is as follows (Figure 7.2-1 in the textbook):
| Sample point in | Value of |
|---|---|
For Experiment 2, let h stand for "heads up" and t for "tails up"; for example, tth means that heads first appears on the 3rd toss. Then the sample space is
and contains infinitely many sample points. The correspondence between the sample points and the values of the variable is shown in the figure below (Figure 7.2-2 in the textbook).
In the two random experiments above, each sample point is matched with exactly one real number. The variables and have the following in common:
(1) their values depend on the sample point;
(2) all their possible values are clearly known.
In general, if each sample point in the sample space of a random experiment is matched with a unique real number , we call a random variable. In Experiment 1 the possible values of the random variable are , four values in all; in Experiment 2 the possible values of the random variable are , infinitely many values, but they can be listed one by one. A random variable like these, whose possible values are finitely many or can be listed one by one, is called a discrete random variable. Random variables are usually written with capital letters, such as , and their values with lower-case letters, such as .
The idea of a random variable was set up and promoted by the Russian mathematician Chebyshev (1821–1894) in the middle of the 19th century.
It is easy to see that the definition of a random variable is like the definition of a function: the sample point plays the part of the independent variable in the definition of a function, and the sample space plays the part of the domain; the difference is that need not be a set of numbers. The value of a random variable changes as the outcome of the experiment changes, which lets us represent some random events quite conveniently.
There are many examples of discrete random variables in real life. For example, the score that a shooter may hit with one shot has possible values ; the number of times that a web page is viewed in hours has possible values ; and so on.
There are also many random variables in real life that are not discrete. For example, the measurement error of the water content of seeds; the service life of a certain brand of television; the measurement error made when measuring the length of a machine part. The possible values of these random variables fill up some interval and cannot be listed one by one. In this section we study only discrete random variables that take finitely many values.
Related points
All points in this topicCite this page: Random variables · KnowledgeTree (知识树), https://www.knowledgetree.world/en/kp/KP000849