You are on page 1of 2

Math-240: Assignment 5

Exercise 1: Matrix algebra


" #
3 −1
1. Let A = .
−2 2

(a) Calculate manually the determinant of A, |A|.


(b) Find manually the inverse of A, A−1 .

2. Check whether the set of vectors x1 , x2 , x3 , x4 in


 
1 1 0 0
 0 1 3 1 
X = [x1 , x2 , x3 , x4 ] = 
 
−1 0 1 −1

 
0 2 −2 2

is linearly dependent or linearly independent by solving the system of linear equations

c1 x1 + c2 x2 + c3 x3 + c4 x4 = 0

(a) Write the system of equations in matrix form, Xc = G.


(b) Find X −1 in R.
(c) Solve for c manually and draw your conclusion.

Exercise 2: Urea formaldehyde foam insulation

Data were collected to check whether the presence of urea formaldehyde foam insulation (UFFI) has an
effect on the ambient formaldehyde concentration (CH2 O) inside the house. Twelve homes with and 12
homes without UFFI were studied, and the average weekly CH2 O concentration (in parts per billion) was
measured. It was thought that the CH2 O concentration was also influenced by the amount of air that can
move through the house via windows, cracks, chimneys, etc. A measure of “air tightness”, on a scale of
0 to 10, was determined for each home. CH2 O concentration is the response variable (Y ) that we try to
explain through the two explanatory variables: air tightness of the home (X1 ) and the absence/presence
of UFFI (X2 ). The data are provided in the file UFFI.txt

(1) Give the X matrix needed to fit the regression model


 
β0
Y = Xβ
β +ε with β =  β1 
 
β2

(2) Compute X 0 X and X 0 Y manually.

(3) Find (X 0 X)−1 in R.

(4) Compute manually β̂ = (X 0 X)−1 X 0 Y .

1
(5) Compute manually Y0 Y and Y0 X β̂
β̂.

(6) Calculate SSE, SSR, SST manually based on your results from part (5).

(7) Provide the estimator of σ 2 .

(8) Compute R2 .

(9) Compute the global F -test statisitc.

(10) Find the standard errors for β̂1 and β̂2 .

β̂, s2e , SE(β̂1 ), SE(β̂2 ),


(11) Fit the regression model in R and show that you get the same answers for β̂
R2 and the F -test statistic.

(12) Obtain the regression ANOVA table and show that you obtain the same SSE and SSR.

You might also like