Stat 151 Fall 2015
Homework 1 Solutions
September 17, 2015
1. (a)
0 = y 1 x
P
Cov(x, y)
(xi x
)(yi y)
P
=
(xi x
)2
Var(x)
1 =
(b)
P
0 = x
1 y
1 =
(xi x
)(yi y)
Cov(x, y)
P
=
(yi y)2
Var(y)
(c) From the above expressions we see that
(Cov(x, y)2
1 1 =
1
V
Stat 151a Linear Models
Homework 2 Solutions
October 5, 2015
1. Defining a = (a1 , . . . , an ), we have from the question E(aT y) = 1 . Since E(y) = X, we have
aT X = 1
or another way of writing the same thing,
(X T a)T = 1
Defining a new vector c as X T
Stat 151a Linear Models
Homework 3 Solutions
October 14, 2015
1. For an orthonormal set u1 , . . . , un we will freely use the observation (which you should be familiar with
by now) that
(
1 if i = j
T
(ui , uj ) = ui uj =
0 if i 6= j
n
(a) Since u1 , . .
Homework One
Statistics 151a (Linear Models)
Due on 16 September, 2015
06 September, 2015
1. Consider simple linear regression where there is one response variable y and an
explanatory variable x and there are n subjects with values y1 , . . . , yn and x1
Homework Five
Statistics 151a (Linear Models)
Due on 18 November 2015
06 November, 2015
1. In the Bodyfat dataset, consider the linear model
BODYFAT = 0 + 1 AGE + 2 WEIGHT + 3 HEIGHT + 4 THIGH + e
In R, plot the following graphs (9 points = one for each g
Homework Two
Statistics 151a (Linear Models)
Due on 30 September 2015
21 September, 2015
1. Consider the linear model Y = X + e with = (0 , 1 , . . . , p )T . Suppose I can
find real numbers a1 , . . . , an such that
E (a1 Y1 + . . . an Yn ) = 1 .
Show th
STAT 151A Linear Modeling
Homework 1 Solution
March 5, 2016
Problem 1
and SY = SX .
Suppose that the means and standard deviations of Y and X are the same: Y = X
(a) Show that under these circumstances,
BY |X = BX|Y = rXY
where BY |X is the least-squares
STAT 151A - Linear Models - Lecture Six
Fall 2015, UC Berkeley
Aditya Guntuboyina
15 September, 2015
1 Fitting linear regression to regression data
We have a response vector Y which is n 1 and contains all the values of the response
variable. We also have
Fall 2013 Statistics 151 (Linear Models) : Lecture Six
Aditya Guntuboyina
17 September 2013
We again consider Y = X + e with Ee = 0 and Cov(e) = 2 In . is estimated by solving the normal
equations X T X = X T Y .
1
The Regression Plane
If we get a new sub
Midterm Two - Statistics 151a, Spring 2015
Due on April 23, 2015
14 April, 2015
1
Resources
You must not consult any person or resource (online or otherwise) for your analysis. If you have any
clarification questions about the data etc., you may contact P
Midterm One
Statistics 151, Fall 2013
08 October, 2013
1. Last year, 80 students took this particular course at Berkeley of whom 20 were freshmen, 20 were
sophomores, 20 juniors and 20 seniors. In R, I have saved the scores for the 20 freshmen in the
vect
Fall 2013 Statistics 151 (Linear Models) : Lecture Three
Derek Bean
05 September 2013
1
Linear Algebra Review, contd
Result: for matrix A, rank(A) + dim(K(A) = no. of columns in A.
Denition: Matrix A is full rank if rank(A) = no. of columns in A (i.e. d
Fall 2013 Statistics 151 (Linear Models) : Lecture Five
Aditya Guntuboyina
12 September 2013
1
Least Squares Estimate of in the linear model
The linear model is
with Ee = 0 and Cov(e) = 2 In
Y = X + e
where Y is n 1 vector containing all the values of the
Fall 2013 Statistics 151 (Linear Models) : Lecture Four
Aditya Guntuboyina
10 September 2013
1
Recap
1.1
The Regression Problem
There is a response variable y and p explanatory variables x1 , . . . , xp . The goal is understand the relationship between y
Statistics 151a - Linear Modelling: Theory and
Applications
Adityanand Guntuboyina
Department of Statistics
University of California, Berkeley
29 August 2013
1 / 25
The Regression Problem
This class deals with the regression problem where the goal is to
u
Fall 2013 Statistics 151 (Linear Models) : Lecture Eighteen
Aditya Guntuboyina
31 October 2013
1
Criteria Based Variable Selection
If there are p explanatory variables, then there are 2p possible linear models. In criteria-based variable
selection, we t a
Fall 2013 Statistics 151 (Linear Models) : Lecture Thirteen
Aditya Guntuboyina
15 October 2013
1
Regression Diagnostics
For regression diagnostics, we need to know about the following quantities:
1. Leverage
2. Standardized or Studentized Residuals
3. Pre
Fall 2013 Statistics 151 (Linear Models) : Lecture Seventeen
Aditya Guntuboyina
29 October 2013
1
Variable Selection
Consider a regression problem with a response variable y and p explanatory variables x1 , . . . , xp . Should
we just go ahead and t a lin
Fall 2013 Statistics 151 (Linear Models) : Lecture Fifteen
Derek Bean
22 October 2013
1
Recap
Let (x1 , y1 ), . . . , (xn , yn ) be n predictor-response pairs; let X be the n (p + 1) design matrix with ith
row (1, xi )T (so an intercept is included) and l
Fall 2013 Statistics 151 (Linear Models) : Lecture Sixteen
Derek Bean
24 October 2013
We went over some diagnostic tools, mostly graphical, for checking the reasonableness of certain key
assumptions of the linear model:
Normality are the errors normally
Fall 2013 Statistics 151 (Linear Models) : Lecture Twelve
Aditya Guntuboyina
10 October 2013
1
Regression Diagnostics
We now talk about regression diagnostics. I follow the treatment in Christensens book (Plane Answers
to Complex Questions), Chapter 13 ve
Fall 2013 Statistics 151 (Linear Models) : Lecture Seven
Aditya Guntuboyina
19 September 2013
1
Last Class
We looked at
1. Fitted Values: Y = X = HY where H = X(X T X)1 X T Y . Y is the projection of Y onto the
column space of X.
2. Residuals: e = Y Y = (
Fall 2013 Statistics 151 (Linear Models) : Lecture Eleven
Aditya Guntuboyina
03 October 2013
1
One Way Analysis of Variance
Consider the model
yij = i + eij
for i = 1, . . . , t and j = 1, . . . , ni
where eij are i.i.d normal random variables with mean z
Spring 2016 Statistics 151 Midterm Review Notes
Adapted from the notes of Aditya Guntuboyina with input from Omid Shams
March 16, 2016
1
Estimation in the Linear Model
The quantities = (0 , 1 , . . . , p ) and 2 > 0 are parameters in the linear model. The
Practice Problems
Stat 151A, Spring 2014
1. For each statement below, indicate whether it is TRUE or FALSE and give your
reasoning
(a) The OLS estimator of in a linear regression model is unbiased even if
the errors in the model are dependent.
(b) The sum
STAT 151A - Linear Models - Lecture
Fourteen
Fall 2016, UC Berkeley
Aditya Guntuboyina
13 October, 2016
1 Regression Diagnostics
The estimates for and their confidence intervals etc in the linear model depend on the
assumptions underlying the linear model
STAT 151A - Linear Models - Lecture Eleven
Fall 2016, UC Berkeley
Aditya Guntuboyina
29 September, 2016
1 Confidence Intervals for
j
Because N ( , 2 (X T X) 1 ), we have j N ( j , 2 vj ) where vj is the corresponding
diagonal entry of (X T X) 1 . A 100(1
Fall 2016 Statistics 151a (Linear Models) : Lecture Twenty Six
Aditya Guntuboyina
29 November 2016
1
Regression and Classification Trees
We have so far looked at generalized linear models for regression. Simple non-linear models are also quite
often used.
STAT 151A - Linear Models - Lecture Twelve
Fall 2016, UC Berkeley
Aditya Guntuboyina
04 October, 2016
1 Permutation Tests
We have studied hypothesis testing in the linear model via the F -test so far. Suppose we
want to test a linear hypothesis about = (0
STAT 151A - Linear Models - Lecture Twenty
Fall 2015, UC Berkeley
Aditya Guntuboyina
03 November, 2016
1 Criteria Based Variable Selection
If there are p explanatory variables, then there are 2p possible linear models. In criteriabased variable selection,