Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
28 views

Prob Random Variables

The document discusses random variables and their notation. It defines a random variable X(ω) as a function that associates a number with the outcome of a random experiment. Random variables are denoted by uppercase letters while measured values are lowercase. Discrete random variables take countable values while continuous random variables take measurements over an interval. Probability mass functions (pmf) define the distributions of discrete random variables, giving the probability that the random variable equals each possible value.

Uploaded by

Austin Truong
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Prob Random Variables

The document discusses random variables and their notation. It defines a random variable X(ω) as a function that associates a number with the outcome of a random experiment. Random variables are denoted by uppercase letters while measured values are lowercase. Discrete random variables take countable values while continuous random variables take measurements over an interval. Probability mass functions (pmf) define the distributions of discrete random variables, giving the probability that the random variable equals each possible value.

Uploaded by

Austin Truong
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Random Variable and its Notation

P(A): a function of events


X(ω): a function of outcomes
HCMC University of Technology Probability and Statistics
Dung Nguyen

Random Variables and Random Vectors A variable that associates a number X(u) with the outcome u of a
random experiment is called a random variable.
X :Ω → R
u → X(u)
Uppercase letters (X, Y, Z): Random variables.
Lowercase letters (x, y, z): Measured values of random variables
(after the experiment is conducted). Eg. x = 70 milliamperes.

Dung Nguyen Probability and Statistics2 / 41

Discrete Random Variables Continuous Random Variables


A discrete random variable is a random variable with a finite or A continuous random variable is a random variable with an interval
countably infinite range. Its values are obtained by counting. (either finite or infinite) of real numbers for its range. Its
Number of scratches on a surface. values are obtained by measuring.
Number of defective parts among 100 tested. Electrical current and voltage.
Number of transmitted bits received in error. Physical measurements, e.g., length, weight, time, temperature,
pressure.
Number of common stock shares traded per day.

Dung Nguyen Probability and Statistics3 / 41 Dung Nguyen Probability and Statistics4 / 41
Probability Mass/Density Functions Discrete random variables

Distributions of random variables Discrete Distributions


Distribution Definition
Values The probability mass function of X is defined by
Chance
Cumulative: Cumulative distribution functions (cdf) fX (u) = P(X = u)
X
Non-cumulative For any event A: P(X ∈ A) = f(u).
Discrete: Probability mass functions (pmf) u∈A
Continuous: Probability density functions (pdf) P(X = 0) = 0.25
Some characteristics P(X = 1) = 0.50
Center Proposition (Characteristic
P(X = 2) = 0.25
Mean (E) properties)
Median (Md) f(x) A discrete function f is a
Variation 0.5 probability mass function iff
Variance (V) and Standard deviation (SD) 1 f(u) ≥ 0 for all u.
Interquartile range (IQR) 0.25 X
2 f(u) = 1.
u
0 x
0 1 2
Dung Nguyen Probability and Statistics5 / 41 Dung Nguyen Probability and Statistics6 / 41

Probability Mass/Density Functions Discrete random variables Probability Mass/Density Functions Discrete random variables

Example 1 - Digital Channel Example


There is a chance that a bit transmitted through a digital 2 Uniform distribution: Ω = {1, 2, 3, · · · , n}
transmission channel is received in error. 1
f(k) = P(X = k) =
X:the number of bits received in error in 4 bits transmitted. n
each outcome has equal probability
0.6
P(X = 0) = 0.6561
P(X = 1) = 0.2916 0.4
P(X = 2) = 0.0486
P(X = 3) = 0.0036 0.2
P(X = 4) = 0.0001
Total 1.0000 0
0 2 4

Dung Nguyen Probability and Statistics7 / 41 Dung Nguyen Probability and Statistics8 / 41
Probability Mass/Density Functions Discrete random variables Probability Mass/Density Functions Discrete random variables

Example Example
2 Uniform distribution: Ω = {1, 2, 3, · · · , n} 2 Uniform distribution: Ω = {1, 2, 3, · · · , n}
1 1
f(k) = P(X = k) = f(k) = P(X = k) =
n n
each outcome has equal probability each outcome has equal probability

λk λk
3 Is f(k) = P(X = k) = k! e−λ (k = 0, 1, 2 . . . ) a probability mass 3 Is f(k) = P(X = k) = k! e−λ (k = 0, 1, 2 . . . ) a probability mass
function? function?

4 Suppose that a random variable X has a discrete distribution


