What is a Random Variable?
Random Variable
- It is also called a stochastic variable.
- It is a numerical description of the outcome of a statistical experiment.
- It is a set of possible values from a random experiment.
- It is a variable, denoted as
or any capital letter of the alphabet.
There are two types of random variables:
- Discrete
- It is an outcome obtained via a counting process.
- A random variable is discrete when the set of possible outcomes are countable.
- Examples: number of soda cans, number of chairs, number of students in class
- Continuous
- It is an outcome obtained from a measurement.
- A random variable is discrete when the set of possible outcomes takes on values on a continuous scale.
- Examples: height, weight, volume of water, amount of solution in an alcohol, etc.
Problems involving Random Variables
Problem
Suppose two coins are tossed. Let
be the random variable representing the number of heads that occur. Find the values of the random variable . Solution
Step 1: First, create a tree diagram to find all possible outcomes for tossing two coins.
stateDiagram-v2 t1a : H t1b : T t2aa : H t2ab : T t2ba : H t2bb : T direction LR t1a --> t2aa t1a --> t2ab t1b --> t2ba t1b --> t2bbStep 2: Next, build the sample space.
stateDiagram-v2 t1a : H t1b : T t2aa : H t2ab : T t2ba : H t2bb : T s1 : HH s2 : HT s3 : TH s4 : TT direction LR t1a --> t2aa t1a --> t2ab t1b --> t2ba t1b --> t2bb t2aa --> s1 t2ab --> s2 t2ba --> s3 t2bb --> s4Therefore, the sample space is:
Step 3: Since the random variable
is the number of heads that might occur, we count the number of heads inside the sample space.
Possible Outcomes Number of Heads Therefore, the possible values of the random variable
are , , and .
Problem
Suppose three coins are tossed. Let
be the random variable representing the number of tails that occur. Find the values of the random variable . Solution
Step 1: Create a tree diagram that represents all possible outcomes of the random variable, then determine the sample space.
stateDiagram-v2 t1a : H t1b : T t2aa : H t2ab : T t2ba : H t2bb : T t3aaa : H t3aab: T t3aba : H t3abb : T t3baa: H t3bab : T t3bba : H t3bbb : T s1 : HHH s2: HHT s3 : HTH s4 : HTT s5: THH s6: THT s7: TTH s8 : TTT direction LR t1a --> t2aa t1a --> t2ab t1b --> t2ba t1b --> t2bb t2aa --> t3aaa t2aa --> t3aab t2ab --> t3aba t2ab --> t3abb t2ba --> t3baa t2ba --> t3bab t2bb --> t3bba t2bb --> t3bbb t3aaa --> s1 t3aab --> s2 t3aba --> s3 t3abb --> s4 t3baa --> s5 t3bab --> s6 t3bba --> s7 t3bbb --> s8Therefore, the set of all sample space outcomes are:
Step 2: Since the random variable
is the number of tails, we then count the number of tails for each outcome.
Outcome Number of Tails Therefore the possible values for the random variable
are:
Problem
Two balls are drawn in succession without replacement from a box containing 5 red balls and 6 blue balls. Let
be the random variable representing the number of blue balls. Find the values of the random variable . Solution
Step 1: We build a tree diagram to find the number of possible outcomes of red and blue balls in two draws.
stateDiagram-v2 t1a : R t1b : B t2aa : R t2ab : B t2ba : R t2bb : B s1 : RR s2 : RB s3 : BR s4 : BB direction LR t1a --> t2aa t1a --> t2ab t1b --> t2ba t1b --> t2bb t2aa --> s1 t2ab --> s2 t2ba --> s3 t2bb --> s4Therefore, the sample space is:
Step 2: Since our random variable
is the number of blue balls drawn, we then count the number of blue balls for each outcome.
Possible Outcomes Number of Blue Balls Therefore, the possible values of the random variable
are , , and .
Problem
Write the possible values of each random variable.
: The number of even number outcomes in a roll of a siz-sided die. Solution
Since the even numbers in a six-sided die are only
, , and , therefore
: Weight (in mg) of a powder that does not exceed 80 mg. Solution
Since weight cannot be negative, and it cannot be greater than
, therefore
: Scores of a student in a -item test Solution
A student cannot score higher than
since it is a -item test. Likewise, a student cannot also score less than as well. Therefore,
: A product of two numbers taken from two boxes containing numbers from 0 to 5. Solution
To find the values of
, it’s better that we use a table to demonstrate this: We assign the rows to be the number that you take from the first box, and the columns to be the number that you take from the second box
Multiplying the rows and the columns should give you each possible outcome.
Therefore, the values of
are:
What is a Discrete Probability Distribution?
- It is a table that gives a list of probability values, along with their associated value in the range of a discrete random variable.
- It is also known as the probability mass function.
Properties of a Probability Distribution
- Each probability values ranges from 0 to 1
- The sum of all individual probabilities in the distribution is equal to
.
Examples involving Discrete Probability Distributions
Problem
Three coins are tossed, and the random variable
gives the number of heads.
Create a probability distribution using the random variable. Solution
Step 1: Determine the range space.
The range space is all possible values of the random variable. Since tossing three coins gives us the sample space: Therefore the values of the random variable
or the number of possible heads are . Step 2: Create a Probability Table
Our next goal is to find the frequency.
To find the frequency, we ask ourselves how many times does an outcome hasheads? How about head? or heads?
- Since only
outcome only has 0 heads, therefore the frequency is . - Since
outcomes have 1 head, the frequency is - Since
outcomes have 2 heads, the frequency is as well. - Since only
outcome have 3 heads, the frequency is simply . Therefore, we write this as:
Number of Heads Frequency Step 3: Computing the Probability
To compute the probability of an event, we use the formula:Since there are
total outcomes, we simply divide the frequency by .
Number of Heads Frequency
Problem
An investor has 5 stocks that she follows each day. The random variable being studied is
. Based on the table below, find
Solution
Since we know that the sum of all probabilities are equal to
, therefore: We can substitute all known values first, then we solve for
. Therefore, the probability that the investor has zero stocks is
.
Problem
A random variable
can take the values , , and . If: Are the given values a valid probability distribution? Why or why not?
Solution
In a valid probability distribution, all probabilities must add up to
.
Therefore:Since the probabilities does not add up to
, then it is not a valid probability distribution.