I am trying to recreate FIGURE 3.6 from Elements of Statistical Learning. The only information about the figure is included in the caption.

I am not clear on what the equation on the Y-axis means precisely.

My understanding is that β is a vector of length 31 with first 10 elements iid as N(0,0.4) and the other 21 elements being 0.

Then ˆβ(k) represents the coefficient estimates at step k in the stepwise regression. For example, in forward stepwise, after the first coefficient is added we would have ˆβ(k=1) which would be a vector of length 31 with the first element being the first coefficient estimate and the remaining 30 elements being 0. Then, sequentially, the remaining 30 coefficients would be estimated, updating this vector for each new coefficient.

At each step k we would calculate E||ˆβ(k)−β||2 by calculating ||ˆβ(k)−β||2 and averaging across the 50 repetitions.

What is the correct interpretation for this equation in this context?

**Answer**

*This answer is adapted from my comment above.*

Your understanding of the problem is correct in my opinion.

You can interpret the equation as the mean squared error of the estimated coefficients of the k-th model compared to the true coefficients, i.e. how close the k-th model is from the true model in terms of coefficients estimates.

As opposed to evaluating predictions, this metric will tell you how well you modelled the data-generating process.

**Attribution***Source : Link , Question Author : Seraf Fej , Answer Author : Guillem*