# Which parts of the t-statistic depend on the other variables?

When testing whether a variable is significant in a linear model, we perform the T test for the hypothese $$H_0: \beta_j = 0$$ vs $$H_1: \beta_j \neq 0$$:

$$T = \frac{\beta_j}{\sqrt{\sigma^2[(X^TX)^{-1}]_{jj}}}$$

It's my understanding that when we interpret whether a variable is significant, based on the outcome of this test, it is in relation to the other variables being included in this model. Which part of this statistic takes the other variables into account? And is this test equivalent to performing an F-test between the model with $$\beta_j$$ and the model without it?

Indeed, the coefficients relate to the other variables being included in this model. Maybe being more precise with notation already clears up the confusion: it is better to write the t-statistics as

$$T = \frac{\hat\beta_j}{\sqrt{\hat\sigma^2[(X^TX)^{-1}]_{jj}}},$$

with $$\hat\beta_j$$ an estimate of the true coefficient $$\beta_j$$ about which we test some hypothesis. Now, if we include other variables into our regression model, the estimates will change. You can also observe it from the present formula via $$X'X$$ - with other specifications of the regression, other variables will be contained in $$X$$ and hence the standard error will change, too.