Questions:

1.  Consider a linear model yi=βxi+εi where εi~iidN(0,σ2), i=1, 2, …, n.

1. Let zi=yixi, show that z=1nzi is unbiased estimator of β

2. In LSE and MLE, Which estimator is more efficient? Why? Explain using minimum 3 full sentences.

2. Use R studio:

(a)  Generate the Data: Generate a sequence of xi (i=1,……,100) in the interval from 0 to 1.

(b)  Assume β0 = 2, β1 = 1, and εi~iidN(0, 1) where i=1,2, …,100. Develop a sequence of yi such that yi=β0+β1xi+εi. Repeat parts (a)- (b) 200 times.

(c)  Compute the bias and MSE (mean square error) for your results in (b.). Discuss your results.

3. Use SAS program:

1). There are a number of significant days in history:

The crash of the stock market in 1929: Oct. 29, 1929 (http://www.history.com/topics/1929-stock-market-crash

(Links to an external site.)

)

The D-Day invasion in 1944: June 6, 1944 (http://www.history.com/this-day-in-history/d-day

(Links to an external site.)

)

The last Bengals playoff win: Jan. 6, 1991 (http://www.pro-football-reference.com/teams/cin/playoffs.htm

(Links to an external site.)

)

Read each of these dates into SAS and calculate the number of days that have elapsed from these dates until Sunday, Sept. 11, 2016. Your response will be a table with 3 rows and 2 columns. The first column is the date of interest and the second column is the number of days that have elapsed.

2). Many systems will register times logging in and out of systems. Suppose you are doing work for the company health and wellness program, and they extracted a set of swipe-in, swipe-out data for employees using the workout facilities for your use.

1  Read the data contained in the file hw2-swipes.csv into SAS

2  Calculate the length of the workout of each participant in minutes and assign this the variable LengthMIN.

3  Assign a label to this new variable.

4  Workouts that are less than 5 minutes may reflect a potential problem (e.g. swipe same card too quickly). Define a new variable IndicatorSuspect = 1 if LengthMIN < 5 min or =0 otherwise.

5  Define your own format that assigns the value “Suspect” if IndicatorSuspect = 1 and “OK” otherwise.

6  Print out a table with observations 20 to 40 displayed from the data set with these new variables and associated formats.

Generate a PROC CONTENTS summary of this data set.