560 likes | 690 Views
Econ 240A. Power 7. Last Week. Normal Distribution Lab Three: Sampling Distributions Interval Estimation and HypothesisTesting. Outline. Distribution of the sample variance The California Budget: Exploratory Data Analysis Trend Models Linear Regression Models Ordinary Least Squares.
E N D
Econ 240A Power 7
Last Week • Normal Distribution • Lab Three: Sampling Distributions • Interval Estimation and HypothesisTesting
Outline • Distribution of the sample variance • The California Budget: Exploratory Data Analysis • Trend Models • Linear Regression Models • Ordinary Least Squares
The Sample Variance, s2 Is distributed with n-1 degrees of freedom (text, 12.3 “inference about a population variance) (text, pp. 258-262, Chi-Squared distribution)
Text Chi-Squared Distribution
Text Chi-Squared Table
Example: Lab Three • 50 replications of a sample of size 50 generated by a Uniform random number generator, range zero to one. • expected value of the mean: 0.5 • expected value of the variance: 1/12
Histogram of 50 Sample Means, Uniform, U(0.5, 1/12) Average of the sample means: 0.4963
Histogram of 50 sample variances, Uniform, U(0.5, 0.0833) Average sample variance: 0.08352
Confidence Interval for the first sample variance of 0.07667 • A 95 % confidence interval Where taking the reciprocal reverses the signs of the inequality
The UC Budget • The part of the UC Budget funded by the state from the general fund
How to Forecast the UC Budget? • Linear Trendline?
Linear Regression Trend Models • A good fit over the years of the data sample may not give a good forecast
How to Forecast the UC Budget? • Linear trendline? • Exponential trendline ?
Time Series Models • Linear • UCBUD(t) = a + b*t + e(t) • where the estimate of a is the intercept: $-10.56 million in 68-69 • where the estimate of b is the slope: $84 million/yr • 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
Error in 01-02 slope intercept
Time Series Models • Exponential • UCBUD(t) = UCBUD(68-69)*eb*tee(t) • UCBUD(t) = UCBUD(68-69)*eb*t + e(t) • where the estimate of UCBUD(68-69) is the estimated budget for 1968-69 • where the estimate of b is the exponential rate of growth
Estimated UCBUD in 68-69 Exponential rate of growth Forecast growth rate: 6.8%/yr 1 year forecast from 2003-04 1.068*3038.666 = 3245.295 M$
Linear Regression Time Series Models • Linear: UCBUD(t) = a + b*t + e(t) • How do we get a linear form for the exponential model?
Time Series Models • Linear transformation of the exponential • take natural logarithms of both sides • ln[UCBUD(t)] = ln[UCBUD(68-69)*eb*t + e(t)] • where the logarithm of a product is the sum of logarithms: • ln[UCBUD(t)] = ln[UCBUD(68-69)]+ln[eb*t + e(t)] • and the logarithm is the inverse function of the exponential: • ln[UCBUD(t)] = ln[UCBUD(68-69)] + b*t + e(t) • so ln[UCBUD(68-69)] is the intercept “a”
2003-04 1968-69
Exponential rate of growth ln UCBUD at t=0 exp[5.932] = 376.9 observed = $291.3
Estimated UCBUD in 68-69 Exponential rate of growth Forecast growth rate: 6.8%/yr
Naïve Forecasts • Average • forecast next year to be the same as this year
UC Budget Forecasts for 2004-05 * 1.068x$3,038,666,000; exponential trendline forecast ~$4.3 B
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)
Error in 01-02 slope intercept
Criterion for Fitting a Line • Minimize the sum of the absolute value of the errors? • Minimize the sum of the square of the errors • easier to use • error is the difference between the observed value and the fitted value • example UCBUD(observed) - UCBUD(fitted)
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
How to Find a-hat and b-hat? • Methodology • grid search • differential calculus • likelihood function