首页 > 其他分享 >Notes: Principles of Econometrics / Statistical Method in Economics

Notes: Principles of Econometrics / Statistical Method in Economics

时间:2022-12-01 21:12:52浏览次数:44  
标签:right bar Notes Economics Principles frac hat sum left

SME Note 2

This note is the note for statistical method in economics course. Made for quick check of important formulae.

kw: xi, residual

\(\sum_{i=1}^n x_i e_i=0\), the sum of the weighted (by \(x_i\) ) residuals is 0 :

\[\begin{aligned} \sum_{i=1}^n x_i e_i &=\sum_{i=1}^n x_i\left(y_i-b_1-b_2 x_i\right)=\sum_{i=1}^n x_i y_i-n \bar{x} b_1-b_2 \sum_{i=1}^n x_i^2 \\ &=\sum_{i=1}^n x_i y_i-n \bar{x}\left(\bar{y}-b_2 \bar{x}\right)-b_2 \sum_{i=1}^n x_i^2 \\ &=\sum_{i=1}^n x_i y_i-n \bar{x} \bar{y}+b_2 n \bar{x}^2-b_2 \sum_{i=1}^n x_i^2 \\ &=S_{x y}-b_2 S_{x x}=0 \end{aligned} \]

kw: xi, residual

\(x_i\) and \(e_i\) are uncorrelated (in samples):

\[\operatorname{Cov}\left(x_i, e_i\right)=\frac{1}{n-1} \sum_{i=1}^n\left(x_i-\bar{x}\right)\left(e_i-\bar{e}\right)=\frac{1}{n-1}\left(\sum_{i=1}^n x_i e_i-n \bar{x} \bar{e}\right)=0 \]

kw: yhat, residual

\(\sum_{i=1}^n \hat{y}_i e_i=0\), the sum of the weighted (by \(\hat{y}_i\) ) residuals is 0 :

\[\sum_{i=1}^n \hat{y}_i e_i=\sum_{i=1}^n\left(b_1+b_2 x_i\right) e_i=b_1 n \bar{e}+b_2 \sum_{i=1}^n x_i e_i=0 \]

\(\hat{y}_i\) and \(e_i\) are uncorrelated (in samples):

\[\operatorname{Cov}\left(\hat{y}_i, e_i\right)=\frac{1}{n-1} \sum_{i=1}^n\left(\hat{y}_i-\overline{\hat{y}}\right)\left(e_i-\bar{e}\right)=\frac{1}{n-1}\left(\sum_{i=1}^n \hat{y}_i e_i-n \overline{\hat{y}} \bar{e}\right)=0 ; \]

kw: le, linear estimators, variance, covariance

variances and covariances of b1 and b2
are given by

\[\begin{aligned} \operatorname{Var}\left(b_1\right) &=\frac{\sigma^2 \sum_{i=1}^n x_i^2}{n \sum_{i=1}^n\left(x_i-\bar{x}\right)^2} ; \\ \operatorname{Var}\left(b_2\right) &=\frac{\sigma^2}{\sum_{i=1}^n\left(x_i-\bar{x}\right)^2} ; \\ \operatorname{Cov}\left(b_1, b_2\right) &=\frac{-\bar{x} \sigma^2}{\sum_{i=1}^n\left(x_i-\bar{x}\right)^2}, \end{aligned} \]

kw: sst, ssr, sse, r2, coefficient of determination, sample correlation coefficient

\[ SST = SSR + SSE \]

\[R^2=\frac{\mathrm{SSR}}{\mathrm{SST}}=1-\frac{\mathrm{SSE}}{\mathrm{SST}} \]

  • \(R^2=r_{x y}^2\) : The coefficient of determination \(R^2\) is algebraically equal to the square of the sample correlation coefficient \(r_{x y}\) between \(x\) and \(y\). This result is valid in simple linear regression models;
  • \(R^2=r_{y \hat{y}}^2\) : The coefficient of determination \(R^2\) can also be computed as the square of the sample correlation coefficient between \(y\) and \(\hat{y}\). In this case, it measures the "goodness-of-fit" between the sample data and their predicted values. Therefore, \(R^2\) is sometimes called a measure of "goodness-of-fit". This result is valid not only in simple linear regression models but also in multiple linear regression models.

kw: unbiased sample variance

\[\sigma_{\bar{y}}^2=\frac{n}{n-1} \sigma_y^2=\frac{1}{n-1} \sum_{i=1}^n\left(y_i-\bar{y}\right)^2=\frac{S_{y y}}{n-1}, \]

kw: mean squared error, mse

The mean squared error (MSE):

