Professional Documents
Culture Documents
1
Objectives
1. RV, Discrete random variable; Define and calculate the
expected value, standard deviation, and variance for
discrete probability distributions.
3. Normal Distribution
2
Random Variables: The Motivation
Now, we want to
We now know how to
focus on the
find probabilities of
distribution of
random outcomes.
outcomes.
3
Random Variables: The Motivation
Rolling One Die: Probability Distribution Function
P(x) E
I
- x
4
Random Variable X ,
Random Variable (represented with a capital letter)
§ A numerical description of the outcome of an experiment
– assigns a real number to every possible outcome or event in a statistical
experiment such that the numbers represent mutually exclusive and
collectively exhaustive events.
⑰
§ There are two types of random variables:
– Discrete Random Variables (countable number of values)
q X = 1 for heads, 0 for tails
-
↑5 [a 3]
,
Probability Distribution
§ Probability distribution assigns the probability to each numerical value of a
random variable.
§ Popular distributions
§ Binomial distribution
§ Poisson distribution
§ Exponential distribution
§ Normal distribution
§ …
7
xn
-
,
O
The discrete The probability
0 P(X = 0) = 0.1
random variable X “X equals to”
1 P (X = 1) = 0.4 different values
2 P (X = 2) = 0.25 (0,1,2,3, or 4).
Possible values of
the discrete 3 P (X = 3) = 0.15
random variable X 4 P (X = 4) = 0.1
0) P(x 1) +
P(x
=
2)
Quick Check: What is P(X < 3)?
= +
=
-
8
Probability Distribution: Discrete RV
The probability distribution of a random variable describes how probabilities
are distributed over the values of the random variable.
Number of customers in Probability
a day (x) P(X = x)
The discrete The probability
0 P(X = 0) = 0.1
random variable X “X equals to”
1 P (X = 1) = 0.4 different values
2 P (X = 2) = 0.25 (0,1,2,3, or 4).
Possible values of
the discrete 3 P (X = 3) = 0.15
random variable X 4 P (X = 4) = 0.1
Quick Check: What is P(X < 3)? P(X < 3) = P(X = 0) + P(X = 1) + P(X = 2) = 0.75
9
Cumulative Distribution: The cdf
The cumulative distribution of a random variable X describes the probability that
the outcome of X will be a value less than or equal to x. It is usually denoted with
- ? ; = < 2 ≤ ; and is abbreviated as cdf (cumulative distribution function).
--
10
Cumulative Distribution: The cdf
The cumulative distribution of a random variable X describes the probability that
the outcome of X will be a value less than or equal to x. It is usually denoted with
? ; = < 2 ≤ ; and is abbreviated as cdf (cumulative distribution function).
11
pmf VS cdf
Probability Distribution P(X = x) Cumulative Distribution F(x)
~
0.4
1
0.9
0.75
0.25
P(X = x)
F(x)
0.5
0.15
0.1 0.1
0.1
0 1 2 3 4 0 1 2 3 4
12
13
-
!"#
= ;# D < 2 = ;# + ;% D < 2 = ;% + ⋯ + ;$ D < 2 = ;$
Expected Value of X: Example
Let 2 ∈ 0,1,2,3,4 be a discrete random variable that gives the number of
customers that arrive in the restaurant between 6 am and 7 am. X has
probability mass function P(X = x) shown in the table below.
Number of customers Probability
between 6 and 7am (x) P(X = x)
0 0.1
1 0.4
2 0.25
3 0.15
4 0.1
What is the expected number of customers that will arrive in the store between
6 and 7am?
14
Expected Value of X: Example
Let 2 ∈ 0,1,2,3,4 be a discrete random variable that gives the number of
customers that arrive in the restaurant between 6 am and 7 am. X has
probability mass function P(X = x) shown in the table below.
Number of customers Probability
between 6 and 7am (x) P(X = x)
0 0.1
1 0.4
2 0.25
3 0.15
4 0.1
What is the expected number of customers that will arrive in the store between
6 and 7am?
E[X] = (0)(0.1) + (1)(0.4) + (2)(0.25) + (3)(0.15) + (4)(0.1)
= 1.75 customers
15
What is the variance of X?
§
&
The variance of a discrete random variable is a measure of spread in the data.
§ It is the probability-weighted sum of its squared deviations from its mean:
s = Var[ X ] = E[( X - µ X )2 ] = å[ x - E ( X )]2 P( x)
-
2
X
-
Ex]
(x :
-
IP(X =
xi) (x :
-
E(XS)"
x1 x2 x3 E[X] x4 x5
16
What is the variance of X?
The following discrete distributions have the same expected value,
E[X] = 2, but different variances: 1
Variance = 1.1
1
0.9
P( 2)= =
0.8
ECX]
0.7
0.6
=
O
-
Variance = 0
0.5
1 0.4
0.9 0.3
0.8 0.2
0.7 0.1
0.6 0
0.5 0 1 2 3 4
0.4
1
0.3
0.2 0.9
0.1 0.8
0.7
Variance = 2
0
x
0 1 2 3 4 0.6
↑
0.5
0.4
0.3
0.2
0.1
0
0 1 2 3 4
17
What is the standard deviation of X?
§ The standard deviation of a discrete random variable X is ALSO a measure
-
&
s X = Stdev[ X ] = Var[ X ]
*We like standard deviation because it is in the same units as X, meaning it
gives a measure of spread/dispersion that makes sense to us!
18
Calculating Standard Deviation and Variance
⑧
-
Number of
Probability
customers in a
P(X = x)
day (x)
0 0.1
1 0.4
2 0.25
3 0.15
4 0.1
19
Calculating Expected Value Using EXCEL
8
20
Calculating Standard Deviation and Variance Using EXCEL
21
Objectives
1. RV, Discrete random variable; Define and calculate the
expected value, standard deviation, and variance for
discrete probability distributions.
3. Normal Distribution
22
Discrete vs. Continuous Variables: Probability Distributions
Discrete or Continuous?
0.9
0.8
0.7
0.6
Probability
0.5
0.4
0.3
0.2
0.1
0
5' or shorter Over 5', but less than 6' 6' or taller
Height
23
10 . 57 (56] 16 .
(
Discrete vs. Continuous Variables: Probability Distributions
Discrete or Continuous?
0.12
0.1
0.08
Probability
0.06
0.04
0.02
0
5'0"
5'1"
5'2"
5'3"
5'4"
5'5"
5'6"
5'7"
5'8"
5'9"
6'0"
6'1"
6'2"
6'3"
6'4"
6'5"
6'6"
5'10"
5'11"
-]
Height
95
24 ,
Discrete vs. Continuous Variables: Probability Distributions
Discrete or Continuous?
0.016
0.014
-
0.012
0.01
Probability
0.008
0.006
0.004
0.002
0
5.01
5.06
5.11
5.16
5.21
5.26
5.31
5.36
5.41
5.46
5.51
5.56
5.61
5.66
5.71
5.76
5.81
5.86
5.91
5.96
6.01
6.06
6.11
6.16
6.21
6.26
6.31
6.36
6.41
6.46
Height
25
Normal
<- 3)
-
0
,
&
function (pdf), denoted as f(x), that tells us the height of the curve at
X = x.
q f(x) is NOT the same as P(X = x)
.
case :
P(Xxx)
=
P(X 0) ....
+P(X
=
x) =
I P(x ,
=
x = xx)
x2
+
↳
=
P(X=t , ) San
=
,
q Instead, take the area under the curve of the pdf I
I
-
26 (Not Required)
Discrete vs. Continuous Variables: Probability Distributions
90 ,
0008
27
↑
-
Why does P(X = x) = 0 for any value of x when X is a continuous random
variable?
Assume X is continuous.
E
– Let X = the length of a human hair. What is P(X = 6 cm)?
P(Xt (0 .
2
,
0
.
6])
The implication is, when X is continuous (not discrete): 0 . 6-0 2.
P(X < x) = P (X ≤ x)
-
T
P(X > x) = P (X ≥ x)
! 28
Discrete vs. Continuous Variables: Probability Distributions
Properties of the pdf of a continuous random variable.
1. f(x) gives the height of the pdf curve at the value x
2. f(x) is always non-negative
3. The total area under the curve of f(x) is always 1 (because the sum of all
probabilities of all possible outcomes must sum to 1).
4. The probability of x being in the range between A and B is the area under the
curve between A and B.
M 29
Continuous Distribution Function Example
Let X be the surface temperature of the moon (in oF)
1. What is f(50) ?
2. Find P(50<X<100) =
3. Find P(X≤50)=
50 100
X could belong to a finite or infinite range.
30
Continuous Distribution Function Example
Let X be the surface temperature of the moon (in oF)
1. What is f(50) ? The height of the curve at x = 50.
50 100
X could belong to a finite or infinite range.
31
Continuous Distribution Function Example
Let X be the surface temperature of the moon (in oF)
1. Find P(X ≤ 100)= ab and P(X < 190)= 0 95 .
=
P(X = 190)
95-0 6 .
=
0 . 35
85
Find P(X > 190)= 1
0 0
05
-
=
3.
.
P(X
3)
=
.95
CDF of X
0
.6
100 190
32
Continuous Distribution Function Example
Let X be the surface temperature of the moon (in oF)
1. Find P(X ≤ 100)= 0.6 and P(X < 190)= 0.95
.95
.6
CDF of X
100 190
33
-
Expected Value and Variance of Continuous Random Variables (Not Required)
The Expected Value of a continuous random variable is
I
)
+[$] = 1 ). 3 ) 4)
(
The Variance of a continuous random variable is
)
Var[$] = ∫( () − + $ )'3 ) 4)
34
X Y ,
random variable
Two random variables X and Y are independent if and only if, for every x O
I
and y, the events {2 ≤ ;} and {7 ≤ K} are independent events.
-
P(ARB)
=
P(A) .
P(B)
> A and B are
independent
35
Objectives
1. RV, Discrete random variable; Define and calculate the
expected value, standard deviation, and variance for
discrete probability distributions.
3. Normal Distribution
36
The Normal Distribution
Normal random variable X
•
&
X = any continuous measure
• It can take on any continuous units (feet, test scores, etc.)
• Most commonly used to model symmetric quantities that have a
“central tendency” with concentration around the center.
37
39
Normal Distribution
§ The normal distribution is the most popular and useful continuous
probability distribution.
§ E.g., return of a stock portfolio, and test scores.
--
1 '&( !
&
N ; = D Q %)! (Not Required)
O 2P
↑9)
12
40
Normal Distribution
§ Normal distribution with different A. (shape unchanged)
|
40
I |
µ = 50
|
60
-
Smaller µ, same s
| | |
µ = 40 50 60
Normal Distribution
§ Normal distribution with different O. (always symmetric)
M Same µ, smaller s
-
-
E 0
Same µ, larger s
[
- E -
-
-
<
<
Dµ
42
↳,
Normal Distribution =
-
- %
L
P(M-0 = M+ 6)
=
P(n 0 -
-
X <
n +
6) =
68
P(n 20 - X
M 26) 95%
- Mof
-
+
=
<
= 99 7
% FM . 6
⑭
.
e
-
NIM oY 43
For M . 0 .
if x ,
T
.
&
Standard normal distribution: N(0, 1)
E
-
/
/ 4(-152=1)
"1s
.
= 68
%
/
,
e
z=
⑧
'&(
)
I
If S~U V, W* , then X =
+&(
)
follows standard normal distribution.
-
-
44
M - 2
I
=
-
15
No , 1)
45