You are on page 1of 51

DISCRETE RANDOM

VARIABLES
Ron Angelo R. Gatinga
Special Science Teacher I
LEARNING OBJECTIVES
At the end of this session, the learners shall be able to:
1. illustrate/provide examples of random variables
2. distinguish between discrete and continuous random variables
3. find the possible values of a discrete random variable
4. find the mean and variance of a discrete random variable
STATISTICAL EXPERIMENT
 An activity that will produce outcomes, or a process that will generate
data.
 The outcomes have a corresponding chance of occurrence.
 Examples of which are (a) tossing three coins and counting the
number of heads, (b) recording the time a person can hold his/her
breath, (c) counting the number of students in the classroom who are
present today, (d) obtaining the height of a student, etc.
EXAMPLE: TOSSING A COIN
 What are the possible results of tossing Outcome Chance of
one coin? Outcome
 Heads(H) or Tails(T)
 What are the possible results of tossing 0 heads 1/4 or 0.25
two coins? (TT)
 Possible outcomes: two heads (HH), two
1 head 2/4 or 0.50 (HT
tails (TT), one head and one tail (HT),
and one tail and one head (TH). or TH)
 Count the number of heads and the 2 heads 1/4 or 0.25
chance or probability of getting the
result (HH)
RANDOM VARIABLE AND PROBABILITY
DISTRIBUTION

 A random variable is a variable that has a single


numerical value, determined by chance, for each
outcome of a procedure.
 A probability distribution is a description that gives the
probability for each value of the random variable. It is
often expressed in the format of a table, formula, or
graph.
RANDOM VARIABLE AND PROBABILITY
DISTRIBUTION
Outcome (X) Chance of
 Random variables Outcome [P(X)]
are not real 0 heads 1/4 or 0.25
mathematical (TT)
variables, but they 1 head 2/4 or 0.50 (HT
are functions, or TH)
denoted by P(X). 2 heads 1/4 or 0.25
(HH)
DISCRETE VS. CONTINUOUS RANDOM
VARIABLES
 A discrete random variable has a collection of values that is finite or
countable. (If there are infinitely many values, the number of values
is countable if it is possible to count them individually, such as the
number of tosses of a coin before getting heads.)
 A continuous random variable has infinitely many values, and the
collection of values is not countable. (That is, it is impossible to
count the individual items because at least some of them are on a
continuous scale, such as body temperatures.)
IDENTIFY THE TYPE OF RANDOM VARIABLE
a. The time it takes a student selected at random to register for the fall semester
b. The number or bad checks drawn on Land Bank on a day selected at random
c. The amount of gasoline needed to drive your car 200 miles
d. The number of traffic fatalities per year in Quezon City
e. The distance a golf ball travels after being hit with a driver
f. The number of ships in Shaniqua Nicole de Guzman Harbor on any given day
g. Your weight before breakfast each morning
PROBABILITY DISTRIBUTION
REQUIREMENTS
Every probability distribution must satisfy each of the following three
requirements.
1. There is a numerical (not categorical) random variable x, and its
numerical values are associated with corresponding probabilities.
2. σ 𝐏 𝐱 = 𝟏, where x assumes all possible values. (The sum of all
probabilities must be 1, but sums such as 0.999 or 1.001 are
acceptable because they result from rounding errors.)
3. 0 ≤ P x ≤ 1 for every individual value of the random variable x.
(That is, each probability value must be between 0 and 1 inclusive.)
ARE THESE VALID PROBABILITY
DISTRIBUTIONS?
X 0 1 2 3
P(X) 0.11 0.15 0.42 0.44
RED BLUE YELLOW GREEN
X
P(X) 1/4 1/4 1/4 1/4
X 1 2 3 4
P(X) 0.32 0.28 0.28 0.12
X 0 2 4 6
P(X) 1/5 1/5 1/5 1/5
CONSTRUCTING PROBABILITY DISTRIBUTIONS
CONSTRUCTING PROBABILITY DISTRIBUTIONS
Example: X P(X)
Suppose Nancy has classes three
days a week. She attends classes 0 1% = 0.01
three days a week 80% of the time,
two days 15% of the time, one day 1 4% = 0.04
4% of the time, and no days 1% of
the time. Suppose one week is 2 15% = 0.15
randomly selected.
Let X = ? 3 80% = 0.80
Let X = number of days Nancy
attends classes per week
CONSTRUCTING PROBABILITY DISTRIBUTIONS

