Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
ECON 240A Power 5 1 Last Week Probability Discrete Binomial Probability Distribution 2 The Normal Distribution 3 Outline The normal distribution as an approximation to the binomial The standardized normal variable, z sample means 4 Binomial Distribution Five Flips of a Fair Coin density cumulative k n p 0 5 0.03125 0.03125 1 5 0.15625 0.1875 2 5 0.3125 0.5 3 5 0.3125 0.8125 4 5 0.15625 0.96875 5 5 0.03125 1 Probability Density Function Five Flips of a Fair Coin 0.35 0.3 Probability 0.25 0.2 0.15 0.1 0.05 0 0 1 2 3 Number of Heads 4 5 6 Cumulative Distribution Function Five Flips of a Fair Coin 1 0.9 0.8 Probability 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 1 2 3 Number of Heads 4 5 7 Cumulative Distribution Function The probability of getting two or less heads in five flips is 0.5 • can use the cumulative distribution function • can use the probability density function and add the probabilities for 0, 1, and 2 heads the probability of getting two heads or three heads is • can add the probabilities for 2 heads and three heads from the probability density function 8 Cumulative Distribution Function Five Flips of a Fair Coin 1 0.9 0.8 Probability 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 1 2 3 Number of Heads 4 5 9 Binomial Distribution Five Flips of a Fair Coin density cumulative k n p 0 5 0.03125 0.03125 1 5 0.15625 0.1875 2 5 0.3125 0.5 3 5 0.3125 0.8125 4 5 0.15625 0.96875 5 5 0.03125 1 Cumulative Distribution Function the probability of getting two heads or three heads is: • can add the probabilities for 2 heads and three heads from the probability density function • can use the probability of getting up to 3 heads, P(3 or less heads) from the cumulative distribution function (CDF) and subtract the probability of getting up to one head P(1 or less heads] 11 Probability Density Function Five Flips of a Fair Coin 0.35 0.3 Probability 0.25 0.2 0.15 0.1 0.05 0 0 1 2 3 Number of Heads 4 5 12 Binomial Distribution Five Flips of a Fair Coin density cumulative k n p 0 5 0.03125 0.03125 1 5 0.15625 0.1875 2 5 0.3125 0.5 3 5 0.3125 0.8125 4 5 0.15625 0.96875 5 5 0.03125 1 Binomial Distribution Five Flips of a Fair Coin density cumulative k n p 0 5 0.03125 0.03125 1 5 0.15625 0.1875 2 5 0.3125 0.5 3 5 0.3125 0.8125 4 5 0.15625 0.96875 5 5 0.03125 1 Cumulative Distribution Function Five Flips of a Fair Coin 1 p[h 3] 0.9 0.8 Probability 0.7 p[h 1] 0.6 0.5 0.4 0.3 0.2 0.1 0 0 1 2 3 Number of Heads 4 5 15 For the Binomial Distribution Can use a computer as we did in Lab Two Can use Tables for the cumulative distribution function of the binomial such as Table 1 in the text in Appendix B, p. B-1 • need a table for each p and n. 16 17 Normal Approximation to the binomial Fortunately, for large samples, we can approximate the binomial with the normal distribution, as we saw in Lab Two 18 Binomial Probability Density Function Forty Tosses of a Fair Coin 0.14 0.12 0.08 0.06 0.04 0.02 Number of Heads 39 36 33 30 27 24 21 18 15 12 9 6 3 0 0 Probabilty 0.1 Binomial Cumulative Distribution Function Forty Tosses of a Fair Coin 1 0.9 0.8 0.6 0.5 0.4 0.3 0.2 0.1 Number of Heads 39 36 33 30 27 24 21 18 15 12 9 6 3 0 0 Probability 0.7 The Normal Distribution What would the normal density function look like if it had the same expected value and the same variance as this binomial distribution • from Power 4, E(h) = n*p =40*1/2=20 • from Power 4, VAR[h] = n*p*(1-p) = 40*1/2*1/2 =10 21 Normal Density Function, Mean 20, Variance 10 0.14 0.12 Density 0.1 0.08 0.06 0.04 0.02 0 0 10 20 30 Number of Heads 40 50 Comparing the Normal Density with the Binomial Probability Distribution 0.14 0.12 binomial normal 0.08 0.06 0.04 0.02 Number of Heads 39 36 33 30 27 24 21 18 15 12 9 6 3 0 0 Density 0.1 Comparing the Binomial and Normal Distribution Functions 1 0.9 0.8 binomial normal 0.6 0.5 0.4 0.3 0.2 0.1 Number of Heads 39 36 33 30 27 24 21 18 15 12 9 6 3 0 0 Probability 0.7 Comparing the Binomial and Normal (Mean = 19.5) Cumulative Distribution Functions 1.2 binomial normal 0.8 0.6 0.4 0.2 Number of Heads 39 36 33 30 27 24 21 18 15 12 9 6 3 0 0 Probability 1 Normal Approximation to the Binomial: De Moivre P(a k b) P[(a – ½ - np)/ np(1 p) z [(b + ½ - np)/ np(1 p) ] This is the probability that the number of heads will fall in the interval a through b, as determined by the normal cumulative distribution function, using a mean of n*p, and a standard deviation equal to the square root of n*p*(1-p), i.e. the square root of the variance of the binomial distribution. The parameter 1/2 is a continuity correction since we are approximating a discrete function with a continuous one, and was the motivation of using mean 19.5 instead of mean 20 in the previous slide. Visually, this seemed to be a better approximation than using a mean of 20. Guidelines for using the normal approximation n*p>=5 n*(1-p)>=5 27 The Standardized Normal Variate Z~N(0, 10] E[z} = 0 VAR[Z] = 1 28 f ( z) [1 / 2 ] * e 1/ 2[( z 0) /1]2 Density Function for the Standardized Normal Variate 0.45 0.4 0.35 Density 0.3 0.25 0.2 0.15 0.1 0.05 0 -5 -4 -3 -2 -1 0 1 Standard Deviations 2 3 4 5 Cumulative Distribution Function for a Standardized Normal Variate 1 0.9 0.8 Probabilty 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 -5 -4 -3 -2 -1 0 1 Standrd Deviations 2 3 4 5 Normal Variate x x ~ N ( , ) 2 E (x ) VAR[ x] 2 z ( x ) / , orz * x – E(z) = 0 – VAR(z) = 1 f ( x) (1 / 2 ) * e 1/ 2[( x ) / ]2 Normal Density Function, Mean 20, Variance 10 0.14 0.12 Density 0.1 0.08 0.06 0.04 0.02 0 0 10 20 30 Number of Heads 40 50 b F (b) f ( x)dx Normal Cumulative Distribution Function, Mean=20, Variance = 10 1 0.9 0.8 Probability 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 10 20 b 30 Number of Heads 40 50 f ( x) (1 / 2 ) * e 1/ 2[( x ) / ]2 Normal Density Function, Mean 20, Variance 10 0.14 0.12 Density 0.1 0.08 0.06 0.04 0.02 0 0 10 20 b 30 Number of Heads 40 50 For the Normal Distribution Can use a computer as we did in Lab Two Can use Tables for the cumulative distribution function of the normal such as Table 3 in the text in Appendix B, p. B-8 • need only one table for the standardized normal variate Z. 35 36 Sample Means 37 Sample Mean Example Rate of return on UC Stock Index Fund return equals capital gains or losses plus dividends monthly rate of return equals price this month minus price last month, plus dividends, all divided by the price last month r(t) ={ p(t) -p(t-1) + d(t)}/p(t-1) 38 Rate of Return UC Stock Index Fund, http://atyourservice.ucop.edu/ Date Sept 2002 Oct 2002 Nov 2002 Dec 2002 Jan 2003 Feb 2003 March 2003 Rate -3.51 7.84 5.13 -5.24 -2.51 -1.66 0.61 39 Table Cont. Date Rate April 2003 8.43 May 2003 5.55 June 2003 1.34 July 2003 2.67 Aug 2003 2.26 40 Rate of Return UC Stock Index Fund 10 8 6 Rate 4 2 0 Jul-02 Sep- Oct-02 Dec- Jan-03 Mar-2 02 02 03 -4 -6 Date May- Jun-03 Aug- Oct-03 03 03 Data Considerations Time series data for monthly rate of return since we are using the fractional change in price (ignoring dividends) times 100 to convert to %, the use of changes approximately makes the observations independent of one another in contrast, if we used price instead of price changes, the observations would be correlated, not independent 42 Cont. assume a fixed target, i.e. the central tendency of the rate is fixed, not time varying Assume the rate has some distribution, f, 2 f ( , ) other than normal: ri = Aug '03 sample mean: r r (i ) / 12 1.74 i Sept '02 Rate of Return UC Stock Index Fund 10 8 6 Rate 4 2 1.74 0 Jul-02 Sep- Oct-02 Dec- Jan-03 Mar-2 02 02 03 -4 -6 Date May- Jun-03 Aug- Oct-03 03 03 What are the properties of this sample mean? 45 Note: Expected value of a constant, c, times a random variable, x(i), where i indexes the observation n n i 1 i 1 E[cx] c * x(i ) * f [ x(i )] c * x(i ) * f [ x(i )] c * E[ x(i )] Note: Variance of a constant times a random variable VAR[c*x] = E{cx - E[c*x]}2 = E{c*[x-Ex]}2 = E{c2[x -Ex]2 } = c2 *E[x-Ex]2 = c2 *VARx Properties of r , where, r (i) ~ f ( , ) 2 Expected value: 12 12 i 1 i 1 E (r ) E{ [r (i )] / 12} 1 / 12 E[r (i )] (1 / 12) *12 Variance 12 VAR(r ) VAR{ r (i ) / 12} (1 / 12) i 1 12 2 2 2 2 VAR [ r ( i )] ( 1 / 12 ) * 12 / 12 i 1 Central Limit Theorem As the sample size grows, no matter what the distribution, f, of the rate of return, r, the distribution of the sample mean approaches normality 48 An interval for the sample mean p(a r b) p{[( a ) / n] r [(b ) / n ]} The rate of return, ri , could be distributed as uniform f[r(i)] r(i) 50 And yet for a large sample, the sample mean will be distributed as normal Cumulative Distribution Function for a Standardized Normal Variate 1 0.9 b 0.8 Probabilty 0.7 0.6 0.5 0.4 a 0.3 0.2 0.1 0 -5 -4 -3 -2 -1 0 1 Standrd Deviations 2 3 4 5 51 Bottom Line We can use the normal distribution to calculate probability statements about sample means 52 An interval for the sample mean p(a r b) p{[( a ) / n] r [(b ) / n ]} calculate choose infer ?, Assume we know, or use sample standard deviation, s Sample Standard Deviation If we use the sample standard deviation, s, then for small samples, approximately less then 100 observations, we use Student’s t distribution instead of the normal s n 2 [ r ( i ) r ] /( n 1) i 1 t-distribution Text p.253 Normal compared to t t distribution as smple size grows 55 Appendix B Table 4 p. B-9 56