# Clarification on Prediction with a Regression Model using Centered Variables

As I understand it, for a regression model, centering the variables around their means can be helpful since it makes the intercept term the expected value of $Y_i$ when the predictor variables are set to their means. So let's say I do a regression using centered variables and obtain coefficients $\beta_i$ and an intercept $\alpha$. If I wished to do prediction on out-of-sample data, can I directly use these coefficients or do I need to use coefficients obtained from running a regression on non-centered data? Thanks!

That is, if you fit a regression with the predictor $X' = X - \bar X$, where $\bar X$ is the mean of the sample you used to fit the regression (aka the "training sample"), you need to subtract the old $\bar X$ from new observations before making predictions.