ENG-256: Linear Models
ENG-256: Linear Models
Checking normality
Normality is a key assumption in order to obtain the right
properties of the estimates and justify the tests of hypotheses based
on t and F distributions.
>
>
>
>
>
>
The most commonly used
ENG-256: Linear Models
ENG-256: Linear Models
Estimation of 2
The distribution of s2 , given 2 , is
In order to obtain an estimate of 2 recall that
SSE = |Y Y |2 =
n
s2
(yi yi )2
i=1
2 2
nk1
nk1
2
since E2
nk1 = n k 1 we obtain the unbiasedness of s .
c
ENG-256: Linear Models
ENG-256: Linear Models
Model Building
Automatic methods of model building like stepwise regression have
to be taken with care. The aim of model building is to obtain a
model that
aects the response in a separate and additive way. Do
ENG-256: Linear Models
ENG-256: Linear Models
Coecient of Correlation
The estimator of the slope of a regression line, 1 , provides a
measure of the linear relationship between two variables. But it
depends on the scale used to measure the observations.
W
ENG-256: Linear Models
ENG-256: Linear Models
Matrix multiplication
Some linear algebra
Let A be an r c matrix and x a c-dimensional vector. Then Ax
corresponds to a linear combination of the columns of A where the
coecients of the combination are the ele
ENG-256: Linear Models
ENG-256: Linear Models
Multiple regression
Example 1
The percent survival of a certain type of animal semen after storage
(y) was measured at various combinations of concentrations of 3
materials used to increase the chance of survi
ENG-256: Linear Models
ENG-256: Linear Models
To consider the previous problem in a hypothesis testing framework
we assume that the group of stayers has a population mean equal
to 1 and the group of leavers has a population mean of 2 . Then
Hypothesis tes
ENG-256: Linear Models
ENG-256: Linear Models
Simple linear regression
0 is the intercept
1 is the slope
3
2
Sales Revenue
3
1
y is the response or dependent variable
Sales Revenue
x is the independent variable
^
y = 1 + x
2
so that E(y) = 0 + 1 x.
1
= 0
ENG-256: Linear Models
ENG-256: Linear Models
Observational data
Example
The data that correspond to the regressors can be obtained by
designing a specic experiment and setting the values of the
covariates for which the response is observed.
A study is co
ENG-256: Linear Models
ENG-256: Linear Models
Prediction
An estimate of the mean response at a particular value of the
regressors x01 , . . . , x0k is given by
Condence intervals
y = 0 + 1 x01 + . . . + k x0k = x0
A 100(1 )% condence interval for E(l)
ENG-256: Linear Models
ENG-256: Linear Models
LSE
Matrix notation
For a set of n observations the linear regression can be written as
yi = 0 + 1 xi1 + . . . + k xik + i i = 1, . . . , n
This can be written as
Y = X +
where
Y =
y1
.
.
.
yn
x11
.
.
.
.
.
.
ENG-256: Linear Models
ENG-256: Linear Models
Examples:
Introduction
Statistics: Collect, organize, classify and summarize DATA in
order to perform analyses and interpretation, produce forecasts and
predictions or make decision and dene policies.
1. Who w
ENG-256: Linear Models
ENG-256: Linear Models
Introduction to R
Mathematical expressions
How to get help
The usual mathematical expressions are available in R
To get online help you can type help(fun) for any function.
Double quotes are necessary in the c
ENG-256: Linear Models
ENG-256: Linear Models
Maximum Likelihood
Notice that the likelihood depends on the data only through and
SSE. These are the sucient statistics for the linear model.
By considering the distribution of the vector Y we obtain the
like
ENG-256: Linear Models
ENG-256: Linear Models
Piecewise linear regression
dening
1
2
strength
3
4
Nonlinear relationships between the response and the explanatory
variables can be sometimes successfully modelled using a linear
model that has dierent slope
ENG-256: Linear Models
ENG-256: Linear Models
F test
Analysis of variance
To compare the between sample variation with the within levels
variation we can compute the estimates
We consider the problem of comparing two levels of a factor in
terms of their m
ENG-256: Linear Models
ENG-256: Linear Models
Estimating the mean
Given a sample y1 , . . . , yn from a normal population we want to
obtain an estimator of the population mean .
Central Limit Theorem
The normal distribution plays a central role in probabi