\[\hat{\sigma}^2 \equiv \sigma_{\hat{y}}^2=\frac{1}{n-2} \sum_{i=1}^n\left(y_i-\hat{y}_i\right)^2=\frac{1}{n-2} \sum_{i=1}^n e_i^2=\frac{S_{y y}-2 b_2 S_{x y}+b_2^2 S_{x x}}{n-2} \]

In this case, we have to divide by \(n-2\), because we estimated the unknown population intercept \(\beta_1\) and the population slope \(\beta_2\) by \(b_1\) and \(b_2\), respectively, which "costs us two degrees of freedom";

  • The unbiased sample covariance can be similarly defined as

\[\sigma_{\bar{x} \bar{y}}^2=\frac{1}{n-1} \sum_{i=1}^n\left(x_i-\bar{x}\right)\left(y_i-\bar{y}\right)=\frac{S_{x y}}{n-1}, \]

why is the denominator being \(n-1\) rather than \(n-2\) ?

? because no \(\hat y_i\) contained ?

kw: standard errors, se, b1, b2

\[\begin{aligned} &\operatorname{se}\left(b_1\right)=\sqrt{\widehat{\operatorname{Var}}\left(b_1\right)}=\left[\frac{\hat{\sigma}^2 \sum_{i=1}^n x_i^2}{n \sum_{i=1}^n\left(x_i-\bar{x}\right)^2}\right]^{1 / 2}, \\ &\operatorname{se}\left(b_2\right)=\sqrt{\widehat{\operatorname{Var}}\left(b_2\right)}=\left[\frac{\hat{\sigma}^2}{\sum_{i=1}^n\left(x_i-\bar{x}\right)^2}\right]^{1 / 2}, \end{aligned} \]

kw: Adjusted R Square, radj, r2
Adjusted R Square

\[\bar{R}^2=1-\frac{\left(1-R^2\right)(n-1)}{n-K} \]

kw: p-value

It is a standard practice to report the probability value of the test (i.e., the \(p\)-value) when reporting the outcome of statistical hypothesis tests. If we have the \(p\)-value of a test, \(p\), we can determine the outcome of the test by comparing the \(p\)-value to the chosen level of significance, \(\alpha\), without looking up or calculating the critical values. The \(p\)-value rule suggests to reject the null hypothesis when the \(p\)-value is less than, or equal to, the level of significance, \(\alpha\). That is, reject \(H_0\) if \(p \leq \alpha\) whereas do not reject \(H_0\) if \(p>\alpha\).

kw: forecast error

\[f=y_0-\hat{y}_0=\left(\beta_1+\beta_2 x_0+\epsilon_0\right)-\left(b_1+b_2 x_0\right) \]

kw: Least squares prediction, f, ci for f, variance of forecast error

\[\operatorname{Var}(f)=\operatorname{Var}\left(y_0\right)+\operatorname{Var}\left(\hat{y}_0\right)-2 \operatorname{Cov}\left(y_0, \hat{y}_0\right) \]

Taking into account that \(x_0\) and the unknown parameters \(\beta_1\) and \(\beta_2\) are not random, we have

\[\operatorname{Var}(f)=\operatorname{Var}\left(\epsilon_0\right)+\operatorname{Var}\left(\hat{y}_0\right)=\sigma^2+\operatorname{Var}\left(\hat{y}_0\right) \]

where

\[\begin{aligned} \operatorname{Var}\left(\hat{y}_0\right)=& \operatorname{Var}\left(b_1+b_2 x_0\right)=\operatorname{Var}\left(b_1\right)+x_0^2 \operatorname{Var}\left(b_2\right)+2 x_0 \operatorname{Cov}\left(b_1, b_2\right) \\ =& \frac{\sigma^2 \sum_{i=1}^n x_i^2}{n \sum_{i=1}^n\left(x_i-\bar{x}\right)^2}+x_0^2 \frac{\sigma^2}{\sum_{i=1}^n\left(x_i-\bar{x}\right)^2}+2 x_0 \frac{-\sigma^2 \bar{x}}{\sum_{i=1}^n\left(x_i-\bar{x}\right)^2} \\ =& {\left[\frac{\sigma^2 \sum_{i=1}^n x_i^2}{n \sum_{i=1}^n\left(x_i-\bar{x}\right)^2}-\frac{\sigma^2 n \bar{x}^2}{n \sum_{i=1}^n\left(x_i-\bar{x}\right)^2}\right] } \\ &+\left[x_0^2 \frac{\sigma^2}{\sum_{i=1}^n\left(x_i-\bar{x}\right)^2}+2 x_0 \frac{-\sigma^2 \bar{x}}{\sum_{i=1}^n\left(x_i-\bar{x}\right)^2}+\frac{\sigma^2 n \bar{x}^2}{n \sum_{i=1}^n\left(x_i-\bar{x}\right)^2}\right] \\ =& \sigma^2\left[\frac{\sum_{i=1}^n x_i^2-n \bar{x}^2}{n \sum_{i=1}^n\left(x_i-\bar{x}\right)^2}+\frac{x_0^2-2 x_0 \bar{x}+\bar{x}^2}{\sum_{i=1}^n\left(x_i-\bar{x}\right)^2}\right] \\ =& \sigma^2\left[\frac{\sum_{i=1}^n\left(x_i-\bar{x}\right)^2}{n \sum_{i=1}^n\left(x_i-\bar{x}\right)^2}+\frac{\left(x_0-\bar{x}\right)^2}{\sum_{i=1}^n\left(x_i-\bar{x}\right)^2}\right] \\ =& \sigma^2\left[\frac{1}{n}+\frac{\left(x_0-\bar{x}\right)^2}{\sum_{i=1}^n\left(x_i-\bar{x}\right)^2}\right] . \end{aligned} \]

