6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 1 45-733: lecture 5 (chapter 5) Continuous Random...
-
date post
21-Dec-2015 -
Category
Documents
-
view
213 -
download
0
Transcript of 6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 1 45-733: lecture 5 (chapter 5) Continuous Random...
04/18/23William B. Vogt, Carnegie Mellon, 45-7331
45-733: lecture 5 (chapter 5)45-733: lecture 5 (chapter 5)Continuous Random Variables
04/18/23William B. Vogt, Carnegie Mellon, 45-7332
Random variableRandom variable
Is a variable which takes on different values, depending on the outcome of an experiment– X= 1 if heads, 0 if tails– Y=1 if male, 0 if female (phone survey)– Z=# of spots on face of thrown die– W=% GDP grows this year– V=hours until light bulb fails
04/18/23William B. Vogt, Carnegie Mellon, 45-7333
Random variableRandom variable
Discrete random variable– Takes on one of a finite (or at least countable)
number of different values.– X= 1 if heads, 0 if tails– Y=1 if male, 0 if female (phone survey)– Z=# of spots on face of thrown die
04/18/23William B. Vogt, Carnegie Mellon, 45-7334
Random variableRandom variable
Continuous random variable– Takes on one in an infinite range of different
values– W=% GDP grows this year– V=hours until light bulb fails– Particular values of continuous r.v. have 0
probability– Ranges of values have a probability
04/18/23William B. Vogt, Carnegie Mellon, 45-7335
Probability distributionProbability distribution
Again, we are searching for a way to completely characterize the behavior of a random variable
Previous tools:– Probability function: P(X=x)– Cumulative probability distribution: P(Xx)
04/18/23William B. Vogt, Carnegie Mellon, 45-7336
Probability functionProbability function
Continuous variables may take on any value in a continuum
So, the probability that they take on any particular value is zero:– Probability that the temp in this room is exactly
72.00534 degrees is zero– Probability that the economy will grow exactly
1.5673101% is zero P(X=x)=0 always for continuous r.v.s So, the probability function is useless for
continuous r.v.s
04/18/23William B. Vogt, Carnegie Mellon, 45-7337
Cumulative distribution Cumulative distribution
However, we can still talk coherently about the cdf
There is some positive probability that the temp in the room is less than 75 degrees
There is some positive probability that the economy this year will grow by less than 1%
FX(x)=P(Xx)
04/18/23William B. Vogt, Carnegie Mellon, 45-7338
Cumulative distribution Cumulative distribution
We can also calculate the probability that a continuous random variable falls in a range
The probability that growth will be between 0.5% and 1%:
5.0115.0
15.05.0
"15.0""5.0"1
XPXPXP
XPXP
XXPXP
04/18/23William B. Vogt, Carnegie Mellon, 45-7339
Cumulative distribution Cumulative distribution
We can also calculate the probability that a continuous random variable falls in a range
The probability that growth will be between 0.5% and 1%:
5.0115.0 XX FFXP
04/18/23William B. Vogt, Carnegie Mellon, 45-73310
Cumulative distribution Cumulative distribution
We can also calculate the probability that a continuous random variable falls in a range
The probability that X will be between a and b:
aFbFbXaP XX
04/18/23William B. Vogt, Carnegie Mellon, 45-73311
Density functionDensity function
Although the probability function is useless with continuous r.v.s, there is an analogue to it
The probability density function for X is a function with two properties:– fX(x)0 for each x
– The area under f between any two points a,b is equal to FX(b)- FX(a)
04/18/23William B. Vogt, Carnegie Mellon, 45-73313
The uniform distributionThe uniform distribution
The simplest continuous distributionThe uniform distribution assigns equal
“probability” to each value between 0 and 1
04/18/23William B. Vogt, Carnegie Mellon, 45-73314
The uniform distributionThe uniform distribution
Density
0 1
1
x
x
x
xf X
10
101
00
04/18/23William B. Vogt, Carnegie Mellon, 45-73315
The uniform distributionThe uniform distribution
Cdf:
0 1
1
x
xx
x
xFX
11
10
00
04/18/23William B. Vogt, Carnegie Mellon, 45-73316
The uniform distributionThe uniform distribution
The probability that X is between 0.25 and 0.55: – Area=0.3*1=0.3– P(0.25 x 0.55)=0.3
0.550.25
1
04/18/23William B. Vogt, Carnegie Mellon, 45-73317
The uniform distributionThe uniform distribution
The probability that X is between 0.25 and 0.55: – P(0.25 x 0.55)= FX(0.55)- FX(0.25)
– P(0.25 x 0.55)=0.55- 0.25– P(0.25 x 0.55)=0.3
04/18/23William B. Vogt, Carnegie Mellon, 45-73318
Density functionDensity function
The area under the whole density is 1The area to the left of any point, x, is
– P(Xx)
– FX(x)
04/18/23William B. Vogt, Carnegie Mellon, 45-73319
Density functionDensity function
0 1
1
Area=1
0 1
1
Area=FX(x)
x
04/18/23William B. Vogt, Carnegie Mellon, 45-73320
Expected valueExpected value
The expected value of a random variable is its “average”
Imagine taking N independent draws on a random variable X– Calculate the mean of the N draws– Now imagine N going to infinity– The mean as N goes to infinity is the expected
value of XExpected value of X is written E(X)
04/18/23William B. Vogt, Carnegie Mellon, 45-73321
Expected valueExpected value
The expected value of a random variable is its “average”
Imagine taking N independent draws on a random variable X– Calculate the mean of the N draws– Now imagine N going to infinity– The mean as N goes to infinity is the expected
value of X
04/18/23William B. Vogt, Carnegie Mellon, 45-73322
Expected valueExpected value
Expected value of X is written E(X):
2
222
22
XX
X
X
X
XEXE
XEXE
XE
04/18/23William B. Vogt, Carnegie Mellon, 45-73323
Expected valueExpected value
There are addition rules for expectations in continuous variables, just as in discrete
If Z is a random variable defined by Z=a+bX, where a,b are constants (non-random)
XVbbXaVZV
XbEabXaEZE
2
04/18/23William B. Vogt, Carnegie Mellon, 45-73324
Expected valueExpected value
Often, we use these rules to standardize a random variable
To standardize a random variable means to make its mean 0 and its variance 1:
1 varianceand 0mean has Z
X
XEXZ
04/18/23William B. Vogt, Carnegie Mellon, 45-73325
Density, expectation, varianceDensity, expectation, variance
Mean is about where the middle of the density is:
E(X) E(Y)
fX
fY
04/18/23William B. Vogt, Carnegie Mellon, 45-73326
Density, expectation, varianceDensity, expectation, variance
Variance is about how spread out the density is:
fX
fY YVXV
04/18/23William B. Vogt, Carnegie Mellon, 45-73327
Density, expectation, varianceDensity, expectation, variance
Consider two uniformly distributed random variables:
x
x
x
yfY
10
15.02
5.00
x
x
x
xf X
10
101
00
04/18/23William B. Vogt, Carnegie Mellon, 45-73328
Density, expectation, varianceDensity, expectation, variance
Consider two uniformly distributed random variables:
0 1
1
2
fX
fY
04/18/23William B. Vogt, Carnegie Mellon, 45-73329
Expectation, varianceExpectation, variance
Example (Problem 10, pg 194):– A homeowner installs a new furnace– New furnace will save $X in each year (a
random variable)– Mean of X is 200, standard deviation 60– The furnace cost $800, installed– What are the savings over 5 years (ignoring
the time value of money), in expectation and variance?
04/18/23William B. Vogt, Carnegie Mellon, 45-73330
Expectation, varianceExpectation, variance
Example (Problem 10, pg 194):– Savings = X1+ X2+ X3+ X4+ X5-800
– E(Savings)= E(X1)+ E( X2)+ E( X3)+ E( X4)+ E( X5)-800=5*200-800=200
– V(Savings)= V(X1)+ V( X2)+ V( X3)+ V( X4)+ V( X5)=5*(60)2=18000
Assuming independence
savings=1800=134