with the following p.m.f.
(
cu, u = 1, · · · , 5
f(u) =
0, otherwise
Determine the value of the constant c.

Dung Nguyen Probability and Statistics8 / 41 Dung Nguyen Probability and Statistics8 / 41

Probability Mass/Density Functions Continuous random variables Probability Mass/Density Functions Continuous random variables

Continuous Distribution Example 5 - Current


A random variable X is continuous if ∃f ≥ 0 such that for any [a, b] Let X denote the current measured in a thin copper wire in
Z b milliamperes(mA). Assume that the range of X is 4.9 ≤x≤ 5.1 and
P(a ≤ X ≤ b) = f(u)du, f(x) = 5. What is the probability that a current is
a
and f is called the (probability) density function of the random a between 4.95mA and 5.1mA?
variable X. b less than 5mA?

f(x)
Solution
P(a ≤ X ≤ b) Proposition (Characteristic Z 5.1 Z 5.1
properties) P(4.95 < X < 5.1) = f(x)dx = 5dx = 0.75
If f is a (probability) Z4.95
5 Z 4.95
5
density function then P(X < 5) = f(x)dx = 5dx = 0.5
1 f(u) ≥ 0 4.9 4.9
Z ∞
2 f(u)du = 1
−∞
a x
b
Dung Nguyen Probability and Statistics9 / 41 Dung Nguyen Probability and Statistics10 / 41
Probability Mass/Density Functions Continuous random variables Probability Mass/Density Functions Continuous random variables

Example Example
6 Suppose that X is a continuous random variable whose 6 Suppose that X is a continuous random variable whose
probability density function is given by probability density function is given by
( (
c(4u − 2u2 ), 0 < u < 2 c(4u − 2u2 ), 0 < u < 2
f(u) = f(u) =
0, otherwise 0, otherwise
Find c and P(X > 1). Find c and P(X > 1).
7 The amount of time in hours that a computer functions before
breaking down is a continuous random variable with probability
density function
(
λ e−u/100 , u ≥ 0
f(u) =
0, otherwise
Compute the probability that a computer will function

Dung Nguyen Probability and Statistics11 / 41 Dung Nguyen Probability and Statistics11 / 41

Probability Mass/Density Functions Continuous random variables Probability Mass/Density Functions Continuous random variables

Example Example
6 Suppose that X is a continuous random variable whose 7 The amount of time in hours that a computer functions before
probability density function is given by breaking down is a continuous random variable with probability
density function
(
c(4u − 2u2 ), 0 < u < 2
f(u) = (
0, otherwise λ e−u/100 , u ≥ 0
f(u) =
Find c and P(X > 1). 0, otherwise
Compute the probability that a computer will function
7 The amount of time in hours that a computer functions before
a between 50 and 150 hours before breaking down?
breaking down is a continuous random variable with probability
b for fewer than 100 hours?
density function
(
λ e−u/100 , u ≥ 0
f(u) =
0, otherwise
Compute the probability that a computer will function
a between 50 and 150 hours before breaking down?

Dung Nguyen Probability and Statistics11 / 41 Dung Nguyen Probability and Statistics11 / 41
Cumulative Distribution Function Cumulative Distribution Function

Example 8 - Digital channel Example 8 - Digital channel


Consider the probability distribution for the digital channel Consider the probability distribution for the digital channel
example. example.
x P(X = x) x P(X = x)
0 0.6561 0 0.6561
1 0.2916 1 0.2916
2 0.0486 2 0.0486
3 0.0036 3 0.0036
4 0.0001 4 0.0001
1.0000 1.0000
Find the probability of three or fewer bits in error. Find the probability of three or fewer bits in error.
The event (X ≤ 3) is the total of the events: The event (X ≤ 3) is the total of the events:
(X = 0), (X = 1), (X = 2), and (X = 3). (X = 0), (X = 1), (X = 2), and (X = 3).
From the table:
P(X ≤ 3) = P(X = 0) + P(X = 1) + P(X = 2) + P(X = 3) = 0.9999

Dung Nguyen Probability and Statistics12 / 41 Dung Nguyen Probability and Statistics12 / 41

Cumulative Distribution Function Cumulative Distribution Function

Cumulative Distribution Function Cumulative Distribution Function


F(u) = P(X ≤ u)
F(u) = P(X ≤ u)
Z u
X = f(t)dt (continuous distribution)
= f(k) (discrete distribution) −∞
k≤u

f(x) F(x)
f(x)
F(u) = P(X ≤ u) 1
P(X ≤ 2)
k P(X = k) P(X ≤ k) F(u)
0 0.35 0.35
1 0.22 0.57
2 0.20 0.77
3 0.13 0.90
4 0.10 1.00 x 0 x
u u

0 1 2 3 4 x
Dung Nguyen Probability and Statistics13 / 41 Dung Nguyen Probability and Statistics14 / 41
Cumulative Distribution Function Cumulative Distribution Function

Example 9 - Defective parts Example 9 - Defective parts


A day’s production of 850 parts contains 50 defective parts. Two
parts are selected at random without replacement. Let the random f(x) : P(X = 0) = 0.886, P(X = 1) = 0.111, P(X = 2) = 0.003.
variable X equal the number of defective parts in the sample. Find 1
F(0) = P(X ≤ 0) = 0.886
the cumulative distribution function of X. The probability mass
function is calculated as follows: F(1) = P(X ≤ 1) = 0.997
800 799 F(2) = P(X ≤ 2) = 1.000. 0.8
P(X = 0)= · = 0.886
850 849
800 50 F(−0.8) = P(X ≤ −0.8) = 0,
P(X = 1)= 2 · · = 0.111 0.6
850 849 F(0.5) = P(X ≤ 0.5) = F(0),
50 49 F(1.4) = P(X ≤ 1.4) = F(1),
P(X = 2)= · = 0.003
850 849 0.4
F(2.3) = P(X ≤ 2.3) = F(2).


 0, x<0


0.886, 0 ≤ x < 1 0.2
F(x) =


 0.997, 1 ≤ x < 2

1, x≥2
−2 −1 1 2 3
Dung Nguyen Probability and Statistics15 / 41 Dung Nguyen Probability and Statistics15 / 41

Cumulative Distribution Function Cumulative Distribution Function

Example 10 - Electric Current Properties


5 Proposition (Characteristic properties)
Consider the current measured 4 1 F(u) is nondecreasing
in a thin copper wire in mil- 3 2 F(−∞) = 0 and F(∞) = 1
liamperes(mA). Recall that the 2
range of X is 4.9 ≤ x ≤ 5.1 and 3 F is right continuous: limu→a+ F(u) = F(a)
1
f(x) = 5.
Example (11)
4.7 4.8 4.9 5 5.1 5.2 5.3 Which of the six functions shown are valid CDFs?
The cdf
1
 0.8
0,
 x < 4.9 0.6
F(x) = 5(x − 4.9), 4.9 ≤ x ≤ 5.1 . 0.4

5.1 ≤ x

1, 0.2

4.7 4.8 4.9 5 5.1 5.2 5.3


Dung Nguyen Probability and Statistics16 / 41 Dung Nguyen Probability and Statistics17 / 41
Cumulative Distribution Function Cumulative Distribution Function

Other properties Example


Proposition (F =⇒ Probability) 12 Let X have the CDF
1 P(X ≤ u) = F(u), P(X < u) = F(u− ) and P(X = u) = F(u) − F(u− ). F(u)
2 Probability of random variable occurring within an interval 1
P(a < X ≤ b) = F(b) − F(a)

0.6
Proposition (F =⇒ f)
1 If X has a discrete distribution then

f(u) = F(u) − F(u− ) u


2 If X has a continuous distribution, then F is continuous at −2 −1
every u and F 0 (u) = f(u), i.e.
f(u) = F 0 (u)

Dung Nguyen Probability and Statistics18 / 41 Dung Nguyen Probability and Statistics19 / 41

Cumulative Distribution Function Cumulative Distribution Function

Example Example
12 Let X have the CDF 12 Let X have the CDF
F(u) F(u)
1 1

0.6 0.6

u u
−2 −1 −2 −1

a Determine all values of u such that P(X = u) > 0. a Determine all values of u such that P(X = u) > 0.
b Find P(X ≤ 0)

Dung Nguyen Probability and Statistics19 / 41 Dung Nguyen Probability and Statistics19 / 41
Cumulative Distribution Function Cumulative Distribution Function

Example Example
12 Let X have the CDF 13 Let X have the CDF
F(u) F(u)
1 1
0.75
0.6 0.5
0.25
u
u 5 10 15 20
−2 −1 Find the numerical values of the following quantities
a Determine all values of u such that P(X = u) > 0.
b Find P(X ≤ 0)
c Find P(X < 0).

Dung Nguyen Probability and Statistics19 / 41 Dung Nguyen Probability and Statistics20 / 41

Cumulative Distribution Function Cumulative Distribution Function

Example Example
13 Let X have the CDF 13 Let X have the CDF
F(u) F(u)
1 1
0.75 0.75
0.5 0.5
0.25 0.25
u u
5 10 15 20 5 10 15 20
Find the numerical values of the following quantities Find the numerical values of the following quantities
a P(X ≤ 1) a P(X ≤ 1)
b P(X ≤ 10)

Dung Nguyen Probability and Statistics20 / 41 Dung Nguyen Probability and Statistics20 / 41
Cumulative Distribution Function Cumulative Distribution Function

Example Example
13 Let X have the CDF 13 Let X have the CDF
F(u) F(u)
1 1
0.75 0.75
0.5 0.5
0.25 0.25
u u
5 10 15 20 5 10 15 20
Find the numerical values of the following quantities Find the numerical values of the following quantities
a P(X ≤ 1) a P(X ≤ 1)
b P(X ≤ 10) b P(X ≤ 10)
c P(X ≥ 10) c P(X ≥ 10)
d P(X = 10)

Dung Nguyen Probability and Statistics20 / 41 Dung Nguyen Probability and Statistics20 / 41

Cumulative Distribution Function Mean

Example Example 14 - Introduction to the mean


13 Let X have the CDF Random numbers
2 9 4 3 3 10 5 7 6 6
F(u) 10 6 5 6 5 7 1 3 9 1
1 The average value
1 p
0.75 x= (2 + 9 + 4 + 3 + 3 + 10 + 5 + 7 + 6 + 6 x = 5.4
20
0.5 + 10 + 6 + 5 + 6 + 5 + 7 + 1 + 3 + 9 + 1) 4
1
0.25 = (1 · 2 + 2 · 1 + 3 · 3 + 4 · 1 + 5 · 3
20 3
u
+ 6 · 4 + 7 · 2 + 8 · 0 + 9 · 2 + 10 · 2)
5 10 15 20 2 1 3 1 3 2
=1· +2· +3· +4· +5·
Find the numerical values of the following quantities 20 20 20 20 20
a P(X ≤ 1) 4 2 0 2 2 1
+6· +7· +8· +9· + 10 ·
b P(X ≤ 10) 20 20 20 20 20 x
c P(X ≥ 10) = 1 · f(1) + 2 · f(2) + 3 · f(3) + · · · + 10 · f(10) 1 2 3 4 5 6 7 8 9 10
d P(X = 10) = 5.4.
e P(|X − 5| ≤ 0.1).
Dung Nguyen Probability and Statistics20 / 41 Dung Nguyen Probability and Statistics21 / 41
Mean Mean

Example 15 - Introduction to the mean Mean


Play a game Definition
u −1 1
The mean of a random variable X is
P(X = u) 23 13 X
E(X) = uf(u) (discrete)
Then Zu ∞
(−1) · 2 + (1) · 1 E(X) = uf(u)du (continuous).
E(X) =
3 −∞
2 1 1
= (−1) · + (1) · (= − ) Names: Mean, Mean value, Average value, Expected value,
3 3 3
Expectation.
= (−1)f(−1) + (1)f(1).
Proposition (Properties)
For any constants a and b
E(aX + b) = a E(X) + b
and
E(X + Y) = E(X) + E(Y)

Dung Nguyen Probability and Statistics22 / 41 Dung Nguyen Probability and Statistics23 / 41

Mean Mean

Example Example
16 A roulette wheel has the numbers 1 through 36, as well as 0 and 17 The pmf of the amount of memory X (GB) in a purchased flash
00. If you bet $1 that an odd number comes up, you win or lose drive satisfies
$1 according to whether that event occurs. Find the average x 1 2 4 8 16
net gain if you have played 1 game. How about doubling your p(x) 0.05 0.10 0.35 0.40 0.10
bet? or playing 10 games? Calculate the average amount of memory in the flash drive.

Dung Nguyen Probability and Statistics24 / 41 Dung Nguyen Probability and Statistics24 / 41
Mean Mean

Example The second moment of random variables


17 The pmf of the amount of memory X (GB) in a purchased flash The expected value of a random variable X 2 is
X
drive satisfies E(X 2 ) = u2 f(u) (discrete)
x 1 2 4 8 16 Zu ∞
p(x) 0.05 0.10 0.35 0.40 0.10 2
E(X ) = u2 f(u)du (continuous).
Calculate the average amount of memory in the flash drive. −∞

18 Let X denote the amount of time a book on two-hour reserve is


actually checked out. Find E(X) if the cdf is

0,
 x<0
x 2
F(x) = 4 , 0 ≤ x < 2 .

x≥2

1,

Dung Nguyen Probability and Statistics24 / 41 Dung Nguyen Probability and Statistics25 / 41

Mean Mean

Example Example
19 Let X denote a random variable that takes on any of the values 19 Let X denote a random variable that takes on any of the values
-1, 0, and 1 with respective probabilities -1, 0, and 1 with respective probabilities
P(X = −1) = 0.2, P(X = 0) = 0.5, P(X = 1) = 0.3 P(X = −1) = 0.2, P(X = 0) = 0.5, P(X = 1) = 0.3
Compute E(X 2 ). Compute E(X 2 ).

20 Let X be the current measured in mA. The PDF is f(x) = 0.05 for
0 ≤ x ≤ 20. What is the expected value of power when the
resistance is 100 ohms?

Dung Nguyen Probability and Statistics26 / 41 Dung Nguyen Probability and Statistics26 / 41
Mean Mean

Expectation of function of a random variable Example 21 - Digital Channel


Proposition There is a chance that a bit transmitted through a digital
transmission channel is received in error. X is the number of bits
In general, for any function g(u):
X received in error of the next 4 transmitted. The probabilities are
E[g(X)] = g(u)f(u) (discrete) P(X = 0) = 0.6561, P(X = 2) = 0.0486, P(X = 4) = 0.0001,
u
Z ∞ P(X = 1) = 0.2916, P(X = 3) = 0.0036,
E[g(X)] = g(u)f(u)du (continuous). What is the expected value of the cube of the number of bits in
−∞
error?

Solution
Put g(u) = u3 .
4
X 4
X
E(X 3 ) = E(g(X)) = g(u)f(u) = u3 f(u)
u=0 u=0
= 03 (0.6561) + 13 (0.2916) + 2 (0.0486) + 33 (0.036) + 43 (0.0001)
3

= 1.6588.
Dung Nguyen Probability and Statistics27 / 41 Dung Nguyen Probability and Statistics28 / 41

Mean Mean

Example 22 - Expected cost Example


The time, in hours, it takes to locate and repair an electrical 23 Find E[eX ] when the density function of X is
breakdown in a certain factory is a random variable X whose density (
function is given by 1, 0 ≤ u ≤ 1
f(u) =
( 0, otherwise
1, if 0 < u < 1
f(u) =
0, otherwise.
If the cost involved in a breakdown of duration X is X 3 , what is
the expected cost of such a breakdown?

Solution
Put h(u) = u3 . Then
1 1
u4 1 1
Z Z
E(X 3 ) = E(h(X)) = u3 f(u)du = u3 du = = .
0 0 4 0 4

Dung Nguyen Probability and Statistics29 / 41 Dung Nguyen Probability and Statistics30 / 41
Mean Median

Example Sample median


23 Find E[eX ] when the density function of X is The average of values
(
1, 0 ≤ u ≤ 1 (a) Observations: 1,2,5,8,10
f(u) = 1 + 2 + 5 + 8 + 10
0, otherwise =⇒ M = = 5.2.
5
(b) with error: 1,2,5,8,100
Linda is a sales associate at a large auto dealership. At her 1 + 2 + 5 + 8 + 100
24 =⇒ M = = 23.2.
commission rate of 25% of gross profit on each vehicle she 5
sells, Linda expects to earn $350 for each car sold and $400
for each truck or SUV sold. Linda motivates herself by using The average of position
probability estimates of her sales. She estimates her car (a) 1 2 5 8 10
sales in one day as follows
Car sales 0 1 2 3 (b) 1 2 5 8 100
Probability 0.3 0.4 0.2 a
and her truck or SUV sales as follows
Truck sales 0 1 2 Even number of observations
Probability 0.3 0.5 b 1 2 5 8
What is the best estimate of Linda’s earnings per day?
Dung Nguyen Probability and Statistics30 / 41 Dung Nguyen Probability and Statistics31 / 41

Median Median

Median Example
The median of a random variable X are all points m such that 1 1
P(X ≤ m) ≥ 0.5 and P(X ≥ m) ≥ 0.5,
or equivalently,
F(m) ≥ 0.5 and F(m − ) ≤ 0.5,

In particular, if X is a continuous random variable then its median 0.5 0.5


are all points m such that
P(X ≤ m) = 0.5
or equivalently,
F(m) = 0.5.

−2 −1 1 2 3 4.7 4.8 4.9 5 5.1 5.2 5.3

F(u) ≥ 0.5 and F(u− ) ≤ 0.5 F(u) = 0.5


Dung Nguyen Probability and Statistics32 / 41 Dung Nguyen Probability and Statistics33 / 41
Median Median

Example Example
25 The pmf of the amount of memory X (GB) in a purchased flash 25 The pmf of the amount of memory X (GB) in a purchased flash
drive satisfies drive satisfies
x 1 2 4 8 16 x 1 2 4 8 16
p(x) 0.05 0.10 0.35 0.40 0.10 p(x) 0.05 0.10 0.35 0.40 0.10
Determine Md(X). Determine Md(X).

26 Let X denote the amount of time a book on two-hour reserve is


actually checked out. Find Md(X) if the cdf is

0,
 x<0
2
F(x) = x4 , 0 ≤ x < 2 .

x≥2

1,

Dung Nguyen Probability and Statistics34 / 41 Dung Nguyen Probability and Statistics34 / 41

Median Variance and Standard Deviation

Example 27 - Pass or First-Class Honours?

p p
x = 6.5 x = 6.5
0.25

0.125

x x
5 6 7 8 3 4 5 6 7 8 9 10
(a) Class 1 (b) Class 2

Dung Nguyen Probability and Statistics35 / 41 Dung Nguyen Probability and Statistics36 / 41
Variance and Standard Deviation Variance and Standard Deviation

Example 28 - Stock Price Changes Example 28 - Stock Price Changes


Consider the prices A and B of two stocks at a time one month in Consider the prices A and B of two stocks at a time one month in
the future. Assume that the future. Assume that
A has the uniform distribution on the interval [25, 35] A has the uniform distribution on the interval [25, 35]
B has the uniform distribution on the interval [15, 45].
1/10 1/10

A The distributions: A The distributions:


B the mean = 30 but B the mean = 30 but
different. different.

1/30 A will surely be 1/30 A will surely be


worth at least 25 worth at least 25
while P(B < 25) = 1/3. while P(B < 25) = 1/3.
15 25 35 45 15 25 35 45

Dung Nguyen Probability and Statistics37 / 41 Dung Nguyen Probability and Statistics37 / 41

Variance and Standard Deviation Variance and Standard Deviation

Deviations Deviations
1+2+5+8 1+2+5+8
Observations: 1,2,5,8 =⇒ M = = 4. Observations: 1,2,5,8 =⇒ M = = 4.
4 4

1 − 4 = −3 5−4=1 1 − 4 = −3 5−4=1

1 2 4 5 8 1 2 4 5 8

2 − 4 = −2 8−4=4 2 − 4 = −2 8−4=4

Dung Nguyen Probability and Statistics38 / 41 Dung Nguyen Probability and Statistics38 / 41
Variance and Standard Deviation Variance and Standard Deviation

Deviations Deviations
1+2+5+8 1+2+5+8
Observations: 1,2,5,8 =⇒ M = = 4. Observations: 1,2,5,8 =⇒ M = = 4.
4 4

1 − 4 = −3 5−4=1 1 − 4 = −3 5−4=1

1 2 4 5 8 1 2 4 5 8

2 − 4 = −2 8−4=4 2 − 4 = −2 8−4=4

Dung Nguyen Probability and Statistics38 / 41 Dung Nguyen Probability and Statistics38 / 41

Variance and Standard Deviation Variance and Standard Deviation

Deviations Deviations
1+2+5+8 1+2+5+8
Observations: 1,2,5,8 =⇒ M = = 4. Observations: 1,2,5,8 =⇒ M = = 4.
4 4

1 − 4 = −3 5−4=1 1 − 4 = −3 5−4=1

1 2 4 5 8 1 2 4 5 8

2 − 4 = −2 8−4=4 2 − 4 = −2 8−4=4

Dung Nguyen Probability and Statistics38 / 41 Dung Nguyen Probability and Statistics38 / 41
Variance and Standard Deviation Variance and Standard Deviation

Deviations Deviations
1+2+5+8 1+2+5+8
Observations: 1,2,5,8 =⇒ M = = 4. Observations: 1,2,5,8 =⇒ M = = 4.
4 4

1 − 4 = −3 5−4=1 1 − 4 = −3 5−4=1

1 2 4 5 8 1 2 4 5 8

2 − 4 = −2 8−4=4 2 − 4 = −2 8−4=4

Dung Nguyen Probability and Statistics38 / 41 Dung Nguyen Probability and Statistics38 / 41

Variance and Standard Deviation Variance and Standard Deviation

Deviations Deviations
1+2+5+8 1+2+5+8
Observations: 1,2,5,8 =⇒ M = = 4. Observations: 1,2,5,8 =⇒ M = = 4.
4 4

1 − 4 = −3 5−4=1 1 − 4 = −3 5−4=1

1 2 4 5 8 1 2 4 5 8

2 − 4 = −2 8−4=4 2 − 4 = −2 8−4=4

Sum of squares: (1 − 4)2 + (2 − 4)2 + (5 − 4)2 + (8 − 4)2 . (1 − 4)2 + (2 − 4)2 + (5 − 4)2 + (8 − 4)2
Average sum of squares: .
4

Dung Nguyen Probability and Statistics38 / 41 Dung Nguyen Probability and Statistics38 / 41
Variance and Standard Deviation Variance and Standard Deviation

Deviations Deviations
1+2+5+8 1+2+5+8
Observations: 1,2,5,8 =⇒ M = = 4. Observations: 1,2,5,8 =⇒ M = = 4.
4 4

1 − 4 = −3 5−4=1 1 − 4 = −3 5−4=1

1 2 4 5 8 1 2 4 5 8

2 − 4 = −2 8−4=4 2 − 4 = −2 8−4=4

(1 − 4)2 + (2 − 4)2 + (5 − 4)2 + (8 − 4)2


Sample variance: . x1 + x2 + · · · + xn
4−1 Observations: x1 , x2 , . . . , xn =⇒ x = .
n

(x1 − x)2 + (x2 − x)2 + · · · + (xn − x)2


s2 = .
n−1

Dung Nguyen Probability and Statistics38 / 41 Dung Nguyen Probability and Statistics38 / 41

Variance and Standard Deviation Variance and Standard Deviation

Variance and Standard Deviation Variance and Standard Deviation


The variance of an r.v. X is The variance of an r.v. X is
V(X) = E(X − µ)2 . V(X) = E(X − µ)2 .
Variance measures dispersion around the mean. Variance measures dispersion around the mean.
X is discrete X
V(X) = (u − µ)2 f(u).
u

Dung Nguyen Probability and Statistics39 / 41 Dung Nguyen Probability and Statistics39 / 41
Variance and Standard Deviation Variance and Standard Deviation

Variance and Standard Deviation Variance and Standard Deviation


The variance of an r.v. X is The variance of an r.v. X is
2
V(X) = E(X − µ) . V(X) = E(X − µ)2 .
Variance measures dispersion around the mean. Variance measures dispersion around the mean.
X is discrete X X is discrete X
V(X) = (u − µ)2 f(u). V(X) = (u − µ)2 f(u).
u u

X is continuous Z ∞
X is continuous Z ∞
V(X) = (u − µ)2 f(u)du. V(X) = (u − µ)2 f(u)du.
−∞ −∞

The standard deviation is


p
SD(X) = V(X).

Dung Nguyen Probability and Statistics39 / 41 Dung Nguyen Probability and Statistics39 / 41

Variance and Standard Deviation Variance and Standard Deviation

Example 29 - Digital Channel Deviations


1+2+5+8
There is a chance that a bit transmitted through a digital Observations: 1,2,5,8 =⇒ M = = 4.
transmission channel is received in error. X is the number of bits 4
received in error of the next 4 transmitted. The probabilities are 1 − 4 = −3 5−4=1
P(X = 0) = 0.6561, P(X = 2) = 0.0486, P(X = 4) = 0.0001,
P(X = 1) = 0.2916, P(X = 3) = 0.0036 1 2 4 5 8
Calculate the mean and variance.
2 − 4 = −2 8−4=4
x f(x) xf(x) (x − 0.4)2 (x − 0.4)2 f(x)
0 0.6561 0.0000 0.160 0.1050
2 − 5 = −3 6−5=1
1 0.2916 0.2916 0.360 0.1050
2 0.0486 0.0972 2.560 0.1244
3 0.0036 0.0108 6.760 0.0243 2 3 5 6 9
4 0.0001 0.0004 12.960 0.0013
Total 0.4000 0.3600 3 − 5 = −2 9−5=4

Dung Nguyen Probability and Statistics40 / 41 Dung Nguyen Probability and Statistics41 / 41
Variance and Standard Deviation Variance and Standard Deviation

Properties Properties
1 Computational formula 1 Computational formula
2 2
V(X) = E(X ) − (E X) V(X) = E(X 2 ) − (E X)2
2 Variance and standard deviation are not linear
V(aX + b) = a2 V(X) and SD(aX + b) = a SD(X)

Dung Nguyen Probability and Statistics42 / 41 Dung Nguyen Probability and Statistics42 / 41

Variance and Standard Deviation Variance and Standard Deviation

Properties Example 30 - Digital Channel


1 Computational formula There is a chance that a bit transmitted through a digital
2 2 transmission channel is received in error. X is the number of bits
V(X) = E(X ) − (E X)
received in error of the next 4 transmitted. The probabilities are
2 Variance and standard deviation are not linear
P(X = 0) = 0.6561, P(X = 2) = 0.0486, P(X = 4) = 0.0001,
V(aX + b) = a2 V(X) and SD(aX + b) = a SD(X) P(X = 1) = 0.2916, P(X = 3) = 0.0036
3 If X and Y are independent then Calculate the mean and variance.
V(X + Y) = V(X) + V(Y)
x f(x) xf(x) (x − 0.4)2 (x − 0.4)2 f(x) x 2 f(x)
0 0.6561 0.0000 0.160 0.1050 0.0000
1 0.2916 0.2916 0.360 0.1050 0.2916
2 0.0486 0.0972 2.560 0.1244 0.1944
3 0.0036 0.0108 6.760 0.0243 0.0324
4 0.0001 0.0004 12.960 0.0013 0.0016
Total 0.4000 0.3600 0.5200

Dung Nguyen Probability and Statistics42 / 41 Dung Nguyen Probability and Statistics43 / 41
Variance and Standard Deviation Variance and Standard Deviation

Example 31 - Electric Current Example 32 - Comparison


For the copper wire current measurement, the PDF is f(u) = 0.05 for X1
0 ≤ u ≤ 20. Find the mean and variance. 0.15 X2
X3
X4
Solution
∞ 20
0.05u2 20
Z Z
0.10
E(X) = u × (0.05)du =
uf(u)du = = 10
−∞ 0 2 0
Z ∞ Z 20
V(X) = (u − 10)2 f(u)du = (u − 10)2 (0.05)du
−∞ 0 0.05
0.05(u − 10)3 20 100
= = .
3 0 3
Z ∞ Z 20 0
0.05u3 20 400 −20 −10 0 10 20 30 40 50
E(X 2 ) = u2 f(u)du = u2 × (0.05)du = =
−∞ 0 3 0 3
400 100 E(X1 ) = E(X2 ) < E(X3 ) = E(X4 ).
2 2 2
V(X) = E(X ) − E(X) = − 10 = .
3 3

Dung Nguyen Probability and Statistics44 / 41 Dung Nguyen Probability and Statistics45 / 41

Variance and Standard Deviation Variance and Standard Deviation

Example 32 - Comparison Example


X1 33 Suppose that X can take each of the five values −2, 0, 1, 3, 4 with
0.15 X2 equal probability. Determine the variance and standard
X3 deviation of X and Y = 4X − 7.
X4

0.10

0.05

0
−20 −10 0 10 20 30 40 50

E(X1 ) = E(X2 ) < E(X3 ) = E(X4 ).


V(X1 ) = V(X3 ) < V(X2 ) = V(X4 ).

Dung Nguyen Probability and Statistics45 / 41 Dung Nguyen Probability and Statistics46 / 41
Variance and Standard Deviation Joint Distributions

Example In many random experiments, more than one quantity is measured,


meaning that there is more than one random variable.
33 Suppose that X can take each of the five values −2, 0, 1, 3, 4 with
equal probability. Determine the variance and standard Example (Cell phone flash unit)
deviation of X and Y = 4X − 7. A flash unit is chosen randomly from a production line; its
recharge time X (seconds) and flash intensity Y (watt-seconds) are
measured.
34 Suppose X has the following pdf, where c is a constant to be
To make probability statements about several random variables, we
determined
need their joint probability distribution.
(
c(1 − u2 ), −1 ≤ u ≤ 1
f(u) =
0, otherwise
Compute E(X), V(X).

Dung Nguyen Probability and Statistics46 / 41 Dung Nguyen Probability and Statistics47 / 41

Joint Distributions Joint Distributions

Joint Probability Mass Function Example 35 - Signal Strength


The joint probability mass function of the discrete random A mobile website is accessed from a smart phone; X is the signal
variables X and Y denoted as fXY (u, v) satisfies strength, in number of bars, and Y is response time, to the nearest
fXY (u, v) = P(X = u, Y = v). second.
y = Response time x = Number of Bars
(nearest second) of Signal Strength
Proposition (Characteristic properties) 1 2 3 Total
1 fXY (u, v) ≥ 0 for all u, v. 1 0.01 0.02 0.25 0.28
XX 2 0.02 0.03 0.20 0.25
2 fXY (u, v) = 1 3 0.02 0.10 0.05 0.17
u v
4 0.15 0.10 0.05 0.30
Total 0.20 0.25 0.55 1.00

Determine
a P(X < 3, Y ≤ 2).
b P(X < 3|Y ≤ 2).
c P(Y ≤ 2|X < 3).
Dung Nguyen Probability and Statistics48 / 41 Dung Nguyen Probability and Statistics49 / 41
Joint Distributions Joint Distributions

Joint Probability Density Function Example 36 - Server Access Time


The joint probability density function for the continuous random Let the random variable X denote the time until a computer server
variables X and Y, denotes as fXY (u, v), satisfies the following connects to your machine (in milliseconds), and let Y denote the
properties ZZ time until the server authorizes you as a valid user (in
P((X, Y) ∈ A) = fXY (u, v)dudv. milliseconds). X and Y measure the wait from a common starting
A point (u < v). The joint probability density function for X and Y
is
fXY (u, v) = k e−0.001u−0.002v ,
Proposition (Characteristic properties)
for 0 < u < v < ∞.
1 fXY (u, v) ≥ 0.
Z ∞Z ∞ a Identify k.
2 fXY (u, v)dudv = 1. b Calculate P(X ≤ 1000, Y ≤ 2000).
−∞ −∞

Solution
k = 6 × 10−6 , P(X ≤ 1000, Y ≤ 2000) = 0.915

Dung Nguyen Probability and Statistics50 / 41 Dung Nguyen Probability and Statistics51 / 41

Joint Distributions Joint Distributions

Marginal Probability Distributions (discrete) Example 37 - Signal Strength


Since X is a random variable, it also has its own probability A mobile web site is accessed from a smart phone; X is the signal
distribution, ignoring the value of Y, called its marginal strength, in number of bars, and Y is response time, to the nearest
probability distribution. second.
y = Response time x = Number of Bars
The marginal probability distribution for X (nearest second) of Signal Strength
fX (u) = P(X = u) 1 2 3 Marginal fY (y)
=
X
P(X = u, Y = v) 1 0.01 0.02 0.25 0.28
v
2 0.02 0.03 0.20 0.25
X 3 0.02 0.10 0.05 0.17
= fXY (u, v)
4 0.15 0.10 0.05 0.30
v
X Marginal fX (x) 0.20 0.25 0.55 1.00
fX (u) = fXY (u, v).
v
The marginal probability distribution for Y
X
fY (v) = fXY (u, v).
u

Dung Nguyen Probability and Statistics52 / 41 Dung Nguyen Probability and Statistics53 / 41
Joint Distributions Joint Distributions

Marginal Probability Distributions (continuous) Example 38 - Signal Strength


If the joint probability density function of random variables X and A mobile web site is accessed from a smart phone; X is the signal
Y is fXY (u, v), then strength, in number of bars, and Y is response time, to the nearest
second.
The marginal probability density functions of X: y = Response time x = Number of Bars
Z ∞
(nearest second) of Signal Strength
fX (u) = fXY (u, v)dv,
−∞ 1 2 3 Marginal fY (y)
The marginal probability density functions of Y: 1 0.01 0.02 0.25 0.28
Z ∞
2 0.02 0.03 0.20 0.25
fY (v) = fXY (u, v)du. 3 0.02 0.10 0.05 0.17
−∞
4 0.15 0.10 0.05 0.30
Marginal fX (x) 0.20 0.25 0.55 1.00

Compute the mean and the variance of X and Y.

Dung Nguyen Probability and Statistics54 / 41 Dung Nguyen Probability and Statistics55 / 41

You might also like