---
title: "Regression"
book: "Interviews I: Maths, Probability and Speed"
subject: quant
language: en
chapter: 18
exercises: 0
source: https://one-course.com/books/quant/18/en/chapter/18-regression
license: CC-BY-NC-SA-4.0
credit: "One Quant Book, One Course (one-course.com)"
---

# Chapter 18 — Regression

Regression as a quantitative researcher uses it: what a coefficient and its standard error really tell you, and what goes wrong on financial data, where regressors are noisy, observations overlap, volatility moves and the signal is tiny. Most questions ask for a number you can defend, and the later ones turn on an effect you could easily miss in your own work.

**Question 18.1 ★ QR, QT, DS, Risk, Analyst • any • junior.**

You regress $y$ on $x$ and get a slope of 2. What values can the slope of the reverse regression, $x$ on $y$, take? If the reverse slope turns out to be $0.18$, what is the correlation of $x$ and $y$?

**Answer to Question 18.1.**

The reverse slope can be anything above 0 and up to $1/2$. A reverse slope of $0.18$ means a correlation of $0.6$.

With $b_1 = \mathrm{Cov}(x,y)/\mathrm{Var}(x)$ and $b_2 = \mathrm{Cov}(x,y)/\mathrm{Var}(y)$, the product is

$$
b_1 b_2 = \frac{\mathrm{Cov}(x,y)^2}{\mathrm{Var}(x)\mathrm{Var}(y)} = \rho^2 .
$$

So $b_2 = \rho^2/2$, with $\rho^2$ in $(0, 1]$. The two slopes always have the same sign. If $b_2 = 0.18$ then $\rho^2 = 0.36$, and the correlation is $0.6$, positive because the slopes are.

**Classic wrong answer.** “$b_2 = 1/b_1 = 1/2$.” That holds only with $|\rho| = 1$. Each regression minimises vertical errors along its own axis, so the two lines differ, and they coincide only when all the points lie on a line.

**Why it matters.** The choice of which variable to regress on which is not free when you set a hedge ratio. The two give different ratios, and the correct one depends on what you want to minimise.

**Question 18.2 ★ QR, QT, DS, Risk • any • junior.**

You copy every row of a dataset, making it twice as long, and refit the same linear regression. What happens to the coefficients, their standard errors, the $t$-statistics and $R^2$? Why does this matter when your observations overlap in time?

**Answer to Question 18.2.**

The coefficients and $R^2$ do not change. The standard errors shrink by a factor of about $\sqrt2$, and the $t$-statistics rise by about $\sqrt2$.

$X^\top X$ and $X^\top y$ both double, so $\hat\beta = (X^\top X)^{-1}X^\top y$ is unchanged. The residuals repeat, so RSS doubles while the degrees of freedom almost double, and $s^2$ is about the same. Since $(X^\top X)^{-1}$ halves, the variance estimate halves. Exactly, with $n$ rows and $p$ coefficients, the standard errors scale by $\sqrt{(n-p)/(2n-p)}$, which for $n = 250$ and $p = 2$ is $0.706$, next to $1/\sqrt2 = 0.707$.

**Why it matters.** Nothing has been learned, yet the $t$-statistic has grown. Overlapping data do the same thing: 20-day returns sampled daily look like 20 times the data, while holding about one independent observation per 20 days. With a slow signal the $t$-statistic is overstated by about $\sqrt{20} \approx 4.5$. Use non-overlapping samples or standard errors that allow for the overlap.

**Question 18.3 ★ QR, QT, Trader, Risk • any • junior.**

A stock has a volatility of 30% a year and an index has 15%, with correlation $0.8$. How many dollars of the index should you short per dollar of stock to make the hedged position’s variance as small as possible? What volatility is left? What goes wrong if you take the ratio from the regression of the index on the stock, and invert it?

**Answer to Question 18.3.**

Short $1.6$ dollars of the index per dollar of stock. The hedged position has a volatility of 18%. Using the inverted reverse regression, you would short $2.5$ dollars and leave $22.5\%$.

The variance of stock minus $h$ times index is a quadratic in $h$, minimised at $h = \mathrm{Cov}/\mathrm{Var}(\text{index}) = \rho\,\sigma_s/\sigma_i = 0.8 \cdot 30/15 = 1.6$. This is the slope of the stock regressed on the index. The residual volatility is $\sigma_s\sqrt{1 - \rho^2} = 30 \cdot 0.6 = 18\%$, so the hedge removes $\rho^2 = 64\%$ of the variance.

The regression of the index on the stock has slope $\rho\,\sigma_i/\sigma_s = 0.4$, and inverting it gives $2.5$. The variance is then $30^2 + 2.5^2 \cdot 15^2 - 2 \cdot 2.5 \cdot 360 = 506.25$, a volatility of $22.5\%$. It over-hedges by the factor $1/\rho^2$.

**Why it matters.** This is a daily decision on a desk. Note also that an estimated ratio on noisy returns tends to come out low, not high, because noise in the regressor shrinks the slope towards zero.

**Question 18.4 ★ QR, DS, Risk, Analyst • any • junior.**

A regression with an intercept reports $R^2$. What values can it take, and what does $R^2 = 1$ tell you? What happens to it when you add one more regressor? If you drop the intercept but still compute $1 - \text{RSS}/\sum (y_i - \bar y)^2$, where RSS is the sum of squared residuals, what can happen?

**Answer to Question 18.4.**

With an intercept, $R^2$ lies in $[0, 1]$, and $R^2 = 1$ means that every residual is zero. Adding a regressor can never lower it. Without an intercept, that formula can be far below zero.

With an intercept, the total sum of squares splits into explained plus residual, because the residuals are orthogonal to the fitted values and sum to zero. So $R^2$ is a ratio between 0 and 1, and it equals the squared correlation of $y$ with the fitted values. A new regressor can reproduce the old fit by taking a zero coefficient, so RSS cannot rise.

Without an intercept, the fit is not obliged to do as well as the mean. If $y$ has a large mean and $x$ is centred on zero, RSS is close to $\sum y_i^2$, which is much larger than $\sum(y_i - \bar y)^2$, and the formula gives a large negative number.

**Classic wrong answer.** Reading a higher $R^2$ from an added regressor as evidence. It rises even for pure noise.

**Follow-up.** *And out of sample?* It can be negative for any model, when the model predicts worse than the mean.

**Question 18.5 ★ QR, QT, Analyst, Risk • hedge fund, bank • junior.**

You regress a fund’s returns on the market’s and estimate an alpha, the regression’s intercept, of 2% a year. The residuals have a volatility of 10% a year, and you have 4 years of data. What is the $t$-statistic of the alpha? If the true alpha is 2%, how many years of data would you need for a $t$-statistic of 2?

**Answer to Question 18.5.**