Example:
Let X denote the number Outcomes X P(X)
of boys in a randomly GGG 0 1/8 = 0.125
selected three-child
family. Assuming that BGG,GBG,GGB 1 3/8 = 0.375
boys and girls are BBG,BGB,GBB 2 3/8 = 0.375
equally likely, construct BBB 3 1/8 = 0.125
the probability
distribution of X.
CONSTRUCTING PROBABILITY DISTRIBUTIONS
Example:
In a box, there are 5 red balls and 3 blue balls. Two balls were drawn with replacement. Count the
number of blue balls and construct the probability distribution.
Clue: Probability of getting red ball = 5/8 while the probability of getting blue ball is 3/8.
 With replacement = a ball is returned after drawing, giving it a chance to be drawn again.

Outcomes X
RR 0
RB, BR 1
BB 2
Probability of getting 0 blue balls (getting 2 red balls):
5 5
= •
8 8
𝟐𝟓
= = 0.390625
𝟔𝟒
Probability of getting 1 red ball (one red ball and one blue ball):
5 3
= • •2
8 8
𝟑𝟎
= = 0.46875
𝟔𝟒
Probability of getting 2 blue balls:
3 3
= •
8 8
𝟗
= = 0.140625
𝟔𝟒
CONSTRUCTING PROBABILITY DISTRIBUTIONS
Example:
In a box, there are 5 red balls and 3 blue balls. Two balls were drawn with replacement. Count the
number of blue balls and construct the probability distribution.
Clue: Probability of getting red ball = 5/8 while the probability of getting blue ball is 3/8.
 With replacement = a ball is returned after drawing, giving it a chance to be drawn again.

Outcomes X P(X)
RR 0 25/64 = 0.391
RB, BR 1 30/64 = 0.469
BB 2 9/64 = 0.141
CONSTRUCTING PROBABILITY DISTRIBUTIONS
Example:
In a box, there are 5 red balls and 3 blue balls. Two balls were drawn without replacement. Count the
number of blue balls and construct the probability distribution.
 Without replacement = a ball is not returned after drawing

