2 Basic Regression
2 Basic Regression
• For simplicity, say k=1. This is the situation where y depends on only one x
variable.
• Suppose that we have the following data on the excess returns on a fund
manager’s portfolio (“fund XXX”) together with the excess returns on a
market index:
Year, t Excess return Excess return on market index
= rXXX,t – rft = rmt - rft
1 17.8 13.7
2 39.0 23.2
3 12.8 6.9
4 24.2 16.8
5 17.2 12.3
• We have some intuition that the beta on this fund is positive, and we
therefore want to find whether there appears to be a relationship between x
and y given the data that we have. The first stage would be to form a scatter
plot of the two variables.
Graph (Scatter Diagram)
45
40
Excess return on fund XXX
35
30
25
20
15
10
5
0
0 5 10 15 20 25
Excess return on market portfolio
Finding a Line of Best Fit
x
Ordinary Least Squares
• The most common method used to fit a line to the data is known as
OLS (ordinary least squares).
• What we actually do is take each distance and square it (i.e. take the
area of each of the squares in the diagram) and minimise the total sum
of the squares (hence least squares).
yi
û i
ŷ i
xi x
How OLS Works
5
2
uˆ12 uˆ 22 uˆ32 uˆ 42 uˆ52 uˆ
t 1
t
ût
ŷt
2 2
yt yˆ t ˆ
u
t
Deriving the OLS Estimator (cont’d)
ˆ xt yt Tx y
2 2
andˆ y ˆx
xt Tx
• The PRF is yt xt ut
• Linear in the parameters means that the parameters are not multiplied
together, divided, squared or cubed etc.
Yt e X t e ut ln Yt ln X t ut
• Then let yt=ln Yt and xt=ln Xt
yt xt ut
Linear and Non-linear Models
x y Tx y
ˆ t 2 t 2
andˆ y ˆx
xt Tx
SE (ˆ ) s
xt2 s
xt ,
T ( xt x ) 2 T xt2 T 2 x 2
1 1
SE ( ˆ ) s 2
s
(
tx x ) xt2 Tx 2
Estimating the Variance of the Disturbance Term
2
ˆ
u
t
s
T 2
2
uˆ t
Example: How to Calculate the Parameters and
Standard Errors
• Assume we have the following data calculated from a regression of y on a
single variable x and a constant over 22 observations.
• Data:
xt yt 830102, T 22, x 416.5, y 86.65,
2
t 3919654, RSS 130.6
x
uˆ t2 130.6
• SE(regression), s 2.55
T 2 20
3919654
SE ( ) 2.55 * 3.35
22 3919654 22 416.5
2
1
SE ( ) 2.55 * 0.0079
3919654 22 416.5 2
• We now write the results as
yˆ t 59.12 0.35 xt
(3.35) (0.0079)
An Introduction to Statistical Inference
yˆ t 20.3 0.5091xt
(14.38) (0.2561)
Hypothesis Testing: Some Concepts
• We can use the information in the sample to make inferences about the
population.
• We will always have two hypotheses that go together, the null hypothesis
(denoted H0) and the alternative hypothesis (denoted H1).
• The null hypothesis is the statement or the statistical hypothesis that is actually
being tested. The alternative hypothesis represents the remaining outcomes of
interest.
• For example, suppose given the regression results above, we are interested in
the hypothesis that the true value of is in fact 0.5. We would use the notation
H0 : = 0.5
H1 : 0.5
This would be known as a two sided test.
One-Sided Hypothesis Tests
• There are two ways to conduct a hypothesis test: via the test of
significance approach or via the confidence interval approach.
The Probability Distribution of the
Least Squares Estimators
The Probability Distribution of the
Least Squares Estimators (cont’d)
ˆ ˆ
~ N 0,1 ~ N 0,1
var var
ˆ ˆ
~ tT 2 ~ tT 2
SE (ˆ ) ˆ
SE ( )
Testing Hypotheses:
The Test of Significance Approach
yt xt ut
The Test of Significance Approach (cont’d)
Conventional to use a 5% size of test, but 10% and 1% are also commonly
used.
Determining the Rejection Region for a Test of Significance
f(x)
95% non-rejection
region 5% rejection region
The Rejection Region for a 1-Sided Test (Lower Tail)
f(x)
7. Finally perform the test. If the test statistic lies in the rejection
region then reject the null hypothesis (H0), else do not reject H0.
A Note on the t and the Normal Distribution
• You should all be familiar with the normal distribution and its
characteristic “bell” shape.
• We can scale a normal variate to have zero mean and unit variance by
subtracting its mean and dividing by its standard deviation.
normal distribution
t-distribution
The Confidence Interval Approach
to Hypothesis Testing
yˆ t 20.3 0.5091xt
, T=22
(14.38) (0.2561)
• Using both the test of significance and confidence interval approaches,
test the hypothesis that =1 against a two-sided alternative.
• The first step is to obtain the critical value. We want tcrit = t20;5%
Determining the Rejection Region
f(x)
-2.086 +2.086
Testing other Hypotheses
• Note that we can test these with the confidence interval approach.
For interest (!), test
H0 : = 0
vs. H1 : 0
H0 : = 2
vs. H1 : 2
Performing the Test
ˆ t crit SE ( ˆ )
0.5091 2.086 0.2561
( 0.0251,1.0433)
Changing the Size of the Test
Changing the Size of the Test:
The New Rejection Regions
f(x)
-1.725 +1.725
Changing the Size of the Test:
The Conclusion
• t20;10% = 1.725. So now, as the test statistic lies in the rejection region,
we would reject H0.
• If we reject the null hypothesis at the 5% level, we say that the result
of the test is statistically significant.
• The probability of a type I error is just , the significance level or size of test we
chose.
• What happens if we reduce the size of the test (e.g. from a 5% test to a 1% test)?
We reduce the chances of making a type I error ... but we also reduce the
probability that we will reject the null hypothesis at all, so we increase the
probability of a type II error:
less likely
to falsely reject
Reduce size more strict reject null
of test criterion for hypothesis more likely to
rejection less often incorrectly not
reject
• So there is always a trade off between type I and type II errors when choosing a
significance level. The only way we can reduce the chances of both is to increase
the sample size.
A Special Type of Hypothesis Test: The t-ratio
The t-ratio: An Example
• Suppose that we have the following parameter estimates, standard errors and
t-ratios for an intercept and slope respectively.
Coefficient 1.10 -4.40
SE 1.35 0.96
t-ratio 0.81 -4.63
• If we reject H0, we say that the result is significant. If the coefficient is not
“significant” (e.g. the intercept coefficient in the last regression above), then
it means that the variable is not helping to explain variations in y. Variables
that are not significant are usually removed from the regression model.
• In practice there are good statistical reasons for always having a constant
even if it is not significant. Look at what happens if no intercept is included:
y
t
x
t
The Exact Significance Level or p-value
• If the test statistic is large in absolute value, the p-value will be small, and vice
versa. The p-value gives the plausibility of the null hypothesis.