Lecture 4
Chapter: 4
Random Variables and
Probability Distributions
What you will learn
Binomial
Section 4.3
Discrete
Poisson and
Section 4.2
Hypergeometric
Section 4.4
Random
Variables
Section 4.1 Normal
Section 4.6
Continuous
Section 4.5
Uniform and
Exponential
Section 4.7
3
Thinking Challenge
➢You’re taking a 33 question
multiple choice test. Each
question has 4 choices. Clueless
on 1 question, you decide to
guess. What’s the chance you’ll
get it right?
➢If you guessed on all 33
questions, what would be your
grade?
4
Random Variable
➢A random variable is a variable/quantity that assigns
numerical values to the possible outcomes (sample
point) of an experiment.
A sample point ∈Ω Real value X( ) ∈
5
𝜔
𝜔
𝑅
Example: Coin Toss Once
➢ The face of a flipped coin:
Sample point Value
{0
1 =
• ( ) =
= Head 1
➢ = {0
1 h 0.5 Tail 0
h 0.5
➢ One (and only one) numerical value is assigned to each
possible outcome
➢ Notation: Random variable (r.v.): , , .
Possible numerical values, (0,1), ,
𝑤
𝑖
𝑡
𝑝
𝑟
𝑜
𝑏
𝑎
𝑏
𝑖
𝑙
𝑖
𝑡
𝑦
𝜔
𝑇
𝑎
𝑖
𝑙
6
𝑋
𝑋
𝜔
𝜔
𝐻
𝑒
𝑎
𝑑
𝑤
𝑖
𝑡
𝑝
𝑟
𝑜
𝑏
𝑎
𝑏
𝑖
𝑙
𝑖
𝑡
𝑦
𝑋
𝑥𝑦𝑧
𝑌
𝑍
Example: Coin Toss Twice
➢ Define a random variable as “Total number of heads observed”
0 1 2
0 =
( )= 1 = ,
➢
2 =
𝜔
𝐻
𝐻
➢ ( = 0) = 0.25, ( = 1) = 0.5, ( = 2) = 0.25
𝜔
𝑇
𝐻
𝐻
𝑇
𝑋
𝜔
7
𝜔
𝑇
𝑇
𝑃
𝑃
𝑃
𝑋
𝑋
𝑋
𝑅
Types of Random Variables
Section 4.1
Discrete Random Variable
➢Discrete random variable
• Assigned values are countable number (0, 1, 2, etc.)
• Obtained by counting
9
Discrete R.V. Example (Finite)
Wine Ratings
➢ A sample point is a sequence of 10 numbers with rating of each
expert.
• For example, = {1,0, 0,1, 2,0, 0,3, 1,0}
• = 410 = 1,048, 576
➢ Random variable ( )= 10
• The smallest is ({ 0}) = 0
• The largest is ({ 3}) = 30
• ( )=8
• Possible values of ( ) are {0,1, 2, ⋯, 28, 29, 30}
𝑖
𝑖
𝑆
𝑋
𝜔
𝑠
𝑢
𝑚
𝑜
𝑓
𝑎
𝑙
𝑙
𝑟
𝑎
𝑡
𝑖
𝑛
𝑔
𝑖
𝑛
𝜔
𝑋
𝑋
𝑋
𝜔
𝑎
𝑎
𝑙
𝑙
𝑙
𝑙
𝜔
𝑋
𝜔
Discrete R.V. Example (Finite)
Wine Ratings
➢ Sample space = 410 = 1,048, 576
➢ Random variable ( )= 10
➢ Possible values of ( ) are 31 values
➢ Finite number of distinct possible values, discrete random
variables jump from one possible value to the next
➢ from over 1 million sample points to 31 values of the random
variables.
𝑆
𝑋
𝜔
𝑠
𝑢
𝑚
𝑜
𝑓
𝑎
𝑙
𝑙
𝑟
𝑎
𝑡
𝑖
𝑛
𝑔
𝑖
𝑛
𝜔
𝑋
𝜔
Discrete R.V. Example (Infinite countable)
EPA Applications
➢ The company’s discharge of pesticide may exceed the maximum allowable
level on the first month, the second month, and so on. — discrete
➢ It is also possible that the company’s discharge will never exceed the
maximum level.
➢ ∈ {1, 2, 3, 4, ⋯⋯}
➢ Infinite many values but countable
𝑋
Discrete R.V. Examples (Cont’n)
Experiment Random Possible
Variable Values
Make 100 Sales Calls # Sales 0, 1, 2, ..., 100
Inspect 70 iPhones # Defective 0, 1, 2, ..., 70
Answer 33 Questions # Correct 0, 1, 2, ..., 33
13
Discrete R.V. Examples (Cont’n)
➢ The number of sales made by a salesperson in a given
week: x = 0, 1, 2, …
➢ The number of consumers in a sample of 500 who favor a
particular product over all competitors: x = 0, 1, 2, …, 500
➢ The number of bids received in a bond offering: x = 0, 1,
2, …
➢ The number of errors on a page of an accountant’s ledger:
x = 0, 1, 2, …
➢ The number of customers waiting to be served in a
restaurant at a particular time: x = 0, 1, 2, …
Continuous Random Variable
➢Continuous Random Variable
• Obtained by measuring (as compared to counting)
• Infinite and uncountable number of values in the
interval
15
Discrete R.V. Example (Infinite countable)
Another EPA Applications
EPA monitors the amount of pesticide in the discharge water of a
chemical company. A second random variable of interest is the
amount of pesticide (in milligrams per liter) found in the monthly
sample of discharge waters from the chemical company. What values
can this random variable assume?
➢ The set of all possible values for the amount of discharge
cannot be listed – that is, not countable.
➢ For example, could be any real value between 0 and 500
milligrams per liter.
➢ not countable but instead correspond to the points on some
interval continuous random variable
𝑥
𝑥𝑋
Continuous Random Variable
Examples
Experiment Random Possible
Variable Values
Weigh People Weight (kg) 45.1, 78, ...
Money spent on food Amount ($) 54.12, 42, ...
➢ For any two values of a continuous r.v., there are an infinite
number of other possible values in between.
17
Example: Continuous Random Variables
➢The length of time between arrivals at a hospital clinic:
0≤ x<∞
➢The amount of carbonated beverage loaded into a 12-
ounce can in a can-filling operation: 0 ≤ x ≤ 12
➢The depth at which a successful oil-drilling venture
first strikes oil: 0 ≤ x ≤ c, c is the maximum depth
obtainable
➢The weight of a food item bought in a supermarket:
0 ≤ x ≤ 500
[Note: Theoretically, there is no upper limit on x, but it
is unlikely that it would exceed 500 pounds.]
Probability Distributions for
Discrete Random Variables
Section 4.2
Discrete Probability Distribution
➢List of all possible [x, p(x)] pairs
• x = value of random variable (discrete values
assigned to outcome)
• p(x) = probability of each outcome
= probability of the associated with value
➢For each possible value , only one number ( ) is
assigned
20
𝑝
𝑥
𝑥
Discrete Distribution Example
➢ Today's closing price of a security relative to yesterday.
1
= 0 h
−1
Sample point Value Assigned Probability
Up: ( ) 1 (1) = ( )
Unchanged (0) = ( h )
0
( h )
Down −1 (−1) = ( )
( )
➢ ( ): → [0,1] (probability distribution function PDF)
• 0 ≤ p(x) ≤ 1 for all x
𝑔
𝑜
𝑒
𝑠
𝑑
𝑜
𝑤
𝑛
• Σ p(x) = 1
𝑌
𝑢
𝑛
𝑐
𝑎
𝑛
𝑔
𝑒
𝑑
21
𝑝
𝑥
𝑥
𝑔
𝑜
𝑒
𝑠
𝑢
𝑝
𝑝
𝑝
𝑝
𝑝
𝑝
𝑝
𝑢
𝑢
𝑝
𝑛
𝑑
𝑐
𝑜
𝑤
𝑎
𝑛
𝑛
𝑔
𝑒
𝑑
𝑝
𝑝
𝑝
𝑢
𝑢
𝑑
𝑝
𝑛
𝑜
𝑤
𝑐
𝑛
𝑎
𝑛
𝑔
𝑒
𝑑
Discrete Distribution Example
Coin-Tossing
➢ Experiment of tossing two coins. Define a r.v. as the number
of heads observed. Assuming the two coins are fair, find the
probability distribution of .
➢ Solution:
• List all the possible values of
• = {0,1, 2}
• Calculate probability
1
• ( = 0) = ( )=
4
2 1
• ( = 1) = ( )+ ( )= =
4 2
1
• ( = 2) = ( )=
4
22
𝑃
𝑃
𝑃
𝑋
𝑋
𝑋
𝑃
𝑃
𝑃
𝑇
𝐻
𝐻
𝑇
𝐻
𝑇
𝑃
𝑇
𝐻
𝑋
𝑋𝑋
𝑋
Discrete Distribution Example
Coin-Tossing
➢ Experiment of tossing two coins. Define a r.v. as the number
of heads observed. Assuming the two coins are fair, find the
probability distribution of .
Tabular form
➢ The probability distribution formula (later) 23
𝑋𝑋
Discrete Distribution Example
Playing Craps
➢ Craps is a popular casino game in which two players throws
two dice and bets on the outcome -- the sum of the number
showing on the upper faces of the two dice.
➢ Consider a $5 wager. If the total is 7 or 11, the roller wins $5. If
the outcome is 2, 3, or 12, the roller losses $5. For any other
outcomes (4, 5, 6, 8, 9, and 10), no money is lost or won, that
is, the roller wins $0.
➢ Define a r.v. as the outcome roller wager, find its distribution.
Sample space S = { } Random Variable
( ) ∈ {−5, 0, 5}
24
𝑋
𝜔
𝜔
Discrete Distribution Example
Playing Craps
➢ = 36, = {−5, 0, 5} Sample space S = { }
➢ = − 5 if the sum is 2, 3, or 12
• 4 in result in a sum of 2, 3 or
12
➢ = 5 if the sum is 7 or 11
• 8 in result in a sum of 7 or 11
➢ X = 0 of other outcomes
• 36 – 4 – 8 = 24 sample points
➢ Calculate probability
4 8 24
• ( = − 5) = , ( = 5) = , ( = 0) =
36 36 36
25
𝑃
𝑃
𝑃
𝑋
𝑋
𝑋
𝑆
𝑋
𝑆
𝑆
𝑋
𝑋
𝜔
Discrete Distribution
Summary Measures
Section 4.2
Summary Measures
➢ Expectation/ Expected Value/ Population Mean
• Weighted average of all possible values
• µ = ( )= Σx p(x)
➢ Variance (Population variance)
• Weighted average of squared deviation about mean
• σ2 = E[( − µ)2] = Σ (x − µ)2 p(x)
➢ Standard Deviation
2
• =
27
𝜎
𝜎
𝐸
𝑋
𝑋
Summary Measures
Calculation Table
x p(x) x p(x) x–µ (x – µ)2 (x – µ)2p(x)
2
Total =Σx p(x) = Σ(x − µ)2 p(x)
28
𝜎
𝜇
Summary Measure Example
Two-Coin Tossing
You toss 2 coins. You’re
interested in the number of tails.
What are the expected value,
variance, and standard
deviation of this random
variable, number of tails?
© 1984-1994 T/Maker Co.
29
Summary Measure Example
Two-Coin Tossing
Experiment: Toss 2 coins. Count number of tails.
Probability Distribution
Values, x Probabilities, p(x)
0 1/4 = .25
1 2/4 = .50
2 1/4 = .25
30
Summary Measure Example
Two-Coin Tossing
x p(x) x p(x) x–µ (x – µ) 2 (x – µ) 2p(x)
0 .25 0 -1.00 1.00 .25
1 .50 .50 0 0 0
2 .25 .50 1.00 1.00 .25
µ=1.0 σ2 = .50
σ = .71
31
Probability Rules for Discrete
Random Variables
Let x be a discrete random variable with probability
distribution p(x), mean µ, and standard deviation σ.
Then, depending on the shape of p(x), the following
probability statements can be made:
Chebyshev’s Rule Empirical Rule
P (x − σ < x < µ + σ ) ≥0 ≈ 0.68
P (x − 2σ < x < µ + 2σ ) ≥3 ≈ 0.95
4
P (x − 3σ < x < µ + 3σ ) ≥8 ≈ 1.00
9
Probability Rules for Discrete Random
Variables (cont)
• Chebyshev’s Rule: Applies • Empirical Rule: Applies to
to any probability probability distributions that are
distribution. mound-shaped and symmetric.
Summary Measure Example
Internet Business Venture
➢ Suppose you invest a fixed sum of money in each of five
Internet business ventures. Assume you know that 70% of
such ventures are successful, the outcomes of the ventures are
independent of one another, and the probability distribution
for the number, X, of successful ventures out of five is
➢ Fine the mean and standard deviation of .
• Applying the formula
∑
• = ( )= ( ) = 3.50
= (( − ))=
∑( ) ( ) = 1.05
2 2 2
• −
34
2
= = 1.02
𝜎
𝐸
𝑋
𝜇
𝑋
𝜇
𝑃
𝑋
𝜎
𝜎
𝜇
𝐸
𝑋
𝑋
𝑃
𝑋
•
𝜇𝜎𝑋
Summary Measure Example
Internet Business Venture
➢ Graph ( ). Locate and the interval
± 2 on the graph. Use either
Chebyshev’s Rule or the Empirical
Rule to approximate the probability
that falls in this interval.
• ≥ 75 % or approximately 95 %
➢ Compare this result with the actual
probability.
• (2) + (3) + (4) + (5) = 0.969
35
𝑃
𝑃
𝑃
𝑃
𝑃
𝜇𝜇
𝑋
𝑋
𝜎
Summary Measure Example
coin flipping game
➢ You pay $6 to flip a fair coin. If coin lands heads, you get $10;
otherwise, you get nothing
➢ Sample point { , }
➢ Define the random variable:
➢ = amount money won from game (if you lose, negative)
➢ Value of for each sample point ?
➢ Probability distribution function (PDF) of ?
➢ Expectation (Mean) of ?
➢ Should you play the game in term of long run?
36
𝑊
𝑊𝑊
𝑊
𝑊
𝐻
𝑇
Summary (Chapter 4.1-4.2)
➢ Random variable: assigns numerical values to the possible outcomes
➢ Expected value: µ = ( )= Σx p(x)
➢ Variance: σ2 = E[( − µ)2] = Σ (x − µ)2 p(x)
2
➢ Standard deviation: =
37
𝜎
𝜎
𝐸
𝑋
𝑋