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 Hypothesis Testing.

Similar presentations


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

1 1 Econ 240A Power 7

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

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

4 4 Population Random variable x Distribution f(    f ? Sample Sample Statistic: Sample Statistic Pop.

5 5 The Sample Variance, s 2 Is distributed with n-1 degrees of freedom (text, 12.2 “inference about a population variance) (text, pp. 266-270, Chi-Squared distribution)

6 6 Text Chi-Squared Distribution

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

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

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

10 10 Histogram of 50 sample variances, Uniform, U(0.5, 0.0833) Average sample variance: 0.0832

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

12 12

13 13 The UC Budget

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

15 15

16 16

17 17 Total General Fund Expenditures Appendix, p.11 Schedule 6

18 18 UC General Fund Expenditures, Appendix p. 33 2003-04, General fund actual, $2,901,257,000 2004-05, estimated $2,175,205,000 2005-06, estimated $2,806,267,000

19 19 UC General Fund Expenditures, Appendix p. 46

20 20

21 21

22 22

23 23

24 24

25 25

26 26

27 27

28 28

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

30 30 Trend Models

31 31

32 32

33 33 Slope: increase of $80.5 million per year Governor’s Budget: increase of $110 million, including May revision

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

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

36 36

37 37 Trend Models

38 38 An Application

39 39

40 40 Time Series Trend Analysis §Two Steps l Select a trend model l Fit the trend model Graphically algebraically

41 41 Trend Models §Linear Trend: y(t) = a + b*t +e(t) l dy(t)/dt = b §Exponential trend: z(t) = exp(c + d*t + u(t)) ln z(t) = c + d*t + u(t) l (1/z)*dz/dt = d

42 42 Linear Trend Model Fitted to UC Budget EViews: UCBUDB(t) = 0.1147 + 0.0805*t, R 2 = 0.934

43 43

44 44 Time Series Models §Linear l UCBUD(t) = a + b*t + e(t) l where the estimate of a is the intercept: $0.1147 Billion in 68-69 l where the estimate of b is the slope: $0.0805 billion/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

45 45 Exponential Trend Model Fitted to UC Budget EViews: lnucbudb(t) = -0.929 + 0.0637*t, R 2 = 0.908 Exp(-0.929) = $0.3949 Billion, the estimated intercept in 1968-69

46 46

47 47

48 48

49 49 Time Series Models §Exponential l UCBUD(t) = UCBUD(68-69)*e b*t e u(t) l UCBUD(t) = UCBUD(68-69)*e b*t + u(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

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

51 51 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 + u(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 + u(t) ] l and the logarithm is the inverse function of the exponential: l ln[UCBUD(t)] = ln[UCBUD(68-69)] + b*t + u(t) l so ln[UCBUD(68-69)] is the intercept “a”

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

53 53

54 54 UC Budget Forecasts for 2006-07 * 1.068x$2,806,207,000; exponential trendline forecast ~$4.5 B Actual:$2,806,207,000 in Governor’s Budget Summary for 05-06

55 55

56 56

57 57 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)

58 58 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

59 59

60 60 Linear Approximation to Backward Sigmoid

61 61 Ordinary Least Squares

62 62 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)

63 63 §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

64 64 Minimize the Sum of Squared Errors

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

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

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

68 68 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

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

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

71 71

72 72 O-Ring Failure Versus launch temperature

73 73


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

Similar presentations


Ads by Google