Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Econ 240A Power 7. 2 This Week, So Far §Normal Distribution §Lab Three: Sampling Distributions §Interval Estimation and HypothesisTesting.

Similar presentations


Presentation on theme: "1 Econ 240A Power 7. 2 This Week, So Far §Normal Distribution §Lab Three: Sampling Distributions §Interval Estimation and HypothesisTesting."— Presentation transcript:

1 1 Econ 240A Power 7

2 2 This Week, So Far §Normal Distribution §Lab Three: Sampling Distributions §Interval Estimation and HypothesisTesting

3 3 Outline §Distribution of the sample variance §The California Budget: Exploratory Data Analysis §Trend Models §Linear Regression Models §Ordinary Least Squares

4 4 The Sample Variance, s 2 Is distributed with n-1 degrees of freedom (text, 12.3 “inference about a population variance) (text, pp. 258-262, Chi-Squared distribution)

5 5 Text Chi-Squared Distribution

6 6 Text Chi-Squared Table 5 Appendix p. B-10

7 7 Example: Lab Three §50 replications of a sample of size 50 generated by a Uniform random number generator, range zero to one. l expected value of the mean: 0.5 l expected value of the variance: 1/12

8 8 Histogram of 50 Sample Means, Uniform, U(0.5, 1/12) Average of the sample means: 0.4963

9 9 Histogram of 50 sample variances, Uniform, U(0.5, 0.0833) Average sample variance: 0.08352

10 10 Confidence Interval for the first sample variance of 0.07667 §A 95 % confidence interval Where taking the reciprocal reverses the signs of the inequality

11 11

12 12 The UC Budget

13 13 The UC Budget §The part of the UC Budget funded by the state from the general fund

14 14

15 15

16 16 Total General Fund Expenditures Appendix, p.25 Schedule 6

17 17 UC General Fund Expenditures, Appendix p. 46

18 18

19 19

20 20

21 21 p. 94

22 22 p. 94

23 23 p. 95

24 24

25 25 How to Forecast the UC Budget? §Linear Trendline?

26 26 Trend Models

27 27

28 28 Forecast increase $84 million

29 29

30 30 Linear Regression Trend Models §A good fit over the years of the data sample may not give a good forecast

31 31 How to Forecast the UC Budget? §Linear trendline? §Exponential trendline ?

32 32 Forecast growth rate: 6.8%/yr

33 33 Time Series Models §Linear l UCBUD(t) = a + b*t + e(t) l where the estimate of a is the intercept: $19.497 million in 68-69 l where the estimate of b is the slope: $81.6 million/yr l where the estimate of e(t) is the the difference between the UC Budget at time t and the fitted line for that year §Exponential

34 34 intercept slope Error in 01-02

35 35 Time Series Models §Exponential l UCBUD(t) = UCBUD(68-69)*e b*t e e(t) l UCBUD(t) = UCBUD(68-69)*e b*t + e(t) l where the estimate of UCBUD(68-69) is the estimated budget for 1968-69 l where the estimate of b is the exponential rate of growth

36 36 Forecast growth rate: 6.8%/yr 1 year forecast from 2003-04 1.068*3038.666 = 3245.295 M$ Exponential rate of growth Estimated UCBUD in 68-69

37 37 Linear Regression Time Series Models §Linear: UCBUD(t) = a + b*t + e(t) §How do we get a linear form for the exponential model?

38 38 Time Series Models §Linear transformation of the exponential l take natural logarithms of both sides l ln[UCBUD(t)] = ln[UCBUD(68-69)*e b*t + e(t) ] l where the logarithm of a product is the sum of logarithms: l ln[UCBUD(t)] = ln[UCBUD(68-69)]+ln[e b*t + e(t) ] l and the logarithm is the inverse function of the exponential: l ln[UCBUD(t)] = ln[UCBUD(68-69)] + b*t + e(t) l so ln[UCBUD(68-69)] is the intercept “a”

39 39 1968-69 2003-04

40 40 Exponential rate of growth ln UCBUD at t=0 exp[5.932] = 376.9 observed = $291.3

41 41 Forecast growth rate: 6.8%/yr Exponential rate of growth Estimated UCBUD in 68-69

42 42 Naïve Forecasts §Average §forecast next year to be the same as this year

43 43

44 44 UC Budget Forecasts for 2004-05 * 1.068x$3,038,666,000; exponential trendline forecast ~$4.3 B Actual:$2,670,529,000 in Governor’s Budget Summary

45 45

46 46 Time Series Forecasts §The best forecast may not be a regression forecast §Time Series Concept: time series(t) = trend + cycle + seasonal + noise(random or error) §fitting just the trend ignores the cycle §UCBUD(t) = a + b*t + e(t)

47 47 Application of Bivariate Plot §O-Ring Failure §Plot zeros (no failure) and the ones (failure) versus launch temperature for the 24 launches prior to Challenger

48 48

49 49 Linear Approximation to Backward Sigmoid

50 50 Ordinary Least Squares

51 51 intercept slope Error in 01-02

52 52 Criterion for Fitting a Line §Minimize the sum of the absolute value of the errors? §Minimize the sum of the square of the errors l easier to use §error is the difference between the observed value and the fitted value l example UCBUD(observed) - UCBUD(fitted)

53 53 §The fitted value: §The fitted value is defined in terms of two parameters, a and b (with hats), that are determined from the data observations, such as to minimize the sum of squared errors

54 54 Minimize the Sum of Squared Errors

55 55 How to Find a-hat and b-hat? §Methodology l grid search l differential calculus l likelihood function

56 56 Grid Search, a-hat=0, b-hat=80

57 57 Grid Search a-hat - + + - 0 b-hat Find the point where the sum of squared errors is minimum

58 58 Differential Calculus §Take the derivative of the sum of squared errors with respect to a-hat and with respect to b-hat and set to zero. §Divide by -2*n §or

59 59 Least Squares Fitted Parameters §So, the regression line goes through the sample means. §Take the other derivative: §divide by -2

60 60 Ordinary Least Squares(OLS) §Two linear equations in two unknowns, solve for b-hat and a-hat.

61 61 Dependent Variable: UCBUD Method: Least Squares Dependent Variable: UCBUD Sample: 1968 2003 Included observations: 36 VariableCoefficientStd. Errort-StatisticProb. C73.4401476.450540.9606230.3435 T84.003883.75658322.361780.0000 R-squared0.936335 Mean dependent var1543.5 Adjusted R-squared0.934463 S.D. dependent var914.62 S.E. of regression 234.1469 Akaike info criterion13.803 Sum squared resid1864043. Schwarz criterion13.891 Log likelihood-246.4671 F-statistic 500.04 Durbin-Watson stat0.339456 Prob(F-statistic)0.000000

62 62

63 63 O-Ring Failure Versus launch temperature


Download ppt "1 Econ 240A Power 7. 2 This Week, So Far §Normal Distribution §Lab Three: Sampling Distributions §Interval Estimation and HypothesisTesting."

Similar presentations


Ads by Google