Problem 1. Consider a population model
where y is a dependent variable, x is an independent variable, and are constant numbers. In addition, u is a normally distributed error term with conditional mean zero and a fixed conditional variance given any value of x. The following table shows five randomly sampled observations of x and y.
Table 1. Data on x and y
Index |
x |
y |
1 |
1 |
5 |
2 |
3 |
4 |
3 |
5 |
4 |
4 |
7 |
3 |
5 |
10 |
3 |
(a) Estimate the y-intercept and the slope coefficient using ordinary least squares.
(b) Compute the R2 of the regression.
(c) Compute the standard error of the estimated slope coefficient .
(d) Is the estimated slope coefficient statistically different from zero under 5%significance level? What about under 1% significance level?
[Hint: The critical value for t-distribution with 3 degrees of freedom under 5% significance level is 3.182. The same under 1% significance level is 5.841.]
Problem 2. Consider a population model,
where y is a dependent variable, x is an independent variable, and are constant numbers. In particular, represents the partial effect of x on y, i.e. the effect of a unit increase in x on y, holding everything else constant. In addition, v is an error term that is correlated with x, such that
where and u is an error term with a conditional mean zero. Suppose that we have n observations of a random sample of observations of x and y, and suppose that not all observations of x are of the same value. Prove that the OLS estimator of is biased and that the size of the bias is.
Problem 3. (Computer Exercise) The file midterm_data.csv contains 807 US individuals' data on their smoking. Specifically, the variable cigs represents one's average number of cigarettes smoked per day. The variable restriction is a dummy that takes value 1 if one's state puts a restriction on smoking in restaurants. The variable cigprice is the average cigarette price in cents per pack in the individual's state. The variable education is one's number of years of education. The variable income is one's annual income in dollars. The variable white is a dummy that takes 1 if the individual's reported race is white and 0 otherwise. The variable age is the person's age in years.
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme