Ch3_FunctionsRandomVariables_torresgarcia.pdf
-
Upload
osiris-lopez-manzanarez -
Category
Documents
-
view
212 -
download
0
Transcript of Ch3_FunctionsRandomVariables_torresgarcia.pdf
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 1/38
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 2/38
Reference: Most slides adapted from Montgomery et al. (2011)
RANDOM VARIABLES AND PROBABILITYDISTRIBUTIONS1. Random Numbers, Random Variables (RVs), Random Experiment (3-1 & 3-2)
2. Probability Laws (3-3)
3. Continuous RVs (3-4 & 3-5) CRVs Distributions: Normal, Lognormal, Gamma, Weibull, Beta
4. Probability Plots (3-6)
5. Discrete RVs (3-7 & 3-8) DRVs Distributions: Binomial and others
6. Poisson Process (3-9)
7. Normal Approximation to the Binomial and Poisson Distributions (3-10)
8. More than one RV and Independence (3-11)
9. Functions of RVs (3-12)
10. Statistics and the Central Limit Theorem (3-13)
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 3/38
Reference: Most slides adapted from Montgomery et al. (2011)
INTRODUCTION
Sometimes, we are interested in analyzing situationsthat are characterized by many random variablesthat are “tied” to one another
Examples: Physiology/Human Factors: a subject’s height and weight
Manufacturing: defect types
Epidemiology: disease risks (high blood pressure, high LDL cholesterol, smoking, etc.)
3
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 4/38
Reference: Most slides adapted from Montgomery et al. (2011)
3-11 More Than One Random Variable
and Independence
3-11.1 Joint Distributions
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 5/38
Reference: Most slides adapted from Montgomery et al. (2011)
JOINT PROBABILITY MASS FUNCTIONLet X1 be the number of times that a circuit board has been reworked.
Let X2 be the number of critical defects in the circuit board.
The joint probability mass function for X1 and X2
5
),(),( 221121 x X x X P x x p
X1
0 1 2
X2 0 1/10 4/10 1/10
1 2/10 2/10 0
x y
y x p
y x p
1),(
1),(0Is p(x1 , x2) a valid joint probability mass function?
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 6/38
Reference: Most slides adapted from Montgomery et al. (2011)
MARGINAL DISTRIBUTIONS
We can derive separate distributions for both X1 and X2 from the jointdistribution, p(x1 , x2)
These separate distributions are called Marginal DistributionsMarginal distribution of X1 :
Marginal distribution of X2 :
6
),()(
),()(
212
211
1
2
x x p x p
x x p x p
x
x
10
10
10
1)2(
10
6
10
2
10
4)1(
... 10
3
10
2
10
1
10000
hence,
210
1
1
21211
2
1
0
111
2
x p
x p
similarly
) ,x p(x ) ,x p(x ) p(x
, , ) for k ,x p(x ) p(xk) p(x x
10
40
10
2
10
2)1(
... 10
6
10
1
10
4
10
1
)2,0(0100
0
hence...
10
2
122121
2
2
2
0
122
1
x p
similarly
x x p ) ,x p(x ) ,x p(x
) p(x
, ) for k ,x p(x ) p(xk) p(x x
X1
0 1 2
X2 0 1/10 4/10 1/10
1 2/10 2/10 0
p(x1, x2):
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 7/38 Reference: Most slides adapted from Montgomery et al. (2011)
SUMMARIZING MARGINAL DISTRIBUTIONS
7
2 x10
1
1 x10
6
0 x10
3) p(x
1
1
11
1 x10
4
0 x10
6) p(x
2
22
p(x1, x2): X1
0 1 2
X2 0 1/10 4/10 1/10
1 2/10 2/10 0
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 8/38 Reference: Most slides adapted from Montgomery et al. (2011)
EXPECTATIONSGiven:
What is E(X1)?
What is E(X2)?
8
p(x1, x2): X1
0 1 2X2 0 1/10 4/10 1/10
1 2/10 2/10 0
2 x10
1
1 x10
6
0 x10
3) p(x
1
1
11
1 x10
4
0 x10
6) p(x
2
22
5
4
10
12
10
61
10
30)(
)()(
1
2
0
111
1
X E
x p x X E x
2
0
1
02111
1 2),()(
x x x x p x X E or
5
2
10
41
10
60)(
)()(
2
1
0
222
2
X E
x p x X E x
1
0
2
0
2122
2 1
),()( x x
x x p x X E or
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 9/38
Reference: Most slides adapted from Montgomery et al. (2011)
CONDITIONAL PROBABILITY
9
)(
),()|(
2
212211
x p
x x p x X x X p
)(
),()|(
1
211122
x p
x x p x X x X p
p(x1, x2): X1
0 1 2
X2 0 1/10 4/10 1/10
1 2/10 2/10 0
2 x10
1
1 x10
6
0 x10
3) p(x
1
1
11
1 x10
4
0 x10
6) p(x
2
22
Joint probability mass function
Marginal of x1 Marginal of x2
p(X1 = 0| X2= 0) = (1/10)/(6/10) = 1/6
p(X1 = 1| X2= 0) = (4/10)/(6/10) = 4/6
p(X1 = 2| X2= 0) = (1/10)/(6/10) = 1/6
p(X1 = 0| X2= 1) = (2/10)/(4/10) = 2/4 p(X1 =
1| X2= 1) = (2/10)/(4/10) = 2/4
p(X1 = 2| X2= 1) = (0/10)/(4/10) = 0
p(X2 = 0| X1= 0) = (1/10)/(3/10) = 1/3
p(X2 = 1| X1= 0) = (2/10)/(3/10) = 2/3
p(X2 = 0| X1= 1) = (4/10)/(6/10) = 4/6
p(X2 = 1| X1= 1) = (2/10)/(6/10) = 2/6
p(X2 = 0| X1= 2) = (1/10)/(1/10) = 1
p(X2 = 1| X1= 2) = (0)/(1/10) = 0
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 10/38
Reference: Most slides adapted from Montgomery et al. (2011)
CONDITIONAL EXPECTATION
What is the expected value of X1, given that X2 = 0?That is, find E(X1| X2 = 0).
Using similar logic, the following quantities can becomputed:E(X1| X2 = 0) = 1 (from above), E(X1| X2 = 1) = 2/4
E(X2 | X1= 0) = 2/3, E(X2 | X1= 1) = 2/6, E(X2 | X1= 2) = 0
Pick one of the above and verify
10
16
12
6
41
6
10
)0|()0|( 21
2
0
121
1
x x p x X X E
x
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 11/38
Reference: Most slides adapted from Montgomery et al. (2011)
JOINT DENSITY FUNCTION:
Example:
11
10 and 1x0for)2(3
2),( 212121 x x x x x f
1),( 1221
1
1
2
2
dxdx x x f
high x
low x
high x
low x
),( 21 x x f
113
2
13
2
1)2(3
2
1
1
0
1
1
1
0
1
0
2
21
12
1
0
1
0
21
1
1
2
1 2
dx x
dx x x x
dxdx x x
x
x
x x
TRUE 12
3
3
2
112
1
3
2
123
21
0
1
2
1
x
x
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 12/38
Reference: Most slides adapted from Montgomery et al. (2011)
MARGINAL DENSITY FUNCTIONSJust as in the discrete case, we can derive the marginal density functionsfor X1, X2, etc. from the joint density function
Mathematical definitions:Marginal density of X1:
Marginal density of X2:
12
2211 ),()(
2
dx x x f x f x
1212 ),()(1
dx x x f x f x
10 13
2
6
4
3
2
3
4
3
2),()(
11
1
0
2
221
2
1
0
2122
1
0
11
2
x for x x x x
dx x xdx x x f x f x
10 1431
34
31
3
4
3
2),()(
22
1
0
12
2
1
1
1
0
2112
1
0
12
1
x for x x x x
dx x xdx x x f x f x
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 13/38
Reference: Most slides adapted from Montgomery et al. (2011)
CRITICAL THINKING
What is and
They are both equal to 1.
How can you find F(x1), F(x2)?
How can you find E(X1), E(X2), VAR(X1), VAR(X2)?
13
1
1
0
1)(
1
dx x f x
2
1
0
2 )(
2
dx x f x
Same as always.
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 14/38
Reference: Most slides adapted from Montgomery et al. (2011)
ELEMENTARY DEFINITION
14
Xof Marginal
YandXof Jointx)|(YYof lConditiona
,
Yof Marginal
YandXof Jointy)|(XXof lConditiona
Similarly
Holds for both discrete and continuous.
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 15/38
Reference: Most slides adapted from Montgomery et al. (2011)
3-11 More Than One Random Variable
and Independence
3-11.2 Independence
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 16/38
Reference: Most slides adapted from Montgomery et al. (2011)
3-11 More Than One Random Variable
and Independence
3-11.2 Independence
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 17/38
Reference: Most slides adapted from Montgomery et al. (2011)
CONDITIONAL PROBABILITY AND INDEPENDENCE
If X and Y are independent and have densityfunctions f(x) and f(y)...then their Joint Density Function, f(x,y) = f(x)f(y)
Example: Let () = 1/3 − 1 ≤ ≤ 2
Let () = 1/8 2 ≤ ≤ 10
Then (, ) = 1/24 − 1 ≤ ≤ 2 2 ≤ ≤ 10
You can verify the above by doubly integratingf(x,y) over the ranges of x and y.
17
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 18/38
Reference: Most slides adapted from Montgomery et al. (2011)
RANDOM VARIABLES AND PROBABILITYDISTRIBUTIONS1. Random Numbers, Random Variables (RVs), Random Experiment (3-1 & 3-2)
2. Probability Laws (3-3)
3. Continuous RVs (3-4 & 3-5) CRVs Distributions: Normal, Lognormal, Gamma, Weibull, Beta
4. Probability Plots (3-6)
5. Discrete RVs (3-7 & 3-8) DRVs Distributions: Binomial and others
6. Poisson Process (3-9)
7. Normal Approximation to the Binomial and Poisson Distributions (3-10)
8. More than one RV and Independence (3-11)
9. Functions of RVs (3-12)
10. Statistics and the Central Limit Theorem (3-13)
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 19/38
Reference: Most slides adapted from Montgomery et al. (2011)
FUNCTION TO RANDOM VARIABLES
Image Source: onlinecourses.science.psu.edu
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 20/38
Reference: Most slides adapted from Montgomery et al. (2011)
ALGORITHM #1: DISCRETE CASE
HOW TO DEVELOP THE PMF AND CDF OF A DISCRETE
RANDOM VARIABLE (Y) THAT IS A FUNCTION OF ANOTHERDISCRETE RANDOM VARIABLE (X)
1. Find the values of y.
2. Sum the pmf values of x that correspond to each y toobtain p(y)
3. Compute F(y) by using the relationship: F(y) = P(Y < y)
20
From 1 - 3 above we can get what we need to find E(Y) and V(Y)
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 21/38
Reference: Most slides adapted from Montgomery et al. (2011)
EXAMPLE FOR DISCRETE Random variable has pmf
Random variable = 202
21
otherwise 0
2xif .1
1xif .3
0xif .6 p(x)
otherwise 0
80yif .1
20yif .3 0yif .6 p(y)
80yif 1
80y20if .9
20y0if .6
0yif 0F(y)
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 22/38
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 23/38
Reference: Most slides adapted from Montgomery et al. (2011)
ANOTHER EXAMPLE FOR DISCRETE Let
Find p(y) if Y = |X|+1
Find F(y)
Graph F(y)
23
1xif .3
0xif .2
1-xif .1
2-xif .4 p(x)
21
10
21
32
Y X
3yif 0.4-2)P(X
2yif 0.40.30.11) p(X-1) p(X
1yif 0.20) p(X p(y)
31.0
3y20.6
2y10.2
1y0
F(y)
y
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 24/38
Reference: Most slides adapted from Montgomery et al. (2011)
ALGORITHM #2:HOW TO DEVELOP THE CDF AND PDF OF A CONTINUOUS
RANDOM VARIABLE (Y) THAT IS A FUNCTION OFANOTHER CONTINUOUS RANDOM VARIABLE (X)
1. Find the range of Y.
2. Obtain the CDF, F(y) = P(Y < y)
3. Differentiate F(y) with respect to y to get the probability density, f(y).
or
24
From 1 - 3 above we can get what we need to find E(Y) and V(Y)
dy
dx x f y f )()(
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 25/38
Reference: Most slides adapted from Montgomery et al. (2011)
EXAMPLE is a random variable with probability density,
() = 0.5( − 1) 1 ≤ ≤ 3
If = 2 – 3, find (), (), (), and ().
25
f(x)
X1 3
1
() = 7/3 () = 17/3 – (7/3)^2 = 2/9
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 26/38
Reference: Most slides adapted from Montgomery et al. (2011)
EXAMPLE FOR CONTINUOUS is a random variable with probability density,
() = 0.5( − 1) 1 ≤ ≤ 3
If = 2 – 3 = ( + 3)/2
1. Range of W: Find in lower and upper ranges of X
Lower W: 2(1) – 3 = -1 (x = 1)
Upper W: 2(3) – 3 = 3 (x = 3)
2. CDF of W: F(w) = P(W < w) = P(2X-3 < w) = P(X < (w+3)/2)
3. pdf of w:
26
1612
12
3
24)1(5.)(
2
2
3
1
2
3
1
2
ww
w x x
dx xdx x f
w w
3w1-for8
1)()(
w
w f w F dw
d
8
1
4
1
8
3
2
11
2
35.0
)2
3(
12
35.0)()(
www
dw
wd
w
dw
dx x f w f
or
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 27/38
Reference: Most slides adapted from Montgomery et al. (2011)
3-12 Functions of Random Variables
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 28/38
Reference: Most slides adapted from Montgomery et al. (2011)
Now we have the pdf of Y and can determine E(Y) and
VAR(Y):
Because W is a nice, linear function of X, we could havedetermined E(W) and VAR(W) this way also: () = (2 − 3) = (2) − (3) = 2() – (3) = 2([7/3]) − 3 = 5/3
() = (2 − 3) = 22() = 4(2/9) = 8/9
28
3
5
8
1w)(w)(
3
1
3
1
dww
dww f W E
9
8
3
5
3
11)]([)()(
3
11 8
1w)(w)(
2
22
3
1
2
3
1
22
W E W E W VAR
dww
dww f W E
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 29/38
Reference: Most slides adapted from Montgomery et al. (2011)
3-12 Functions of Random Variables
3-12.1 Linear Combinations of Independent
Random Variables
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 30/38
Reference: Most slides adapted from Montgomery et al. (2011)
3-12 Functions of Random Variables
3-12.1 Linear Combinations of Independent
Random Variables
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 31/38
Reference: Most slides adapted from Montgomery et al. (2011)
3-12 Functions of Random Variables
3-12.1 Linear Combinations of Independent
Random Variables
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 32/38
Reference: Most slides adapted from Montgomery et al. (2011)
3-12 Functions of Random Variables
3-12.2 What If the Random Variables Are NotIndependent?
If = + , then
() = ( + ) = () + () () = ( + ) = 2() + 2() + (, )
Note: If X and Y are independent, then
() = 2() + 2() because (,) = 0
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 33/38
Reference: Most slides adapted from Montgomery et al. (2011)
DISCRETE CASE EXAMPLE
33
y
0 1
p(x,y) = x 2 0.2 0.4
4 0.3 0.1
E(X) = 2.8
VAR(X) = .96
E(Y) = .5
VAR(Y) = .25
E(XY) = 1.2
(,) = −0.2
= −0.408
What is COV(X,Y) and r?
)()()(),( Y E X E Y X E Y X COV XY
4082.0489.0
2.025.096.0
2.0)()(
),(
Y X
XY
Y VAR X VAR
Y X COV
r
2.04.12.15.08.22.1),( XY
Y X COV
Y X
XY
Y VAR X VAR
Y X COV
r
)()(
),(
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 34/38
Reference: Most slides adapted from Montgomery et al. (2011)
CONTINUOUS CASE EXAMPLE
(, ) = 1/24 for -1 < x < 2 and 2 < y < 10
It can be shown that
f(x) = 1/3 for -1 < x < 2, E(X) = 1/2, VAR(X) = 3/4
f(y) = 1/8 for 2 < y < 10, E(Y) = 6, VAR(Y) = 16/3
COV(X,Y) = ?, r = ?
34
396
288
96
12
96
300
248
3
48
3
48
)1(
48
4
4824)(
10
2
210
2
10
2
210
2
2
1
210
2
2
1
ydy
y
dy y y
dy y x
dxdy xy
Y X E
06
2
13)()()(),(
21211221
X E X E X X E X X COV
)()()(),( 21211221 X E X E X X E X X COV
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 35/38
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 36/38
Reference: Most slides adapted from Montgomery et al. (2011)
3-12 Functions of Random Variables
3-12.3 What If the Function Is Nonlinear?
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 37/38
Reference: Most slides adapted from Montgomery et al. (2011)
3-12 Functions of Random Variables
3-12.3 What If the Function
Is Nonlinear?
8/16/2019 Ch3_FunctionsRandomVariables_torresgarcia.pdf
http://slidepdf.com/reader/full/ch3functionsrandomvariablestorresgarciapdf 38/38
3-12 Functions of Random Variables
3-12.3 What If the Function Is Nonlinear?