You are on page 1of 59

ECON 321 Midterm

Summation Operator
x
i
= x
1
+ x
2
+ + x
n

For any constant c, c = nc
For any constants a and b,

(ax
i
+by
i
) a x
i
+b y
i
i1
n

i1
n

i1
n

Statistics
If x~N(,
2
), then
Expectation:
If c is a constant, then E(c) = c
If {a
1
, a
2
, , a
n
} are constants and {x
1
, x
2
, , x
n
}
are random variables, then
z
x

~ N(0,1)
E(a
1
x
1
+a
2
x
2
+... +a
n
x
n
) a
1
E(x
1
)+a
2
E(x
2
)+... +a
n
E(x
n
)
Statistics (Continued)
Variance and Covariance:
If c is a constant, then Var(c) = 0

Cov(x, y) E[(x
x
)(y
y
)]
E{[x E(x)][y E(y)]}
E(xy) E(x)E(y)
E[(x
x
)y]
E[x(y
y
)]
Statistics (Continued)
If x and y are independent, then Cov(x,y) = 0
because E(xy) = E(x)E(y) when they are
independent
However, zero covariance between x and y
does not necessarily imply that x and y are
independent
Statistics (Continued)
Try the following. If you can prove this, then
you are all set for properties of expectation,
variance, and covariance!


Var(ax +by) a
2
Var(x)+b
2
Var(y)+2abCov(x, y)
Statistics (Continued)
Correlation coefficient:

If x and y are independent, then
x,y
= 0, but zero
correlation itself does not necessarily imply
independence
[ 1,1]
Ordinary Least Squares
Least squares refers to the minimizing the sum
of squared residuals


Trivia: why not

Cannot be minimized because solution can be
either positive or negative
min u
i
2
i1
n

min u
i
i1
n

?
Ordinary Least Squares (Continued)
Estimators:
First order conditions or method of moments
Hint: the point is always on the OLS
regression line (SRF line)

(x, y)
y
0
+
1
x

0
y
1
x
Statistical Properties of OLS
An estimator is unbiased if its expected value
(or mean of its sampling distribution) equals
the population value
Statistical Properties of OLS
(Continued)
Gauss-Markov assumptions:



iid independently (i.e., each random variable is
mutually independent of every other random variable)
and identically distributed (i.e., each random variable
has the same probability distribution as every other
random variable)
u
i
~ iid(0,
u
2
)
E(u | x) E(u)
0
Statistical Properties of OLS
(Continued)
E(u|x) = E(u) = 0 is also referred to as the zero
conditional mean assumption; the expectation
of u is zero given any values of x
Cov(u
i
, u
j
) = 0 for all i != j; also referred to as
no serial correlation (if you choose to go on to
time series, especially financial econometrics)
for all i = 1, 2, , n
Also referred to as the constant
variance/homoskedasticity assumption
Var(u
i
)
u
2
Unbiasedness of
1

1

(x
i
x)y
i
i1
n

(x
i
x)
2
i1
n

E(

1
) E
(x
i
x)y
i
i1
n

(x
i
x)
2
i1
n

E
(x
i
x)(
0
+
i1
n

1
x
i
+u
i
)
(x
i
x)
2
i1
n

Unbiasedness of
1
(Continued)
E

0
(x
i
x) +
i1
n

1
x
i
(x
i
x) +
i1
n

u
i
(x
i
x)
i1
n

(x
i
x)
2
i1
n

E
1
+
u
i
(x
i
x)
i1
n

(x
i
x)
2
i1
n

E(
1
) + E
u
i
(x
i
x)
i1
n

(x
i
x)
2
i1
n

Unbiasedness of
1
(Continued)

1
+
E[u
i
(x
i
x)
i1
n

]
(x
i
x)
2
i1
n


1
The numerator is essentially
Cov(x,u) (E(u) = 0), which is
assumed to be zero per the
zero conditional mean
assumption (E(u|x) = E(u) =
0)
Unbiasedness of
0

0
y
1
x

0
+
1
x +u
1
x

0
+(
1

1
)x +u
E(
0
) E[
0
+(
1

1
)x +u]
E(
0
) + E[(
1

1
)x]+ E(u)

0
+ E[(
1

1
)x]

0
If
1
is
unbiased, then
the second
term is equal to
zero
Gauss-Markov Theorem
Under the Gauss-Markov assumptions, the OLS
estimator(s) is/are the BLUE(s)
Best
Linear*
Unbiased*
Estimator

The theorem only applies to comparisons
between unbiased estimators
Measures of Goodness of Fit
Total sum of squares (SST/TSS):
Total sample variation (spread) in the
dependent variable about its sample average


Explained sum of squares (SSE/ESS):
Total sample variation of the fitted values in a
(multiple) regression model

(y
i
y)
2
i1
n

y
i
)
(

y
i
y)
2
i1
n

Measures of Goodness of Fit