Outcomes X
RR 0
RB, BR 1
BB 2
Probability of getting 0 blue balls Probability of getting 1 blue ball (first
(getting 2 red balls back to back): blue ball or second blue ball:
5 4 15 15
= • = +
8 7 56 56
𝟐𝟎 𝟓 𝟑𝟎 𝟏𝟓
= or = 0.3571428571 = 𝒐𝒓 = 0.5357142857
𝟓𝟔 𝟏𝟒 𝟓𝟔 𝟐𝟖
Probability of getting 1 blue ball first:
3
= •
5 Probability of getting 2 blue balls back
8 7
15
to back:
= = 0.2678571429 3 2
56 = •
Probability of getting 1 blue ball second: 8 7
𝟔 𝟑
5 3 = or = 0.1071428571
= • 𝟓𝟔 𝟐𝟖
8 7
15
= = 0.2678571429
56
CONSTRUCTING PROBABILITY DISTRIBUTIONS
Example:
In a box, there are 5 red balls and 3 blue balls. Two balls were drawn without replacement. Count the
number of blue balls and construct the probability distribution.
 Without replacement = a ball is not returned after drawing

Outcomes X P(X)
RR 0 5/14 = 0.357
RB, BR 1 15/28= 0.536
BB 2 3/28 = 0.107
CONSTRUCTING PROBABILITY DISTRIBUTIONS
Example:
A service organization in a large town
organizes a raffle each month. One
X P(X)
thousand raffle tickets are sold for $1 -1 997/1000 = 0.997
each. Each has an equal chance of
winning. First prize is $300, second 99 1/1000 = 0.001
prize is $200, and third prize is $100. 199 1/1000 = 0.001
Let X denote the net gain from the
purchase of one ticket. 299 1/1000 = 0.001
Let X denote the net gain from the
purchase of one ticket.
CONSTRUCTING PROBABILITY
DISTRIBUTIONS
Your Turn:
Javier volunteers in community events each month. He
does not do more than five events in a month. He
attends exactly five events 35% of the time, four
events 25% of the time, three events 20% of the time,
two events 10% of the time, one event 5% of the time,
and no events 5% of the time.
Let X = ?
CONSTRUCTING PROBABILITY
DISTRIBUTIONS
Your Turn:
A life insurance company will sell a $200,000 one-year
term life insurance policy to an individual in a
particular risk group for a premium of $195. Find the
expected value to the company of a single policy if a
person in this risk group has a 99.97% chance of
surviving one year.
Let X = ?
CONSTRUCTING PROBABILITY
DISTRIBUTIONS
Your Turn:
A roulette wheel has 38 slots. Thirty-six
slots are numbered from 1 to 36; half of
them are red and half are black. The
remaining two slots are numbered 0 and
00 and are green. In a $1 bet on red, the
bettor pays $1 to play. If the ball lands in
a red slot, he receives back the dollar he
bet plus an additional dollar. If the ball
does not land on red, he loses his dollar.
Let X = ?
DETERMINING PROBABILITIES BASED ON THE
PROBABILITY DISTRIBUTION
DETERMINING PROBABILITIES BASED ON
THE PROBABILITY DISTRIBUTION
Example:
Outcomes X P(X)
Toss a coin three
times. Let X = TTT 0 1/8

number of heads. TTH, HTT,THT 1 3/8

Construct the THH,HTH,HH 2 3/8


T
probability HHH 3 1/8
distribution table.
DETERMINING PROBABILITIES BASED ON
THE PROBABILITY DISTRIBUTION
Example: 1. What is P(X=1)?
Outcomes X P(X)
Toss a coin three
times. Let X = TTT 0 1/8

number of heads. TTH, HTT,THT 1 3/8

Construct the THH,HTH,HHT 2 3/8

probability HHH 3 1/8

distribution table. Answer: 3/8


DETERMINING PROBABILITIES BASED ON
THE PROBABILITY DISTRIBUTION
=3/8
Example: 2. P(X<3)
Outcomes X P(X) +3/8
Toss a coin three
times. Let X = TTT 0 1/8 +1/8
number of heads. TTH, HTT,THT 1 3/8

Construct the THH,HTH,HHT 2 3/8

probability HHH 3 1/8

distribution table. Answer: 7/8


DETERMINING PROBABILITIES BASED ON
THE PROBABILITY DISTRIBUTION
=3/8
Example: 3. P(X ≥ 1)
Outcomes X P(X) +3/8
Toss a coin three
times. Let X = TTT 0 1/8 +1/8
number of heads. TTH, HTT,THT 1 3/8

Construct the THH,HTH,HHT 2 3/8

probability HHH 3 1/8

distribution table. Answer: 7/8


MORE EXAMPLES
Table 1: Frequency Distribution Table for the
Number of Siblings of Grade 11 Students
Number of F Rf Rf%
siblings
0 2 0.04 4
1 10 0.20 20
2 28 0.56 56
3 5 0.10 10
4 3 0.06 6
5 1 0.02 2
6 0 0.00 0
7 1 0.02 2
Total 50 1 100
MORE EXAMPLES 1. What is the probability that a randomly-
selected learner is an only child?
Table 1: Frequency Distribution Table for the
2. What is the probability that a randomly-
Number of Siblings of Grade 11 Students
selected learner has at most two
Number of F Rf Rf%
siblings
siblings?
3. What is the probability that a randomly-
0 2 0.04 4 selected learner has at least three
1 10 0.20 20 siblings?
2 28 0.56 56 4. What is the probability that a randomly-
3 5 0.10 10 selected learner has 2 < s ≤ 5 siblings?
4 3 0.06 6 5. What is the probability that a randomly-
5 1 0.02 2 selected learner has greater than 5 and
6 0 0.00 0
at most 2 siblings?
6. What is the probability that a randomly-
7 1 0.02 2
selected learner has between 0 and 3
Total 50 1 100
siblings?
BINOMIAL PROBABILITY DISTRIBUTION
BINOMIAL PROBABILITY DISTRIBUTION
Suppose a random experiment has the following characteristics:
1. There are n identical and independent trials of a common procedure.
2. There are exactly two possible outcomes for each trial, one termed
“success” and the other “failure.”
3. The probability of success on any one trial is the number p.
Then the discrete random variable X that counts the number of successes in
the n trials is the binomial random variable with parameters n and p. We also say
that X has a binomial distribution with parameters n and p.
BINOMIAL PROBABILITY DISTRIBUTION
S and F (success and failure) denote the two possible categories of all outcomes.
 P(S) = p = probability of a success
 P(F) = 1 - p = q = probability of a failure
 n = the fixed number of trials
 k = a specific number of successes in n trials, so k can be any whole number between
0 and n, inclusive
 p = probability of success in one of the n trials
 q = probability of failure in one of the n trials
 P(X=k) probability of getting exactly k successes among the n trials
Using these information, we can combine all of them into one binomial mass function:
𝑛 𝑘 𝑛−𝑘
𝑃 𝑋=𝑘 = 𝑝 𝑞
𝑘
𝑛
𝑘
= nCk
BINOMIAL MASS FUNCTION
𝑛 𝑘 𝑛−𝑘
𝑃 𝑋=𝑘 = 𝑝 (1 − 𝑝)
𝑘
BINOMIAL MASS FUNCTION (SUMMATION VERSION)
𝑛
𝑛 𝑘 𝑛−𝑘
෍ 𝑝 (1 − 𝑝)
𝑘
𝑥=𝑘
BINOMIAL MASS FUNCTION
𝑘 𝑛−𝑘
𝑃 𝑋 = 𝑘 = (nCk)𝑝 (1 − 𝑝)

BINOMIAL MASS FUNCTION (SUMMATION VERSION)


𝑛
𝑘 𝑛−𝑘
෍ nCk 𝑝 (1 − 𝑝)
𝑥=𝑘
𝑛 𝑘
EXAMPLES 𝑃 𝑋=𝑘 =
𝑘
𝑝 (1 − 𝑝)𝑛−𝑘
Let X be the number of tails tossing a coin 50 times. What is the
probability that 25 tails will occur?

50
𝑃 𝑋 = 25 = (0.5)25 (1 − 0.5)50−25
25
𝑷 𝑿 = 𝟐𝟓 = 𝟎. 𝟏𝟏𝟐𝟑 or 11.23%
𝑛 𝑘
EXAMPLES 𝑃 𝑋=𝑘 =
𝑘
𝑝 (1 − 𝑝)𝑛−𝑘
Let X be the number of tails tossing a coin 50 times. What is the
probability that 30 tails will occur?

50
𝑃 𝑋 = 30 = (0.5)30 (1 − 0.5)50−30
30
𝑷 𝑿 = 𝟑𝟎 = 𝟎. 𝟎𝟒𝟏𝟗 or 4.19%
𝑛 𝑘
EXAMPLES 𝑃 𝑋=𝑘 =
𝑘
𝑝 (1 − 𝑝)𝑛−𝑘
Suppose we are tossing a fair coin five times. Let Y = the number of
heads when tossing a coin five times. What is the probability that at
least three heads will occur?
5 𝑃 𝑌 ≥ 3 =
𝑃 𝑌=3 = (0.5)3 (1 − 0.5)5−3 0.3125 +
3
= 0.3125 0.15625 +
5
𝑃 𝑌=4 =
4
(0.5)4 (1 − 0.5)5−4 0.03125
= 0.15625
5
𝑃 𝑌=5 = (0.5)5 (1 − 0.5)5−5
5
= 0.03125 𝑷 𝒀 ≥ 𝟑 = 𝟎. 𝟓 𝐨𝐫 𝟓𝟎%
EXAMPLES
Let X be the number of tails tossing a coin 50 times.
𝑛 𝑘
𝑃 𝑋=𝑘 = 𝑝 (1 − 𝑝)𝑛−𝑘
𝑛
𝑘 1. P(X = 10)
𝑛 𝑘

𝑘
𝑝 (1 − 𝑝)𝑛−𝑘 2. P(X ≤ 20)
𝑥=𝑘
3. P(X < 10)
4. P(X ≥ 15)
5. P(3 ≤ X ≤ 20)
MEAN, VARIANCE, AND STANDARD DEVIATION OF A
DISCRETE RANDOM VARIABLE
MEAN OF A DISCRETE RANDOM VARIABLE
Given a discrete random variable X, the mean, denoted by
𝛍 is the sum of the products formed from multiplying the
possible values of X with their corresponding probabilities.

It is called the expected value of X and given a symbol E(X).

𝜇 = 𝐸 𝑋 = ෍[𝑋 • 𝑃 𝑋 ]
MEAN OF A DISCRETE RANDOM VARIABLE
Outcomes X P(X) X•P(X)
Example:
TTT 0*1/8 = 0
0 1/8
Toss a coin three
TTH, HTT,THT 1*3/8 = 3/8 = 0.375
1 3/8
times. Let X =
number of heads. THH,HTH,HHT 2 3/8 2*3/8 = 6/8 = 0.75

What is the HHH 3 1/8 3*1/8 = 3/8 = 0.375

mean/expected 𝜇 = 𝐸 𝑋 = ෍[𝑋 • 𝑃 𝑋 ] If we were to collect data

value of the discrete 𝐸 𝑋 = 0 + 0.375 + 0.75 + 0.375


on a large number of trials
with three coins in each
trial, we expect to get a
random variable? 𝑬 𝑿 = 1.5 mean of 1.5 heads.
MEAN OF A DISCRETE RANDOM VARIABLE
Example: X P(X) X•P(X)
Suppose Nancy has classes
three days a week. She attends 0 0.01 0*0.01 = 0
classes three days a week 80%
of the time, two days 15% of 1 0.04 1*0.04= 0.04
the time, one day 4% of the
time, and no days 1% of the 2 0.15 2*0.15 = 0.30
time. Suppose one week is
randomly selected. Let X = 3 0.80 3*0.80 = 2.4
number of days Nancy attends
classes per week. What is the 𝜇 = 𝐸 𝑋 = ෍[𝑋 • 𝑃 𝑋 ] On average, Nancy
mean/expected value of days
she attends classes in a week? 𝐸 𝑋 = 0 + 0.04 + 0.30 + 2.4 attends her classes
2.74 days a week.
𝑬 𝑿 = 2.74
MEAN OF A DISCRETE RANDOM VARIABLE
Your turn:
A service organization in a large town
X P(X)
organizes a raffle each month. One -1 0.997
thousand raffle tickets are sold for $1
each. Each has an equal chance of 99 0.001
winning. First prize is $300, second prize
is $200, and third prize is $100. Let X
199 0.001
denote the net gain from the purchase of 299 0.001
one ticket. Let X denote the net gain from
the purchase of one ticket. Find the
expected value and interpret it.
MEAN OF A DISCRETE RANDOM VARIABLE
Your Turn:
A roulette wheel has 38 slots. Thirty-six slots
are numbered from 1 to 36; half of them are
red and half are black. The remaining two
slots are numbered 0 and 00 and are green.
In a $1 bet on red, the bettor pays $1 to play.
If the ball lands in a red slot, he receives back
the dollar he bet plus an additional dollar. If
the ball does not land on red, he loses his
dollar.
Construct the probability distribution and find
the expected value and interpret it.
VARIANCE AND STANDARD DEVIATION OF A
DISCRETE RANDOM VARIABLE
The variance of a discrete random variable X, is the
weighted average of squared deviations of the values of
X from the mean where the weights are the respective
probabilities.
Variance of DRV X: σ2 = σ[(X – μ)2 •P(X)]
Standard Deviation of DRV X: σ = σ[(X – μ)2 •P(X)]
VARIANCE AND STANDARD DEVIATION OF A
DISCRETE RANDOM VARIABLE
Example: Outcomes X P(X) X•P(X) μ (X – μ) (X – μ)2 (X – μ)2•P(X)

Toss a coin three


TTT 0 1/8 = 0.125 0 1.5 -1.5 2.25 0.28125
times. Let X = number
of heads. What is the
TTH, HTT,THT 1 3/8 = 0.375 0.375 1.5 -0.5 0.25 0.09375
variance and standard
deviation of discrete
THH,HTH,HHT 2 3/8 = 0.375 0.75 1.5 0.5 0.25 0.09375
random variable X?

HHH 3 1/8 = 0.125 0.375 1.5 1.5 2.25 0.28125

σ𝟐 = 0.75 ෍[𝑋 • 𝑃 𝑋 ] = 1.5 σ[(X – μ)2 •P(X)] = 0.75

σ = 0.866 σ[(X – μ)2 •P(X)] = 0.866


VARIANCE AND STANDARD DEVIATION OF A
DISCRETE RANDOM VARIABLE
Example: X•P(X)
Suppose Nancy has classes three days a
X P(X) μ (X – μ) (X – μ)2 (X – μ)2•P(X)

week. She attends classes three days a


week 80% of the time, two days 15% of 0 0.01 0 2.74 -2.74 7.5076 0.075076

the time, one day 4% of the time, and no


days 1% of the time. Suppose one week 1 0.04 0.04 2.74 -1.74 3.0276 0.121104
is randomly selected. Let X = number of
days Nancy attends classes per week. 2 0.15 0.30 2.74 -0.74 0.5476 0.08214
What is the variance and standard
deviation of discrete random variable X? 3 0.80 2.4 2.74 0.26 0.0676 0.05408

σ𝟐 = 0.332 ෍[𝑋 • 𝑃 𝑋 ] = 2.74 σ[(X – μ)2 •P(X)] = 0.332

σ = 0.577 σ[(X – μ)2 •P(X)] = 0.577


VARIANCE AND STANDARD DEVIATION OF A
DISCRETE RANDOM VARIABLE
Your turn:
A service organization in a large town
X P(X)
organizes a raffle each month. One -1 0.997
thousand raffle tickets are sold for $1
each. Each has an equal chance of 99 0.001
winning. First prize is $300, second prize
is $200, and third prize is $100. Let X
199 0.001
denote the net gain from the purchase of 299 0.001
one ticket. Let X denote the net gain from
the purchase of one ticket. Find the
variance and standard deviation.
VARIANCE AND STANDARD DEVIATION OF A
DISCRETE RANDOM VARIABLE
Your Turn:
A roulette wheel has 38 slots. Thirty-six slots
are numbered from 1 to 36; half of them are
red and half are black. The remaining two
slots are numbered 0 and 00 and are green.
In a $1 bet on red, the bettor pays $1 to play.
If the ball lands in a red slot, he receives back
the dollar he bet plus an additional dollar. If
the ball does not land on red, he loses his
dollar. Construct the probability distribution,
and find the variance and standard deviation.

You might also like