The $t$-statistic is $0.4$, and you would need 100 years to reach a $t$-statistic of 2.

The standard error of the intercept is about the residual volatility divided by the square root of the number of years, $10\%/\sqrt4 = 5\%$ a year. So $t = 2/5 = 0.4$. In terms of the information ratio, the alpha divided by residual volatility, here $0.2$, you have $t = \text{ratio} \cdot \sqrt{\text{years}}$. To reach 2 requires $\sqrt{\text{years}} = 2/0.2 = 10$.

**Follow-up.** *What if the information ratio were 1?* Then $t = 2$ takes 4 years.

**Why it matters.** An alpha of this size cannot be confirmed from track record in a working lifetime. In practice you lean on the economic logic of the strategy, on a much higher frequency of independent bets, or on cross-sectional evidence. Performance alone is not enough.

**Question 18.6 ★ QR, QT, DS • hedge fund, market maker, crypto • junior.**

You regress daily returns on a standardised signal using 2 500 days of data and get $R^2 = 0.5\%$. What is the $t$-statistic of the slope? Is the signal worth anything? Estimate the annual Sharpe ratio of holding a position proportional to the signal, where the Sharpe ratio is mean return divided by its standard deviation.

**Answer to Question 18.6.**

The $t$-statistic is about $3.54$. The signal may be valuable, with an annual Sharpe ratio of about $1.1$.

A simple regression has the exact identity

$$
t^2 = \frac{R^2\,(n - 2)}{1 - R^2},
$$

so $t = \sqrt{0.005 \cdot 2498/0.995} \approx 3.54$. A low $R^2$ with a high $t$ is normal: $t$ grows with the sample, and $R^2$ does not.

The correlation with the return is $\sqrt{0.005} \approx 0.071$. Holding a position proportional to the standardised signal $x$ earns $xy$, with mean about $\rho\,\sigma_y$ and standard deviation about $\sigma_y$, so the daily Sharpe ratio is about $\rho$. Annualised, $0.071 \cdot \sqrt{252} \approx 1.12$. The same answer comes from $t/\sqrt{\text{years}} = 3.54/\sqrt{9.9}$.

**Classic wrong answer.** “An $R^2$ of half a percent means it explains nothing.” On daily returns that is a strong signal, before costs.

**Why it matters.** Judge return prediction by Sharpe ratio after costs. This calculation also assumes the data did not come out of a search over many signals, and that is usually what you should check next.

**Question 18.7 ★★ QR, QD, DS, Risk • any • junior.**

Derive by hand the least squares estimate of $\beta$ in $y = X\beta + \varepsilon$. When does it exist? Why do you not compute it by inverting $X^\top X$? How do you fit it when $X$ is too large to fit in memory?

**Answer to Question 18.7.**

The estimator is $\hat\beta = (X^\top X)^{-1}X^\top y$, and it exists uniquely when $X$ has full column rank.

Minimise $L(\beta) = \lVert y - X\beta\rVert^2 = y^\top y - 2\beta^\top X^\top y + \beta^\top X^\top X\beta$. Setting the gradient $-2X^\top y + 2X^\top X\beta$ to zero gives the normal equations $X^\top X\beta = X^\top y$. The Hessian $2X^\top X$ is positive semidefinite, so this is a minimum, and it is unique if $X^\top X$ is invertible, which is the same as full column rank. With fewer rows than columns, or with a repeated column, there are many solutions.

Geometrically, $X\hat\beta$ is the orthogonal projection of $y$ onto the column space of $X$. So the residuals are orthogonal to every column, and with an intercept they sum to zero.

Do not invert. The condition number of $X^\top X$ is the square of that of $X$, so inverting loses twice as many digits. Solve by QR on $X$, or by Cholesky on $X^\top X$ if $X$ is well conditioned.

If $X$ does not fit in memory, read it in chunks and accumulate the $p \times p$ matrix $X^\top X$ and the vector $X^\top y$. They are sums over rows, so this gives the exact answer with memory proportional to $p^2$.

**Follow-up.** *And when rows arrive one at a time?* Update the inverse with recursive least squares, and add a forgetting factor if the relation drifts.

**Question 18.8 ★★ QR, QT, DS, Risk • any • junior, experienced.**

You want the coefficient of $x$ in a regression of $y$ on $x$ and $z$. Procedure A regresses $y$ on $z$, and then regresses those residuals on $x$. Procedure B regresses $y$ on $z$ and $x$ on $z$, and then regresses the first set of residuals on the second. Which gives the same coefficient as the full regression? If $x$ and $z$ have correlation $0.8$ and the true coefficient of $x$ is 1, what does the other procedure give?

**Answer to Question 18.8.**

Procedure B gives the full-regression coefficient exactly. Procedure A gives $0.36$ here, not 1.

This is the Frisch–Waugh–Lovell theorem: the coefficient of $x$ in the full regression equals the slope of the residuals of $y$ on the residuals of $x$, after removing $z$ from both. Removing $z$ from $y$ only leaves $x$ still carrying its $z$ part, which is unrelated to the residuals of $y$ and dilutes the slope. Writing $\tilde x$ for the part of $x$ not explained by $z$,

$$
\text{slope of A} = \beta \cdot \frac{\mathrm{Var}(\tilde x)}{\mathrm{Var}(x)} = \beta\,(1 - \rho^2) = 1 \cdot (1 - 0.64) = 0.36 .
$$

**Classic wrong answer.** “Partial out the market from returns, and then test the signal on the residuals.” A common workflow, and it is procedure A. It biases the signal’s coefficient towards zero by $1 - \rho^2$, and worse if the signal is highly correlated with the factor.

**Why it matters.** Neutralise the signal as well as the returns. If you sector-neutralise only the returns and your signal has a sector tilt, you understate what the signal would earn after you hedge it.

**Question 18.9 ★★ QR, QT, DS, Risk • any • junior.**

The true model is $y = x - 3z + \varepsilon$, where $x$ and $z$ have unit variance and correlation $0.5$, and $\varepsilon$ is independent noise. You do not observe $z$, and you regress $y$ on $x$ alone. What slope do you get in a large sample?

**Answer to Question 18.9.**

The slope is $-0.5$. The sign is wrong: the true coefficient of $x$ is $+1$.

This is omitted-variable bias. The slope of the short regression is $\mathrm{Cov}(x, y)/\mathrm{Var}(x)$. Substituting the true model,

$$
\frac{\mathrm{Cov}(x,\, x - 3z + \varepsilon)}{\mathrm{Var}(x)} = 1 - 3 \cdot \frac{\mathrm{Cov}(x, z)}{\mathrm{Var}(x)} = 1 - 3 \cdot 0.5 = -0.5 .
$$

In general, the short slope is the true coefficient, plus the coefficient of $z$ multiplied by the slope of $z$ on $x$. It disappears only if $z$ has no effect, or if $x$ and $z$ are uncorrelated, and it does not shrink with more data.

