logo

Regression Coefficient's t-test 📂Statistical Test

Regression Coefficient's t-test

Hypothesis Testing

[y1y2yn]=[1x11xp11x12xp21x1nxpn][β0β1βp]+[ε1ε2εn] \begin{bmatrix} y_{1} \\ y_{2} \\ \vdots \\ y_{n} \end{bmatrix} = \begin{bmatrix} 1 & x_{11} & \cdots & x_{p1} \\ 1 & x_{12} & \cdots & x_{p2} \\ \vdots & \vdots & \ddots & \vdots \\ 1 & x_{1n} & \cdots & x_{pn} \end{bmatrix} \begin{bmatrix} \beta_{0} \\ \beta_{1} \\ \vdots \\ \beta_{p} \end{bmatrix} + \begin{bmatrix} \varepsilon_{1} \\ \varepsilon_{2} \\ \vdots \\ \varepsilon_{n} \end{bmatrix} When independent variables of pp and nn data are given, the linear multiple regression model can be represented using the design matrix as shown above, and let’s denote it simply as Y=Xβ+εY = X \beta + \varepsilon. Assuming that the residuals satisfy linearity, homoscedasticity, independence, and normality in the model diagnostics, the hypothesis testing for each regression coefficient in multiple regression analysis is as follows:

  • H0H_{0}: βj=0\beta_{j} = 0, that is, the jjth independent variable has no correlation with the dependent variable.
  • H1H_{1}: βj0\beta_{j} \ne 0, that is, the regression coefficient for the jjth independent variable is significant.

Derivation 1

  • Normality of Regression Coefficients: β^N1+p(β,σ2(XTX)1) \hat{\beta} \sim N_{1+p} \left( \beta , \sigma^{2} \left( X^{T} X \right)^{-1} \right)
  • Unbiased Estimator of Residual Sum of Squares and Standard Error of Regression Coefficients: Eσ2^=E[1np1i=1n(yiy^i)2]=σ2 E \widehat{\sigma^{2}} = E \left[ {{ 1 } \over { n-p-1 }} \sum_{i=1}^{n} \left( y_{i} - \hat{y}_{i} \right)^{2} \right] = \sigma^{2} s.e.(β^k)=σ^[(XTX)1]kk \text{s.e.} \left( \hat{\beta}_{k} \right) = \hat{\sigma} \sqrt{ \left[ \left( X^{T} X \right)^{-1} \right]_{kk} }

Let’s define tjt_{j} for the estimate of regression coefficient βj^\hat{ \beta_{j} } and standard error se(βj^)\text{se} \left( \hat{ \beta_{j} } \right) as follows: tj:=βj^se(βj^) t_{j} := {{\hat{ \beta_{j} }} \over {\text{se} \left( \hat{ \beta_{j} } \right)}}

The residual sum of squares i=1n(yiy^i)2/σ2\sum_{i=1}^{n} \left( y_{i} - \hat{y}_{i} \right)^{2} / \sigma^{2} uses the sample mean for nn data points, pp independent variables, and 11 constant terms—thus, since only (np1)(n-p-1) independent random variables are used, it follows a chi-squared distribution with degrees of freedom (np1)(n-p-1) under the null hypothesis—assuming the null hypothesis is true, then βj=0\beta_{j} = 0 results in β^jN(0,σ2(XTX)jj1)\hat{\beta}_{j} \sim N \left( 0 , \sigma^{2} \left( X^{T} X \right)^{-1}_{jj} \right), thus obtaining: tj=βj^se(βj^)=βj^0σ^[(XTX)1]kk=βj^0i=1n(yiy^i)2np1[(XTX)1]kk=βj^0[(XTX)1]kki=1n(yiy^i)2np1=βj^0σ[(XTX)1]kki=1n(yiy^i)2σ2/(np1)N(0,1)χ2(np1)/np1 \begin{align*} t_{j} =& {{\hat{ \beta_{j} }} \over {\text{se} \left( \hat{ \beta_{j} } \right)}} \\ =& {{\hat{ \beta_{j}} - 0 } \over { \hat{\sigma} \sqrt{ \left[ \left( X^{T} X \right)^{-1} \right]_{kk} } }} \\ =& {{\hat{ \beta_{j}} - 0 } \over { \sqrt{ {{ \sum_{i=1}^{n} \left( y_{i} - \hat{y}_{i} \right)^{2} } \over { n-p-1 }} \left[ \left( X^{T} X \right)^{-1} \right]_{kk} } }} \\ =& {{ {{ \hat{ \beta_{j}} - 0 } \over { \sqrt{ \left[ \left( X^{T} X \right)^{-1} \right]_{kk} } }} } \over { \sqrt{ {{ \sum_{i=1}^{n} \left( y_{i} - \hat{y}_{i} \right)^{2} } \over { n-p-1 }} } }} \\ =& {{ {{ \hat{ \beta_{j} } - 0 } \over { \sigma \sqrt{ \left[ \left( X^{T} X \right)^{-1} \right]_{kk} } }} } \over { \sqrt{ {{ \sum_{i=1}^{n} \left( y_{i} - \hat{y}_{i} \right)^{2} } \over { \sigma^{2} }} / (n-p-1) } }} \\ \sim & {{ N (0,1) } \over { \sqrt{\chi^{2} (n-p-1) / n-p-1} }} \end{align*}

In conclusion, tjt_{j} follows a t-distribution with degrees of freedom (np1)(n-p-1). Representing it in a formula again gives: tj=βj^se(βj^)t(np1) t_{j} = {{\hat{ \beta_{j} }} \over {\text{se} \left( \hat{ \beta_{j} } \right)}} \sim t(n-p-1) which is used for hypothesis testing. If tjt(np1,α2) \left| t_j \right| \ge t_{(n-p-1 , {{\alpha} \over {2}})} then the null hypothesis is rejected. That tj\left| t_j \right| is of such magnitude means βj^\hat{ \beta_{j} } is too large to believe that the null hypothesis is true.

Explanation

jjth variable and significance level α\alpha can also calculate the confidence interval βj^±t(np1,α2)se(βj^)\hat{ \beta_{j} } \pm t_{(n-p-1 , {{\alpha} \over {2}})} \text{se} ( \hat{ \beta_{j}} ).

While the derivation process is written calmly, it could be quite difficult for undergraduates learning regression analysis to understand it. Following tjt_{j} to a t-distribution is not very challenging, but it requires understanding the distribution of regression coefficients as a corollary, and having a firm grasp on the concepts of model diagnostics.

See Also


  1. Hadi. (2006). Regression Analysis by Example(4th Edition): p0. ↩︎