(Continued)
Sum of squared residuals/residual sum of
squares (SSR):
The sum of the squared OLS residuals across all
observations; variation of residuals in the sample


In my own words, goal of least squares
minimize unobserved SSR to maximize the
explanatory power of the independent variable(s)

u
i
2
i1
n

Measures of Goodness of Fit


(Continued)
SST = SSE + SSR
Coefficient of determination (R-squared):
The proportion of the total sample variation in the
dependent variable that is explained by the
independent variable(s)

R
2

SSE
SST
1
SSR
SST
Measures of Goodness of Fit
(Continued)
100*R
2
is the percentage of the sample variation
in the dependent variable that is explained by the
independent variable(s)
Note that R-squared only measures the linear
relationship between dependent and
independent variables
R
2
can be easily inflated by increasing the size of
the sample (and the number of independent
variables [other issues will also arise, as you will
see later in the course (?)])
Units of Measurement
Change in the unit of measurement of the
independent variable:

Now, lets change x for , where the latter is x/10,
then
Previously, for every increase in x, the fitted value
increases by 1.5
Now, for every increase in , the fitted value increases
by 15, but each independent variable has been
changed to be 1/10 of their original value, so the
relationship remains the same

y
i
2+1.5x
i
x
i

y
i
2+15x
i
x
i
Units of Measurement (Continued)
This can be proved very simply (your professor
presented a more formal proof, but this is for
intuition):




The converse is also true (i.e., change x to ,
valued at 10x divide by 10)

y
i
2+15x
i
2 +10(1.5)(
x
i
10
)
2 +1.5x
i
x
i

1
Units of Measurement (Continued)
Change in the unit of measurement of the
dependent variable:

Now, lets change to , where the latter is 1/10
the value, then

Do we still have the same relationship?
Of course!
The converse applies also in this case

y
i
2+1.5x
i

y
i
y
i
y
i
0.2+0.15x
i
Units of Measurement (Continued)
Change in unit of measurement in both
variables:

Now, we will combine the two changes ( and )

y
i
2+1.5x
i
x
i
y
i

y
i
10

2
10
+10
1
10

(1.5)

x
i
10

y
i
0.2+10
1
10

(1.5)x
i
y
i
0.2+1.5x
i
Statistical Inference
Terms:
Null hypothesis one takes this hypothesis as
true and requires the data to provide substantial
evidence that suggests otherwise
H
0

Alternative hypothesis hypothesis against
which the null hypothesis is tested
H
1
/H
a


Statistical Inference (Continued)
Never accept the null hypothesis only do
not reject
Type I error rejection of H
0
when it is true
Type II error failure to reject H
0
when it is
false
Significance level probability of type I error in
hypothesis testing
alpha
Statistical Inference (Continued)
One-sided alternative <-> one-sided test
H
0
: <
0,
H
1
: >
0
H
0
: >
0,
H
1
: <
0

Two-sided alternative <-> two-sided test
H
0
: =
0,
H
1
: !=
0
Statistical Inference (Continued)
t-statistic for
0
and
1
:




Why n 2?
Degree of freedom (df)
# of observations # of estimated parameters (i.e.,
estimators)
Decreases as you add more independent variables (later in the
course) (i.e., intercept + 2 independent variables n 3)
t

0

0
se(

0
)
~ t
n 2
t

1

1
se(

1
)
~ t
n 2
Statistical Inference (Continued)
Side note:

Var(

0
)

u
2
n
1
x
i
2
i1
n

(x
i
x)
2
i1
n

Statistical Inference (Continued)


Hypothesis testing:
Lets work with an example (random data
generated in R)

Statistical Inference (Continued)
Suppose that I want to test if
1
is equal to -
0.37
Two-sided test
H
0
:
1
= -0.37, H
1
:
1
!= -0.37


t
0.3671 ( 0.37)
0.1941
~ t
98
0.014940752
Statistical Inference (Continued)
Critical value the value against which a test
statistic is compared to determined whether
to reject H
0
or not
One-sided test t > c or t < c, where c is the
critical value
Two-sided test |t|> c
Statistical Inference (Continued)
How to find the critical value?
Determine your significance level (from earlier)
One-sided test
Two-sided test /2
Because you want 100*(1 )% confidence that you are not
wrongly rejecting H
0
middle region
Since this is a t-test, we will go to the t-table

Statistical Inference (Continued)
Our df is 98 (100
observations 2
estimators), so 100
is the closest
approximation on
this table
Statistical Inference (Continued)
Our df is 98 (100
observations 2
estimators), so 100
is the closest
approximation on
this table
Now, assume that
I want a
significance level
of 5% ( = 0.05).
However, this is a
two-sided test, so
I need /2 =
0.025 for my tail
probability.
Statistical Inference (Continued)
Our df is 98 (100
observations 2
estimators), so 100
is the closest
approximation on
this table
Now, assume that
I want a
significance level
of 95%, = 0.05.
However, this is a
two-sided test, so
I need /2 =
0.025 for my tail
probability.
Statistical Inference (Continued)
So my critical value is 1.984 per the table
Rejection rule: |t| > c |t| > 1.984
If this is true, you reject H
0