**Follow-up.** *And if $x$ and $z$ are uncorrelated?* The slope is 1, unbiased. The omitted $z$ only adds to the noise.

**Why it matters.** A signal correlated with market beta or sector will pick up their returns. Before believing a signal, regress it on the known factors and look at what remains.

**Question 18.10 ★★ QR, QT, DS, Risk • any • junior, experienced.**

The true relation is $y = x^* + \varepsilon$. You observe $x = x^* + n$, where $x^*$ and the noise $n$ each have variance 1 and are independent. In a large sample, what slope do you get when you regress $y$ on $x$? What if the measurement noise is in $y$ and not in $x$? If both are noisy, how can you bracket the true slope with two regressions?

**Answer to Question 18.10.**

Noise in $x$ gives a slope of $1/2$. Noise in $y$ alone leaves the slope at 1. With noise in both, the true slope lies between the slope of $y$ on $x$ and the inverse of the slope of $x$ on $y$.

This is errors-in-variables. Noise in the regressor raises $\mathrm{Var}(x)$ and leaves the covariance alone:

$$
\text{slope} = \frac{\mathrm{Cov}(x^* + n,\, y)}{\mathrm{Var}(x^*) + \mathrm{Var}(n)} = \frac{1}{1 + 1} = \frac12 .
$$

The factor $\mathrm{Var}(x^*)/\mathrm{Var}(x)$ is the attenuation. Noise in $y$ goes into the error term: it widens the standard errors but causes no bias.

With noise in both, the slope of $y$ on $x$ is too flat and the inverse of the slope of $x$ on $y$ is too steep. With the numbers above and unit noise in $y$ as well, these are $0.5$ and $2$, around the true value of 1.

**Follow-up.** *Is there a single line that treats $x$ and $y$ alike?* Total least squares minimises perpendicular distance and takes the first principal direction. Its slope is $\bigl[(s_{yy} - s_{xx}) + \sqrt{(s_{yy} - s_{xx})^2 + 4s_{xy}^2}\,\bigr]/(2s_{xy})$, here exactly 1. It assumes equal noise in the two variables and depends on their units, so standardise first or use the known noise ratio.

**Why it matters.** Estimated betas, volatilities and signals are all noisy, so regressions on them come out flat. If you size a hedge from a noisy regressor, you under-hedge.

**Question 18.11 ★★ QR, DS, Risk • any • junior.**

Two regressors have correlation $0.9$. By what factor is the standard error of each coefficient larger than if they were uncorrelated? What can you still estimate well? Can both $t$-statistics be below 2 while the $F$-test for the two together is highly significant?

**Answer to Question 18.11.**

Each standard error is larger by a factor of about $2.29$. The sum of the coefficients is still well estimated, and yes, both $t$-statistics can be small while $F$ is large.

The variance inflation factor is $1/(1 - \rho^2) = 1/0.19 = 5.26$, and its square root is $2.29$.

For unit-variance regressors, the covariance of the coefficients is proportional to the inverse of $\bigl(\begin{smallmatrix}1 & \rho\\ \rho & 1\end{smallmatrix}\bigr)$. That gives $\mathrm{Var}(b_1 + b_2) \propto 2/(1 + \rho) = 1.05$ and $\mathrm{Var}(b_1 - b_2) \propto 2/(1 - \rho) = 20$. The data pin down the sum 19 times more tightly than the difference, because the two regressors nearly always move together. The difficulty is in dividing the credit between them, which shows up as coefficients that flip sign between samples.

The $F$-test looks at the joint effect, so it does not suffer. With 100 observations and $R^2 = 0.2$, the test statistic is $F = (0.2/2)/(0.8/97) \approx 12.1$, far above the 5% critical value of about $3.1$. In a simulation with correlation $0.95$ and true coefficients of $0.2$ each, over half the samples have both $|t| < 2$, and most of these still have a significant $F$.

**Why it matters.** Drop one, combine them, or use ridge. If you only need predictions and the correlation is stable, you may do nothing, as collinearity does not harm the fit.

**Question 18.12 ★★ QR, QT, DS • any • junior.**

A point is chosen uniformly in the triangle with corners $(0,0)$, $(1,0)$ and $(1,1)$. Find the population regression line of $y$ on $x$, and the regression line of $x$ on $y$. What is the correlation of $x$ and $y$?

**Answer to Question 18.12.**

The two lines are $y = x/2$ and $x = (1 + y)/2$. The correlation is $1/2$.