Therefore, by replacing \(\sigma^2\) by its estimate \(\hat{\sigma}^2\), the estimated variance of the forecast error is given by

\[\widehat{\operatorname{Var}}(f)=\hat{\sigma}^2\left[1+\frac{1}{n}+\frac{\left(x_0-\bar{x}\right)^2}{\sum_{i=1}^n\left(x_i-\bar{x}\right)^2}\right] \]

the square root of which is the standard error of the forecast error

\[\operatorname{se}(f)=\sqrt{\widehat{\operatorname{Var}}(f)} \]

标签:right,bar,Notes,Economics,Principles,frac,hat,sum,left
From: https://www.cnblogs.com/kion/p/16942691.html

相关文章

  • About AnyThings 之 小程序开发常用事例 Notes(一)
    LZ-Says:不走,总会被逼着走。想要有Change的权利,背后就一定要付出很多努力。前言小程序断断续续搞了有一段时间了,发现在某些情况下,第一次消耗30分钟,而后则几分钟即可。......
  • Python3 notes
    Python3基础标识符第一个字符必须是字母表中字母或下划线_。标识符的其他的部分由字母、数字和下划线组成。标识符对大小写敏感。在Python3中,可以用中文作为变......
  • DeathNotes靶场实操
    DeathNote:01靶场实操一搭建环境下载地址:Deathnote:1~VulnHub导入Vmware即可【打开-选择ova-确定】二环境配置kaliip:192.168.32.135deathnoteip:192.168.32.X......
  • PyOCD Notes
    InstallationUbuntu20.04ForUbuntu20.04theversioninaptrepositoryis0.13.1+dfsg-1,whichistoolowtorecognizeJ-Linkprobe$apt-cacheshowpython3-py......
  • IDEA中给源码添加自己注释——private-notes插件安装使用
    一、前言我们在空闲之余喜欢研究一些经典框架的源码,发现没办法把自己的注释添加上。会给出提示:​​​Fileisread-only​​​很烦,但是为了安全考虑也是没有办法的!这是一......
  • Notes for RAC Installation
    NotesforRACInstallation Problem#1: RACnodedoesfailstostartCRSafterturningoff1Infinibandswitch Symptom:AfteroneoftheredundantInfin......
  • Android Notes | 个人集成推送那点事(友盟/Mob(Flutter)/FCM)
    我们都曾羡慕别人,却忘了,我们也曾是别人羡慕的我们。前言最近的任务呐,真是让人蛋碎一地,各种被锤。不过比较nice的是,推送凑齐了,可以整理一篇咯~点滴积累吧。跟着老大~前期调研......
  • 前端 Notes | H5 打开 App 并跳转指定页(Android/iOS)最 low 实现
    还是技术的世界简单,除了0就是1。前言之前接到一个任务,大概细分如下:H5调起App(Android/iOS)并打开对应页面;如果应用未安装,则提示用户进行下载;微信打开该链接分享好友展示......
  • Android Notes|细数「十大布局」那些事儿
    最近的心情,最近的状态,似乎没法说个一二三四五。做Android好几年了,从单纯的Android,到现在大杂烩,这个滋味儿,真的是百感交汇。文章的内容类型从来都是Notes,这次对老本行进......
  • 微信小程序 Notes | 常用开发事例(五)基于云平台导出 Excel
    一、前言最近一直处于微信小程序的开发之中,未曾想过,好好的Android开发变成了“东北乱炖”,这个刺激,酸爽,无与伦比!不过好处在于接触面儿多了,思维发散了,想问题也似乎多了一种......