Since my test statistic was 0.014940752, which is
less than 1.984, I do not reject H
0

Conclusion with 95% confidence, I do not reject
the hypothesis that
1
is equal to -0.37
Statistical Inference (Continued)
Caveat:
I do not know what kind of t-table you will use on
the midterm, so pay attention to the headings
Some tables have tail probabilities for both one- and
two-sided tests
Statistical Inference (Continued)
What if you were given
2
(i.e., it is known)?
Use the standard normal table
Back to our example




As you can see, the test statistic is now distributed
N(0,1) standard normal
t
0.3671 ( 0.37)
0.1941
~ N(0,1)
0.014940752
Statistical Inference (Continued)
Same significance level
95% two-sided you are now looking for 0.975 (1
/2) in the standard normal table
The value is 1.96
Standard normal critical values are easy to remember
0.995 2.575
0.99 2.33
0.975 1.96
0.95 1.645
0.9 1.28
Statistical Inference (Continued)
Rejection rule: |t| > c |t| > 1.96
Again, this is not the case, so H
0
is not rejected
Statistical Inference (Continued)
Overview:
Identify the hypothesis test (one-/two-sided)
Determine the significance level (if not specified, is
usually left as = 0.05)
Calculate the test statistic
Determine the distribution of the test statistic (for OLS
estimators, is usually t distribution)
Find the critical value corresponding to the specified
significance level
Determine the rejection rule
Compare test statistic with critical value
Either reject or do not reject H
0

Statistical Inference (Continued)
p-value!
I believe this one confuses some people
Smallest significance level at which H
0
can be
rejected
Or, the largest significance level at which H
0
cannot be
rejected
Statistical Inference (Continued)
What does this mean?
For example, if you are comfortable with a 95%
significance level (i.e., 5% chance that you reject
H
0
when it should have been otherwise), but the
smallest significance level that the particular test
statistic can be rejected at is lower than 5%, it
means the statistic is even more assuring than
what you initially set, so you can go ahead and
reject H
0
knowing that the chance of wronging
doing so is smaller than what you are comfortable
with (it sounds weird, but it is a good thing)
Statistical Inference (Continued)
How to calculate the p-value:
Back to our example:




Need to scour the standard normal table for
0.014940752, or something close to it.



t
0.3671 ( 0.37)
0.1941
~ N(0,1)
0.014940752
Statistical Inference (Continued)



The value is somewhere between 0.5040 and
0.5080 0.5060 is my guess
Statistical Inference (Continued)
Since this is a two-sided test, we need to
calculate


If the rejection rule is t > c, then you need to
calculate P(T > t), or P(T < t)
See previous STAT courses or Wooldridge for a
referesher

P(| T |>| t |) 2P(T >| t |)
2[1 P(T <| t |)]
Statistical Inference (Continued)







Conclusion 0.988 > = 0.05 do not reject
H
0
; it should be the same as the t-test
P(| T |>| t |) 2P(T >| t |)
2[1 P(T <| t |)]
2[1 P(T < 0.014940752)]
2(1 0.5060)
2(0.494)
0.988
Statistical Inference (Continued)
Simple rule:
Reject p-values smaller than
Statistical Inference (Continued)
Confidence interval:
A rule used to construct a random interval so that
a certain percentage of all data sets, determined
by the confidence level, yields an interval that
contains the population value
In other words, if we construct confidence
intervals for a certain parameter out of a certain
number of samples, these intervals will contain its
population value 100*(1 )% of the time
Statistical Inference (Continued)
Back to our example:



Earlier, we found the critical value for /2 = 0.025,
which was 1.984
Note: confidence intervals are always considered to be
two-sided
We have all the information we need to construct the
confidence interval

t
0.3671 ( 0.37)
0.1941
~ t
98
0.014940752
Statistical Inference (Continued)




That above is the 95% confidence interval for

1

CI [

1
c

2
se(

1
),

1
+c

2
se(

1
)]
[ 0.3671 1.984(0.1941), 0.3671+1.984(0.1941)]
[ 0.3671 0.3850944, 0.3671+0.3850944]
[ 0.7521944, 0.0179944]
STATA!
Disclaimer: pure R user, never used STATA
However, I am able to read the outputs and have
constructed questions around them
STATA Output
STATA Output
SSE/ESS SSR/RSS SST/TSS any two can be used to solve for R-squared
STATA Output

0

1
se(

i
), i 0,1
STATA Output
t

i
se(

i
)
, i 0,1
Significance test (H
0
:
i
= 0)
STATA Output
p-value of significance test

You might also like