Because the region gives simple conditional means, you can write the regression directly. Given $x$, the height $y$ is uniform on $[0, x]$, so $E[y \mid x] = x/2$. Given $y$, the value $x$ is uniform on $[y, 1]$, so $E[x \mid y] = (1 + y)/2$. Both are straight lines, and so each is also the population regression line, as shown in [Figure 18.1](#fig-iv1-triangle). Both slopes are $1/2$, and the product of slopes equals $\rho^2$, so $\rho = 1/2$.

![The triangle and its two regression lines. They cross at the mean point (2/3, 1/3). Drawn in the same axes, one line has slope 1/2 and the other slope 2, on either side of the slope 1 of the diagonal edge.](https://one-course.com/images/onecourse/chapters/quant-18/iv1-regression/fig-9dea0e24ac19.svg)

***Figure 18.1.** The triangle and its two regression lines. They cross at the mean point $(2/3, 1/3)$. Drawn in the same axes, one line has slope $1/2$ and the other slope 2, on either side of the slope 1 of the diagonal edge.*

As a check by integration, $E[x] = 2/3$, $E[y] = 1/3$, both variances are $1/18$ and the covariance is $1/36$. So each slope is $(1/36)/(1/18) = 1/2$.

**Classic wrong answer.** Taking the diagonal edge, $y = x$, as the line of the data. It is the boundary of the region, and not a regression line.

**Question 18.13 ★★ QR, DS, QD • any • junior, experienced.**

You accidentally include the same column twice in a regression. What does ordinary least squares do? What does ridge do? What does lasso do?

**Answer to Question 18.13.**

OLS has no unique solution, since only the sum of the two coefficients is identified. Ridge splits the coefficient equally. Lasso does not care how it splits, so the solver decides.

For OLS, $X^\top X$ is singular, and any pair with the right sum fits equally well. A pseudo-inverse returns the minimum-norm solution, which splits equally, and a plain inverse fails or returns huge numbers of opposite sign.

For ridge, the penalty $b_1^2 + b_2^2$ for a given sum is smallest when they are equal. Each coefficient is $x^\top y/(2x^\top x + \lambda)$, and their sum is $x^\top y/(x^\top x + \lambda/2)$. So doubling a column cuts its effective penalty in half.

For lasso, $|b_1| + |b_2|$ is the same for every split with the same sign, so all such splits have an equal objective. Coordinate descent from zero tends to load everything on the first column and leave the second at zero. This depends on the order and the start.

**Why it matters.** With nearly identical signals the behaviour is similar, with lasso’s choice jumping from day to day and creating turnover with no economic meaning. Ridge or a grouping of the signals is more stable.

**Question 18.14 ★★ QR, DS • any • junior, experienced.**

The columns of $X$ are orthonormal, so that $X^\top X = I$, and the ordinary least squares coefficients are $3$, $-0.5$ and $1.2$. Find the coefficients that minimise $\tfrac12\lVert y - Xb\rVert^2 + \lambda\lVert b\rVert_1$ (lasso), and those that minimise $\tfrac12\lVert y - Xb\rVert^2 + \tfrac{\lambda}{2}\lVert b\rVert_2^2$ (ridge), with $\lambda = 1$. Derive the rule you use.

**Answer to Question 18.14.**

Lasso gives $(2, 0, 0.2)$, and ridge gives $(1.5, -0.25, 0.6)$.

With orthonormal columns, the objective separates into one problem per coefficient. Up to constants, $\tfrac12\lVert y - Xb\rVert^2 = \tfrac12\sum_j (b_j - \hat\beta_j)^2$, where $\hat\beta_j$ is the OLS coefficient.

For ridge, minimising $\tfrac12(b - \hat\beta)^2 + \tfrac{\lambda}{2}b^2$ gives $b = \hat\beta/(1 + \lambda)$: every coefficient is divided by 2.

For lasso, minimise $\tfrac12(b - \hat\beta)^2 + \lambda|b|$. If $b > 0$ the derivative is zero at $b = \hat\beta - \lambda$, which requires $\hat\beta > \lambda$. The case $b < 0$ is symmetric. If $|\hat\beta| \le \lambda$, the kink at zero is the minimum. This is soft-thresholding,

$$
b = \mathrm{sign}(\hat\beta)\,\bigl(|\hat\beta| - \lambda\bigr)_+ ,
$$

plotted in [Figure 18.2](#fig-iv1-shrink). So $3 \to 2$, $-0.5 \to 0$, and $1.2 \to 0.2$.

![The estimate as a function of the OLS coefficient, with = 1 and orthonormal columns. Ridge divides by 2 everywhere. Lasso sets to zero everything inside (-1, 1) and subtracts 1 from the rest, so large coefficients keep a fixed bias.](https://one-course.com/images/onecourse/chapters/quant-18/iv1-regression/fig-aa12e83c5a14.svg)

***Figure 18.2.** The estimate as a function of the OLS coefficient, with $\lambda = 1$ and orthonormal columns. Ridge divides by 2 everywhere. Lasso sets to zero everything inside $[-1, 1]$ and subtracts 1 from the rest, so large coefficients keep a fixed bias.*

**Follow-up.** *Why is there no closed form in general?* The absolute value is not differentiable, and non-orthogonal columns couple the coefficients. It is solved by coordinate descent, which applies this same rule one coefficient at a time. It can also be written as a quadratic program, by setting $b = b^+ - b^-$ with $b^+, b^- \ge 0$ and using $\sum(b^+ + b^-)$ as the penalty.

**Follow-up.** *And without the $\tfrac12$ in front of the squared error?* The threshold becomes $\lambda/2$.

**Question 18.15 ★★ QR, QT, DS, Risk, Analyst • any • junior.**

Under what assumptions are the coefficients of a linear regression unbiased, and under what further assumptions are their standard errors correct? On daily stock returns, which of these fail, and what do you do about each?

**Answer to Question 18.15.**

The coefficients are unbiased under linearity, exogeneity and full rank. The usual standard errors also need errors with constant variance and no correlation. Normal errors are not needed for large samples.

For unbiasedness, you need $y = X\beta + \varepsilon$, $E[\varepsilon \mid X] = 0$ and full column rank. For correct standard errors and the best-linear-unbiased property, you also need homoskedastic and uncorrelated errors. Normality matters only for exact small-sample tests.

On daily stock returns:

- Volatility moves. Coefficients stay unbiased but standard errors are wrong. Use robust (White) standard errors, or scale by a volatility forecast.
- Errors are correlated, especially with overlapping horizons. Use Newey–West or Hansen–Hodrick standard errors, or non-overlapping data.
- Fat tails. A few days dominate the fit. The test level holds up reasonably with thousands of points, but check influence, and consider Huber regression or winsorising.
- Exogeneity fails through omitted factors and look-ahead in features. This one causes bias, and more data will not fix it. Control for factors and time-stamp strictly.
- Relations drift. Fit on rolling or exponentially weighted windows, and test stability across sub-periods.
- Regressors are noisy. Slopes shrink towards zero.
- Regressors are nearly collinear. Coefficients are unstable. Use ridge or combine them.

**Classic wrong answer.** “The errors must be normal for OLS to be unbiased.” Normality has nothing to do with bias.

**Question 18.16 ★★ QR, QT, DS • any • junior.**

You regress $y$ on 20 regressors with 100 observations and an intercept, and in truth $y$ is independent of all of them. What is the expected $R^2$? What is the expected adjusted $R^2$? How many of the 20 coefficients do you expect to have $|t| > 2$?

**Answer to Question 18.16.**

The expected $R^2$ is $20/99 \approx 0.20$, the expected adjusted $R^2$ is 0, and about one coefficient has $|t| > 2$.

Under the null, $R^2$ follows a Beta$(p/2,\ (n - p - 1)/2)$ distribution with mean $p/(n - 1)$. Each of the 20 regressors uses up one of the 99 degrees of freedom beyond the mean, and each one captures an equal share of the variance by chance.

The adjustment $1 - (1 - R^2)(n - 1)/(n - p - 1)$ was built to average zero in this case.

Each $t$-statistic has 79 degrees of freedom, and $P(|t| > 2) \approx 0.049$, so the expected count is $20 \cdot 0.049 \approx 1$.

**Why it matters.** The in-sample $R^2$ of 20% on noise tells you what to expect from a fit with many signals on little data. Compare your results with this baseline, and judge on out-of-sample results.

**Question 18.17 ★★ QR, QT, Risk, DS • bank, hedge fund • junior.**

You generate two independent random walks, each 250 steps long, and regress one on the other, using the levels. How often is the slope “significant” with $|t| > 1.96$, and what $R^2$ do you see on average? What changes with 1 000 steps? What should you do with price series instead?

**Answer to Question 18.17.**

With 250 steps, about 85% of the regressions are “significant”, with an average $R^2$ of about $0.24$. With 1 000 steps, the share rises to about 93%, while $R^2$ stays where it is. Use returns, or test for cointegration.

This is spurious regression. Both series wander, and any two wandering series look related over a finite window. The standard theory assumes stationary errors, and here the residuals are themselves a random walk, so the $t$-statistic has no limiting distribution. It grows like $\sqrt{T}$: going from 250 to 1 000 steps doubles its dispersion. The slope does not converge, and it remains random even with infinite data. These figures come from a seeded simulation.

Differencing cures it. Regressing returns on returns gives $|t| > 1.96$ about 5% of the time, as it should, with $R^2$ close to zero.

**Follow-up.** *When is a level regression meaningful?* When the two series are cointegrated, so that a linear combination of them is stationary. The residuals then do not wander, and that is what you test: for example a unit-root test on the residuals, with the appropriate critical values.

**Why it matters.** Two price charts that move together are not evidence. A trading pair needs a stationary spread, and tests on price levels will look wonderful for almost any pair.

**Question 18.18 ★★ QR, QT, DS • hedge fund, market maker, bank • junior, experienced.**

You have 500 weak and correlated return signals and 5 years of daily data, about 1 250 observations. Would you fit ridge or lasso? What would change your mind?

**Answer to Question 18.18.**

Ridge, unless you have a reason to believe that a few signals carry almost all of the information.

Lasso assumes sparsity, and it pays for selecting variables with instability: among correlated signals it picks one somewhat at random and changes its pick between samples, which adds turnover. Ridge keeps them all and shrinks along the low-variance directions. With $p/n = 0.4$, many small effects and a weak signal, reducing variance matters most.

In a seeded simulation with 500 signals, correlated through ten factors, and 1 250 observations, where all signals have a small random effect, the out-of-sample $R^2$ is about 1.1% for ridge and about 0.8% for lasso, each with its best penalty. With just 5 strong signals and 495 useless ones, lasso comes out ahead.

Change your mind if you have good reason for sparsity, if you want interpretability or fewer inputs to maintain, or if each signal costs money to run. Elastic net is a reasonable compromise.

**Follow-up.** *What should you be careful of?* Standardise the signals, do not penalise the intercept, and choose the penalty by time-ordered validation with a gap. Random folds leak information through autocorrelation.

**Question 18.19 ★★ QR, QT, Risk, Trader • bank, hedge fund • junior, experienced.**

A stock’s true daily return is exactly $1.2$ times the market’s. But it trades only on a random half of days, and on other days its price simply stays at the last trade. You regress its observed daily return on the same day’s market return. What slope do you get? How do you recover $1.2$?

**Answer to Question 18.19.**

The slope is $0.6$, half of $1.2$. Regressing on the current and several lagged market returns and summing the coefficients recovers $1.2$, and a longer return horizon does much the same.

A day’s market move shows up in the stock’s price on the first later day when it trades, and each day it trades with probability $1/2$. So a fraction $1/2$ of the move shows up the same day, a fraction $1/4$ one day later, $1/8$ two days later, and so on. Regressing on the market’s returns at several lags therefore gives slopes $0.6$, $0.3$, $0.15$, and so on, and their sum is the true $1.2$. Ignoring the lags leaves $0.6$.

The other cure is to lengthen the return horizon, since a smaller share of the move misses the window. With weekly returns in this model, only the moves late in the week can miss it, and on average $(31/32)/5$ of a week’s move does. So the slope is about $1.2\,(1 - 31/160) \approx 0.97$.

**Why it matters.** Illiquid names and instruments quoted at different closing times all show low beta and low correlation on daily data. Asian and US closes, for example, are hours apart. Do not mistake this for diversification: at longer horizons the correlation is back. The same effect drives correlation down at very high frequencies.

**Question 18.20 ★★★ QR, DS, Risk • any • junior, experienced.**

Let $x$ be standard normal and $y = \beta x + |x|\,\varepsilon$, with $\varepsilon$ standard normal and independent of $x$, so that the noise is large when $|x|$ is large. With a large sample of size $n$, what is the true standard error of the OLS slope, and what does the usual formula report? How do you fix the standard errors, and how could you use this to improve the estimate?

**Answer to Question 18.20.**

The true standard error is $\sqrt{3/n}$, and the usual formula reports $\sqrt{1/n}$. So it understates the truth by a factor of $\sqrt3 \approx 1.73$.

The slope error is $\sum x_i e_i / \sum x_i^2$, with $e_i = |x_i|\varepsilon_i$. With many observations, its variance is

$$
\frac{E[x^2 e^2]}{n\,(E[x^2])^2} = \frac{E[x^4]}{n} = \frac{3}{n} ,
$$

since $E[x^2 e^2] = E[x^2 \cdot x^2]E[\varepsilon^2]$ and the fourth moment of a standard normal is 3. The usual formula is $s^2/\sum x_i^2$ with $s^2 \to E[e^2] = E[x^2] = 1$, so it gives $1/n$. It uses the average noise, and misses that the noise is largest exactly where $x$ has the most influence on the slope.

To fix the standard errors, use the White sandwich estimator: $\sqrt{\sum x_i^2 \hat e_i^2}/\sum x_i^2$ with demeaned $x$. It estimates the $3/n$ directly and matches the true dispersion in a simulation.

To improve the estimate, use weighted least squares, which weights each point by the inverse of its noise variance, here $1/x_i^2$. In this case that makes the estimate the mean of $y_i/x_i$, with variance $1/n$, a third of the OLS variance.

**Follow-up.** *Each of your observations is the average of a different number $m_i$ of underlying data points. What weights do you use?* $m_i$, since the variance of an average is $\sigma^2/m_i$.

**Follow-up.** *You have two independent estimates of the same number, with standard errors 2 and 1. How do you combine them?* With inverse-variance weights $0.2$ and $0.8$, and a standard error of $\sqrt{0.8} \approx 0.89$.

**Question 18.21 ★★★ QR, QT, DS • hedge fund, market maker • junior, experienced.**

Daily returns are independent, and a signal is unrelated to them. You regress the next 20 days’ total return on today’s signal, sampling every day. By what factor do the usual standard errors understate the truth if the signal is (a) independent from day to day, (b) nearly constant over 20 days, (c) an autoregressive process of order 1 with coefficient $0.9$?

**Answer to Question 18.21.**

The answers are (a) a factor of 1, so no understatement at all, (b) about $\sqrt{20} \approx 4.47$, and (c) about $3.33$.

The usual formula assumes that $x_t e_t$ is uncorrelated over time. In fact, the variance of the slope is larger by the factor

$$
1 + 2 \sum_{k \ge 1} \rho_x(k)\,\rho_e(k) ,
$$

where $\rho_x$ and $\rho_e$ are the autocorrelations of the regressor and of the error. Two 20-day windows starting $k$ days apart share $20 - k$ days, so $\rho_e(k) = 1 - k/20$ for $k < 20$.

(a) If the signal is independent from day to day, $\rho_x(k) = 0$, the factor is 1. Overlap in $y$ alone does no harm to the slope’s standard error. Many candidates miss this.

(b) If the signal is nearly constant, $\rho_x(k) \approx 1$, the factor is $\sum_{|k|<20}(1 - |k|/20) = 20$, so the standard errors are too small by $\sqrt{20}$.

(c) With $\rho_x(k) = 0.9^k$, the factor is $1 + 2\sum_{k=1}^{19} 0.9^k(1 - k/20) \approx 11.1$, whose square root is $3.33$. Simulations reproduce (a) and (c), and (b) is the limit of the same formula.

The fix is Newey–West or Hansen–Hodrick standard errors, with the number of lags at least the overlap. Newey–West’s weights shrink with the lag, so use more than that: in the simulation with 40 lags it comes within 20% of the truth for case (c).

**Follow-up.** *What about plain autocorrelated errors with no overlap?* With AR(1) in both regressor and error, each with coefficient $0.9$, the factor is $(1 + 0.81)/(1 - 0.81) = 9.53$, so the standard errors are too small by $3.09$. The Durbin–Watson statistic, which is about $2(1 - \rho)$, is the quick check on the residuals.

**Question 18.22 ★★★ QR, DS, QT • any • junior, experienced.**

$y$ has correlation $0.6$ with $x_1$ and correlation $0.6$ with $x_2$, but you do not know the correlation between $x_1$ and $x_2$. What values can the $R^2$ of the regression of $y$ on both take? Then a different case: $x_1$ is uncorrelated with $y$, $x_2$ has correlation $0.4$ with $y$, and $x_1$ and $x_2$ have correlation $0.9$. Is $x_1$ useless?

**Answer to Question 18.22.**

$R^2$ can take any value from $0.36$ to 1. And no, $x_1$ is far from useless: with both regressors the $R^2$ is $0.842$, against $0.16$ for $x_2$ alone.

For two regressors with correlations $r_1$, $r_2$ with $y$ and $\rho$ with each other,

$$
R^2 = \frac{r_1^2 + r_2^2 - 2 r_1 r_2 \rho}{1 - \rho^2} .
$$

With $r_1 = r_2 = 0.6$ this is $0.72/(1 + \rho)$. As $\rho \to 1$, the two regressors are the same variable and $R^2 \to 0.36$. Lowering $\rho$ raises $R^2$. The correlation matrix of $y, x_1, x_2$ must be positive semidefinite, which here requires $\rho \ge 2 \cdot 0.36 - 1 = -0.28$. At that value $R^2 = 1$.

In the second case, with $r_1 = 0$, $r_2 = 0.4$ and $\rho = 0.9$, $R^2 = 0.16/0.19 \approx 0.842$. This is a suppressor variable: $x_1$ has no relation to $y$ directly, but it cancels the part of $x_2$ that is noise for predicting $y$.

**Classic wrong answer.** “Joint $R^2$ is at most the sum of the separate $R^2$ values,” or “a variable with zero correlation with $y$ cannot help.” Both are false.

**Why it matters.** Do not screen signals one at a time by correlation with the target. A hedge is the same idea: an instrument uncorrelated with your target can still reduce your risk once you hold another position.

**Question 18.23 ★★★ QR, QT • hedge fund, market maker, crypto • experienced.**

Two signals each have correlation $0.05$ with the next day’s return. What correlation can the best linear combination of them reach if their correlation with each other is $0.5$, $0$, or $-0.5$? In the case of $0.5$, suppose the second signal’s correlation with the return is $0.02$ and not $0.05$. What sign should its weight have?

**Answer to Question 18.23.**

The best combination reaches $0.0577$, $0.0707$ and $0.1$ in the three cases. With correlations $0.05$ and $0.02$ and $\rho = 0.5$, the second signal’s weight is negative, even though it predicts positively by itself.

The best linear combination’s correlation with the target is $\sqrt{R^2}$, and the formula for two regressors gives $R^2 = 2r^2/(1 + \rho)$ with equal correlations. For $r = 0.05$:

$$
\rho = 0.5 : 0.0577, \qquad \rho = 0 : 0.0707, \qquad \rho = -0.5 : 0.1.
$$

Diversification works: correlated signals add little, independent ones add as $\sqrt2$, and negatively correlated signals with the same sign of prediction add more.

The optimal weights are $w \propto \Sigma^{-1}r$. With $\Sigma = \bigl(\begin{smallmatrix}1 & 0.5\\ 0.5 & 1\end{smallmatrix}\bigr)$ and $r = (0.05, 0.02)$,

$$
w = \frac{1}{0.75}\bigl(0.05 - 0.5 \cdot 0.02,\ \ 0.02 - 0.5 \cdot 0.05\bigr) = (0.0533,\ -0.0067).
$$

The second signal’s own correlation of $0.02$ is less than the $0.025$ it would get just by being correlated with the first. So it is shorted against the first, which adds a little: the correlation is $0.0503$ against $0.05$ alone.

**Why it matters.** This is the regression of return on signals, and it shows why combining beats selecting. The gain from $0.05$ to $0.0577$ is modest but real: an annual Sharpe ratio of about $0.92$, against $0.79$. Note how little it takes for the sign of a weight to flip, so shrink the weights.

**Question 18.24 ★★★ QR, DS • any • experienced.**

A regression has one regressor with $x^\top x = 1$, and noise of variance $\sigma^2 = 1$. The true coefficient is $\beta = 0.5$. OLS gives $\hat\beta$, and ridge gives $\hat\beta/(1 + \lambda)$. Which $\lambda$ minimises the mean squared error of the estimate, and how much lower is that error than for OLS? What does this say about shrinkage for weak signals?

**Answer to Question 18.24.**

The best value is $\lambda = \sigma^2/\beta^2 = 4$, which gives a mean squared error of $0.2$ against 1 for OLS, an 80% reduction.

The ridge estimate $\hat\beta/(1 + \lambda)$ has bias $-\lambda\beta/(1 + \lambda)$ and variance $\sigma^2/(1 + \lambda)^2$, so

$$
\mathrm{MSE}(\lambda) = \frac{\sigma^2 + \lambda^2\beta^2}{(1 + \lambda)^2}.
$$

Setting the derivative to zero gives $\lambda^* = \sigma^2/\beta^2$, and the minimum is $\sigma^2\beta^2/(\sigma^2 + \beta^2)$. With $\sigma = 1$ and $\beta = 0.5$, that is $\lambda^* = 4$ and $\mathrm{MSE} = 0.2$. The estimate is $\hat\beta/5$: throw away four fifths of it.

The weaker the signal relative to noise, the more you should shrink. A signal with a true $t$-statistic of $0.5$ should be cut hard, while one with $\beta = 5$ gets only $\lambda^* = 0.04$. Of course $\beta$ is unknown, which is why you choose $\lambda$ by validation. But the conclusion stands: in low signal-to-noise settings, unbiased estimates are poor bets.

**Follow-up.** *What is the Bayesian reading?* With prior $\beta \sim N(0, \tau^2)$, the posterior mean is the ridge estimate with $\lambda = \sigma^2/\tau^2$. For $\tau^2 = 0.25$ that again multiplies the estimate by $1/5$.

**Follow-up.** *And with many regressors?* In the singular value basis, each direction is multiplied by $d^2/(d^2 + \lambda)$, so the directions with little variance in $X$ are shrunk the most.

**Question 18.25 ★★★ QR, QT, Risk, DS • any • junior, experienced.**

$x$ and $y$ are jointly normal with unit variance and correlation $0.5$. You keep only the observations with $x > 0$ and regress $y$ on $x$. What slope and correlation do you get? What slope do you get if instead you keep only the observations with $y > 0$?

**Answer to Question 18.25.**

Keeping $x > 0$ leaves the slope at $0.5$ and lowers the correlation to about $0.33$. Keeping $y > 0$ lowers the slope to about $0.22$.

Selecting on $x$ leaves the relation intact: given $x$, $y$ still has mean $0.5\,x$, so the slope remains $0.5$. Only the spread of $x$ falls. The variance of a standard normal above zero is $v = 1 - 2/\pi \approx 0.363$. The correlation falls because the explained variance falls:

$$
\text{corr}^2 = \frac{\rho^2 v}{\rho^2 v + 1 - \rho^2} = \frac{0.25 \cdot 0.363}{0.25 \cdot 0.363 + 0.75} \approx 0.108, \quad \text{corr} \approx 0.33.
$$

Selecting on $y$ breaks the relation, because now the noise matters: for low $x$, you keep only the points with a large positive error. So the errors are no longer independent of $x$, and the slope falls. Using the normal relation, with $x = \rho y + \sqrt{1 - \rho^2}\,z$ and the same variance $v$ for $y$ above zero, you get $\mathrm{Cov}(x,y) = \rho v$ and $\mathrm{Var}(x) = \rho^2 v + 1 - \rho^2$, so

$$
\text{slope} = \frac{\rho v}{\rho^2 v + 1 - \rho^2} = \frac{0.5 \cdot 0.363}{0.841} \approx 0.216.
$$

**Why it matters.** Filtering on a variable you use as a regressor is safe for the slope. Filtering on the outcome is not, and that includes keeping only survivors, only filled orders or only profitable trades. For example, a study of “stocks that went up” or “orders that filled” will be biased, and no amount of data will help.

**Question 18.26 ★★★ QR, DS, Risk • bank, hedge fund • junior, experienced.**

A regression of $y$ on $x$ with an intercept has 1 000 observations, where $x$ has mean 0 and $\sum x_i^2 = 1000$. One observation has $x = 10$ and residual 2. Without refitting, find its leverage, the change in the slope if you remove it, and the prediction error for it from a fit without it.

**Answer to Question 18.26.**

Its leverage is $0.101$, removing it lowers the slope by about $0.022$, and its out-of-sample prediction error is about $2.22$.

Leverage is the diagonal of the hat matrix, how much the observation’s own value moves its fitted value. With an intercept,

$$
h = \frac1n + \frac{(x - \bar x)^2}{\sum (x_i - \bar x)^2} = \frac{1}{1000} + \frac{100}{1000} = 0.101.
$$

The leverages sum to the number of coefficients, so the average here is $2/1000$, and this point has over 50 times that.

Deleting a point has exact formulas, so no refit is needed:

$$
\text{prediction error without it} = \frac{e}{1 - h} = \frac{2}{0.899} \approx 2.22,
$$

$$
\text{slope change} = \frac{(x - \bar x)\,e}{(1 - h)\sum(x_i - \bar x)^2} = \frac{10 \cdot 2}{0.899 \cdot 1000} \approx 0.022.
$$

**Follow-up.** *Why does this matter computationally?* The same formula gives the full leave-one-out cross-validation error from a single fit, by dividing each residual by $1 - h_i$.

**Why it matters.** One observation with large $x$ can drive the slope, and its residual is small because the line has moved towards it. So look at leverage and not only at residuals. On return data this means the crash days. Check that the sign survives without them, or limit the regressor itself, by winsorising $x$ or using a bounded-influence fit. A Huber loss alone will not do it, since it caps large residuals, and a high-leverage point can have a small one.

**Question 18.27 ★★★ QR, QT, DS • hedge fund, bank, market maker • experienced.**

The true model is $y = x + u$, and $x = z + u + v$, where $z$, $u$ and $v$ are independent with unit variance. So $x$ is correlated with the error $u$. What slope does OLS of $y$ on $x$ give in a large sample? How do you use $z$ to get the true slope? What goes wrong if $z$ is only weakly related to $x$?

**Answer to Question 18.27.**

OLS gives $4/3$, not 1. The instrument gives $\mathrm{Cov}(z, y)/\mathrm{Cov}(z, x) = 1$. A weak instrument gives a very wide estimate, biased towards OLS.

OLS has slope $\mathrm{Cov}(x, y)/\mathrm{Var}(x)$. Here $\mathrm{Var}(x) = 3$, and $\mathrm{Cov}(x, y) = \mathrm{Var}(x) + \mathrm{Cov}(x, u) = 3 + 1 = 4$, so $4/3$: $x$ and the error move together, and the regression gives $x$ the credit.

The variable $z$ is an instrument: it moves $x$, and it has no other route to $y$. Then $\mathrm{Cov}(z, y) = \beta\,\mathrm{Cov}(z, x)$, since $z$ is uncorrelated with $u$. So $\beta = \mathrm{Cov}(z, y)/\mathrm{Cov}(z, x) = 1/1 = 1$. Two-stage least squares gives the same number: regress $x$ on $z$, then $y$ on the fitted values. But if you do that by hand, the second-stage standard errors are wrong, because they use the wrong residuals.

With a weak instrument, the denominator is close to zero and noisy, and a small error in it moves the ratio a lot. In a simulation with $x = 0.1\,z + u + v$ and 200 observations, the median estimate is pulled well above 1 towards the OLS value, and the spread is very wide. Always look at the first-stage regression.

**Why it matters.** A regression of returns on order flow has this problem: prices and flow respond to the same news. Estimating price impact by plain OLS overstates it, since informed flow comes with moves it did not cause. Use flow that is unrelated to news, such as index-rebalance trades or a randomised execution schedule, as an instrument.

**Question 18.28 ★★★ QR, QT, DS • hedge fund, market maker • junior, experienced.**

You fit an OLS regression with 20 regressors on 1 000 observations, and the true $R^2$ of the best linear predictor is 1%. Roughly what $R^2$ should you expect out of sample, measured against predicting the true mean? How much data would you need for the out-of-sample $R^2$ to reach zero?

**Answer to Question 18.28.**

Expect about $-1\%$, a negative number. You need about 1 980 observations before the out-of-sample $R^2$ reaches zero.

With $p$ estimated coefficients and $n$ observations, each coefficient has an estimation error, and the error of the prediction grows accordingly. With well-behaved regressors, the out-of-sample mean squared error is approximately the noise variance times $(1 + p/n)$. With a total variance of 1, the noise variance is $1 - R^2$, so

$$
R^2_{\text{oos}} \approx R^2 - \frac{p}{n}(1 - R^2) = 0.01 - 0.02 \cdot 0.99 \approx -0.0098 .
$$

The in-sample $R^2$ of the same fit is about 3%, since it adds $p/n$ rather than subtracting it. Setting the out-of-sample figure to zero gives $n \approx p(1 - R^2)/R^2 = 1980$. For one regressor the break-even is just 99 observations.

**Classic wrong answer.** “The true relation is positive, so the fit must beat the mean.” A real but weak signal, estimated with too many coefficients, loses to the plain average. Its estimation error is larger than its signal.

**Why it matters.** This is the most common reason for a backtest that fails in live trading even with no bug in sight. The fix is to reduce $p$ or to shrink: ridge costs a little bias and removes a large part of the $p/n$ term.

**Question 18.29 ★★★★ QR, QT • hedge fund • experienced.**

Consider $r_{t+1} = \beta x_t + u_{t+1}$ and $x_{t+1} = \rho x_t + v_{t+1}$, where $\beta = 0$, $\rho = 0.95$, the shocks $u$ and $v$ have unit variance and correlation $-0.9$, and you have 120 observations. You regress $r_{t+1}$ on $x_t$ with an intercept. Roughly what is the mean of the estimated slope? You test $\beta = 0$ against $\beta > 0$ with the usual $t$-statistic at a nominal 5% level. Does the test reject more or less often than 5%, and roughly how often?

**Answer to Question 18.29.**

The mean slope is about $+0.03$, even though the truth is 0. The test rejects far too often: about 16% of the time, not 5%.

This is the Stambaugh bias. The regressor $x_t$ is uncorrelated with the next shock, but it is not exogenous: it depends on past values of $u$ through $v$. Write $u_t = \gamma v_t + w_t$, with $w$ independent of $v$ and $\gamma = \mathrm{Cov}(u, v)/\mathrm{Var}(v) = -0.9$. The slope of $v_{t+1}$ on $x_t$ is exactly $\hat\rho - \rho$, so

$$
\hat\beta - \beta = \gamma(\hat\rho - \rho) + (\text{slope on } w),
$$

and the last term has mean zero.

So the error in $\hat\beta$ is the error in the persistence estimate, multiplied by $\gamma$. Persistence is underestimated in short samples: the standard approximation is $E[\hat\rho - \rho] \approx -(1 + 3\rho)/T = -3.85/120 \approx -0.032$. So $E[\hat\beta] \approx (-0.9)(-0.032) \approx 0.029$. A seeded simulation gives a mean slope of $0.032$, a bias in $\hat\rho$ of $-0.035$, and a mean $t$-statistic of about $0.7$. The test rejects about 16% of the time. You can size this at the board. With $\mathrm{Var}(x) = 1/(1 - \rho^2) \approx 10.3$, the standard error is at least about $1/(3.2\sqrt{120}) \approx 0.029$, as large as the bias, so the $t$-statistic shifts up by at most about 1. On a normal approximation, a shift of $0.7$ to 1 moves the rejection rate from 5% to between $17\%$ and $26\%$. The simulated 16% is just below that range, since the mean shift is at the low end and the statistic’s spread is a little under 1.

**Why it matters.** This is the textbook setting for predicting returns with a valuation ratio such as the dividend yield: a price rise raises returns and lowers the ratio, so $\gamma$ is strongly negative, and the ratio is very persistent. Part of the evidence in such a regression is this bias. Reduce it by adjusting with an estimate of $\gamma(\hat\rho - \rho)$, or test with a null distribution from a simulation.

**Follow-up.** *The same bias appears when you fit mean reversion. What does it do?* It overstates the speed of reversion. With $\rho = 0.95$ the true half-life is $13.5$ periods. The mean estimate on 120 points, $\hat\rho \approx 0.915$, implies $7.8$.

**Question 18.30 ★★★★ QR, QT, DS • hedge fund, bank • experienced.**

$y = x_1 + \varepsilon$, so only $x_1$ matters. You observe $w = x_1 + n$, a noisy version of $x_1$ with noise variance $0.5$, along with a second variable $x_2$. Both $x_1$ and $x_2$ have unit variance, and their correlation is $0.8$, and $x_2$ has no effect on $y$ once $x_1$ is known. You regress $y$ on $w$ and $x_2$. What coefficients do you get in a large sample? What would you conclude about $x_2$, and what is the error?

**Answer to Question 18.30.**

The coefficients are about $0.42$ on $w$ and about $0.47$ on $x_2$. You would conclude that $x_2$ has a strong effect, and that is false. Its coefficient only reflects the noise in $w$.

Solve the normal equations in the population. Let $\rho = 0.8$ and $s^2 = 0.5$. Then $\mathrm{Var}(w) = 1 + s^2$, $\mathrm{Cov}(w, x_2) = \rho$, $\mathrm{Cov}(w, y) = 1$ and $\mathrm{Cov}(x_2, y) = \rho$, which gives

$$
\begin{pmatrix} 1 + s^2 & \rho \\ \rho & 1 \end{pmatrix}\begin{pmatrix} b_1 \\ b_2 \end{pmatrix} = \begin{pmatrix} 1 \\ \rho \end{pmatrix}.
$$

The solution is

$$
b_1 = \frac{1 - \rho^2}{1 + s^2 - \rho^2} = \frac{0.36}{0.86} \approx 0.42, \qquad b_2 = \frac{\rho\,s^2}{1 + s^2 - \rho^2} = \frac{0.4}{0.86} \approx 0.47.
$$

When $s^2 = 0$ the coefficient on $x_2$ is zero, as it should be. As $s^2$ grows, the regression trusts $w$ less and leans on $x_2$, because $x_2$ is a clean proxy for $x_1$. In the limit, $b_2$ goes to $\rho = 0.8$, the coefficient of $y$ on $x_2$ alone.

More data does not help. The bias stays while the standard error shrinks, so the $t$-statistic grows without limit. With 2 500 observations it is well above 8 in a simulation.

**Classic wrong answer.** Thinking that noise in one regressor affects only that regressor’s coefficient. The bias spreads to any correlated regressor.

**Why it matters.** This is how a new factor can “survive controls” while adding nothing. If the existing factor you control for is measured with noise, such as a stale book value or a noisy beta, any variable correlated with it will look significant.
