Presentation is loading. Please wait.

Presentation is loading. Please wait.

6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 1 45-733: lecture 5 (chapter 5) Continuous Random Variables.

Similar presentations


Presentation on theme: "6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 1 45-733: lecture 5 (chapter 5) Continuous Random Variables."— Presentation transcript:

1 6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 1 45-733: lecture 5 (chapter 5) Continuous Random Variables

2 6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 2 Random 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

3 6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 3 Random 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

4 6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 4 Random 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

5 6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 5 Probability 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(X  x)

6 6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 6 Probability 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

7 6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 7 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% F X (x)=P(X  x)

8 6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 8 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%:

9 6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 9 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%:

10 6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 10 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:

11 6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 11 Density 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: –f X (x)  0 for each x –The area under f between any two points a,b is equal to F X (b)- F X (a)

12 6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 12 Density function ba F X (b)- F X (a)

13 6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 13 The uniform distribution The simplest continuous distribution The uniform distribution assigns equal “probability” to each value between 0 and 1

14 6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 14 The uniform distribution Density 01 1

15 6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 15 The uniform distribution Cdf: 01 1

16 6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 16 The 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

17 6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 17 The uniform distribution The probability that X is between 0.25 and 0.55: –P(0.25  x  0.55)= F X (0.55)- F X (0.25) –P(0.25  x  0.55)=0.55- 0.25 –P(0.25  x  0.55)=0.3

18 6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 18 Density function The area under the whole density is 1 The area to the left of any point, x, is –P(X  x) –F X (x)

19 6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 19 Density function 01 1 Area=1 01 1 Area=F X (x) x

20 6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 20 Expected 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 Expected value of X is written E(X)

21 6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 21 Expected 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

22 6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 22 Expected value Expected value of X is written E(X):

23 6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 23 Expected 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)

24 6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 24 Expected 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:

25 6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 25 Density, expectation, variance Mean is about where the middle of the density is: E(X)E(Y) fXfX fYfY

26 6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 26 Density, expectation, variance Variance is about how spread out the density is: fXfX fYfY

27 6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 27 Density, expectation, variance Consider two uniformly distributed random variables:

28 6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 28 Density, expectation, variance Consider two uniformly distributed random variables: 01 1 2 fXfX fYfY

29 6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 29 Expectation, 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?

30 6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 30 Expectation, variance Example (Problem 10, pg 194): –Savings = X 1 + X 2 + X 3 + X 4 + X 5 -800 –E(Savings)= E(X 1 )+ E( X 2 )+ E( X 3 )+ E( X 4 )+ E( X 5 )-800=5*200-800=200 –V(Savings)= V(X 1 )+ V( X 2 )+ V( X 3 )+ V( X 4 )+ V( X 5 )=5*(60) 2 =18000 Assuming independence –  savings =  1800=134


Download ppt "6/24/2015 William B. Vogt, Carnegie Mellon, 45-733 1 45-733: lecture 5 (chapter 5) Continuous Random Variables."

Similar presentations


Ads by Google