You are on page 1of 4

4.

2: RANDOM VARIABLES
Objectives Random Variable ( X ) is a rule that assigns a number to every
After completing this section you will outcome in the experiment.
be able to describe:
The nature of a probability distribution is determined by the type of
A. Discrete random variables. random variable it models. There are two types of random variables:
B. Continuous random variables. Discrete random variables, and continuous random variables.

A. Discrete Random Variables


Probabilistic variables that are distinct and can be counted (countable) are called
Discrete Random Variables.

0.30
0.25
0.20
X: 0 1 2 3 4 5 6
Distinct Dots 0.15
(Gaps) 0.10
0.05
x
0 1 2 3 4 5 6
Values of X
Figure 4.1

Examples of Discrete Random Variables


1. In a coin flip experiment, we may choose a random variable that assigns numbers 0 and 1 to the
outcomes as follows:
0 to H (heads).
1 to T (tails).
Note: The choice of assigning these specific values are arbitrary.

2. In a game of Roulette with a $5 initial bet on a number, we need to choose a random variable that
assigns {– $5, $175} to the outcomes {losing, winning}.
Note: Here the rules of the game determine the random variable. Namely, losing the game
results in a loss of the initial bet and winning the game results in a net gain of 35
times the original bet. Hence, the assignment of values is not arbitrary.

3. If we are interested in classifying random samples of 10 students based on the number of students
that are left handed, we will choose a random variable that assigns each random sample with the
number of students that are left handed. Therefore, this random variable can take any one of values
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}.
4. If we are interested in classifying families with 5 children based on the number of girls in each
family, we will choose a random variable that assigns each family with the number of girls.
Therefore, this random variable will take any one of values {0, 1, 2, 3, 4, 5}.

Ch 4: Discrete Probability Distributions • 116


5. Consider a large number of airports each serving several departing flights per day. If we are
interested in classifying airports based on the number of delayed flights per day, we would choose
a random variable that assigns each airport with one of the values {0, 1, 2, 3, 4, 5, 6, 7, …, n}.

B. Continuous Random Variables


A random variable is called a continuous random variable if its values assume real numbers in
some interval.
P

0.20
0.15
0.10
0.5
0.05
X :0 1 2 3 4 5 6
Infinitely many Dots 0 1 2 3 4 5 6
(No Gaps) Values of X
Figure 4.2

Examples of Continuous Random Variables


1. In an experiment of reading the voltage of electrical circuits using a voltmeter, the voltage
reading is a continuous random variable.
2. In an experiment monitoring the body temperature of a child in a given day, the body
temperature is a continuous random variable.
3. In a statistics exam, the time it takes to finish the test is a continuous random variable.
Note: The values that a continuous random variable can take are not countable.

Continuous random variable will be studied in detail in the next chapter.


• Discrete Random Variables
Consider the experiment of rolling two dice. The sample space is as follows:
(1, 1) (1, 2) (1, 3) (1, 4) (1, 5) (1, 6)
(2, 1) (2, 2) (2, 3) (2, 4) (2, 5) (2, 6)
(3, 1) (3, 2) (3, 3) (3, 4) (3, 5) (3, 6)
(4, 1) (4, 2) (4, 3) (4, 4) (4, 5) (4, 6)
(5, 1) (5, 2) (5, 3) (5, 4) (5, 5) (5, 6)
(6, 1) (6, 2) (6, 3) (6, 4) (6, 5) (6, 6)
When an experiment is performed, there are many possible outcomes. For instance, in the above
experiment every simple outcome is presented and it can easily be determined that the probability for
1
each simple outcome is .
36
However, in most statistical studies, while performing an experiment, we may only be interested in a
particular aspect of the outcomes of the experiment (an event), rather than every outcome in the sample
space. For example, in the above experiment, we may be interested in the sum of the dots when 2 dice
are rolled. Let, the random variable (X) represent the sum of the dots when two dice are rolled. Now
X can take any one of the values 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, and 12 as displayed in the Figure 4.3.

4.2: Random Variables • 117


Output (1, 1) (1, 2) (1, 3) (1, 4) (1, 5) (1, 6)
X 2 3 4 5 6 7
(2, 1) (2, 2) (2, 3) (2, 4) (2, 5) (2, 6)
3 4 5 6 7 8
(3, 1) (3, 2) (3, 3) (3, 4) (3, 5) (3, 6)
4 5 6 7 8 9
(4, 1) (4, 2) (4, 3) (4, 4) (4, 5) (4, 6)
5 6 7 8 9 10
(5, 1) (5, 2) (5, 3) (5, 4) (5, 5) (5, 6)
6 7 8 9 10 11
(6, 1) (6, 2) (6, 3) (6, 4) (6, 5) (6, 6)
7 8 9 10 11 12
Figure 4.3

Notes: 1. A random variable is denoted by capital letters X, Y, Z etc., and the particular values
which the random variable takes are denoted by lower case letters x, y, z etc.

2. In the study of random variables, it is important to distinguish between a random


variable and its values. For example, in three tosses of a fair coin, the number of
tails is the random variable which can take any one of the four values 0, 1, 2, or 3.

Example 1: Ten senators are randomly selected from a group of 15 democrats and 20 republicans. Let
a random variable X denote the number of democrats selected. What are the possible values
that X can take?
Solution: In this example X is a discrete random variable which can take any one of following possible
values 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 or 10.

Example 2: A coin is tossed three times. Write the sample space of the experiment and the values of
the random variable X, where
(a) X is the number of tails,
(b) X is the difference between the number of heads and the number of tails.
Solutions: The sample space (S) of the experiment is
S = {HHH, HHT, HTH, THH, HTT, THT, TTH, TTT}.
(a) X = Number of tails
Outcomes X
HHH 0
HHT 1
HTH 1
THH 1 ⇒ X = {0, 1, 2, 3}
HTT 2
THT 2
TTH 2
TTT 3
Table 4.1

Ch 4: Discrete Probability Distributions • 118


(b) X = number of heads – number of tails
Outcomes X
HHH 3–0=3
HHT 2–1=1
HTH 2–1=1
THH 2–1=1 ⇒ X = {– 3, – 1, 1, 3}
HTT 1 – 2 = –1
THT 1 – 2 = –1
TTH 1 – 2 = –1
TTT 0 – 3 = –3
Table 4.2

Example 3: A box contains three defective and seven good transistors. A transistor is selected at random.
If it is defective, it is discarded and a new transistor is tried. The process continues until a
good transistor is selected. Let the random variable X represent the number of draws
required until a good transistor is selected. Draw a tree diagram for the experiment and
write the numerical values of the random variable X.
Solution: Let D represent defective transistors and G represent good transistors.
1st Draw 2nd Draw 3rd Draw 4th Draw
D G (STOP)

G (STOP)
D

G (STOP)

G (STOP)
Figure 4.4

⇒ sample space S = {G, DG, DDG, DDDG}. Recall that the random variable X represents
the number of draws required to select a good transistor. The numerical values of the random
variable X along with the outcomes are given in the table 4.3.
Outcome X
G 1
DG 2
DDG 3
DDDG 4
Table 4.3

Note: In most cases we can list only the values of the random variable without describing
the sample space of the experiment. However, description of the sample space
is useful in finding the probabilities corresponding to the values of the random
variable.

4.2: Random Variables • 119

You might also like