Tutorials › Exam SRM - Statistics for Risk Modeling › Effects of Changing Measurement Units

Exam SRM · Simple Regression Foundations · Tutorial 21 of 926

Effects of Changing Measurement Units

Track how consistent changes in measurement units alter regression coefficients and uncertainty without changing the underlying fitted relationship.

Beginner 11 min read

What You'll Learn

  • Transform a simple linear regression when the predictor is rescaled
  • Transform the intercept and slope when the response is rescaled
  • Calculate the resulting changes in residuals and error variance
  • Verify that fitted responses are preserved after consistent conversions
  • Recognize how predictor shifts differ from changes in scale
  • Avoid common errors involving reciprocal conversion factors

Why Measurement Units Matter

A regression equation describes a relationship using numerical measurements, so its coefficients depend on the units in which those measurements are recorded. A slope stated as dollars per day will have a different numerical value from the same slope stated as dollars per week. That change does not, by itself, mean the relationship has changed.

The key is to distinguish the numerical coefficients from the fitted relationship. If units are converted consistently, fitted responses represent the same quantities in the same response units, or the corresponding converted quantities if the response unit changes too. This tutorial develops those transformations for simple linear regression.

Model and assumptions: For fixed observed predictor values \(x_1,\ldots,x_n\), suppose \(Y_i=\beta_0+\beta_1x_i+\varepsilon_i\), where the errors are independent, have mean zero, and have common variance \(\sigma^2\). When a normal-error distribution is specified, the additional assumption is \(\varepsilon_i\sim N(0,\sigma^2)\). The ordinary least-squares (OLS) line includes an intercept and minimizes the sum of squared residuals.

Write the fitted line as \(\hat{Y}_i=\hat{\beta}_0+\hat{\beta}_1x_i\), with residual \(e_i=Y_i-\hat{Y}_i\). A predictor unit conversion changes the numerical values of the \(x_i\)'s. A response unit conversion changes the numerical values of the \(Y_i\)'s. The formulas below describe what happens when the same observations are used and the conversions are applied consistently.

Rescaling the Predictor

Suppose the predictor is changed from \(x\) to \(x^*=cx\), where \(c\ne 0\), while the response remains in its original units. For example, converting dollars to thousands of dollars means multiplying each numerical dollar value by \(1/1000\). If the original relationship is \(Y=\beta_0+\beta_1x+\varepsilon\), substitute \(x=x^*/c\):

$$ Y=\beta_0+\frac{\beta_1}{c}x^*+\varepsilon. $$

Thus the intercept stays the same and the slope is divided by \(c\). Since this conversion changes only the predictor values, the response values and their fitted values do not change.

Worked Example: Converting a Predictor to Thousands of Dollars

A hypothetical model relates an account balance \(x\), measured in dollars, to a monthly fee \(Y\), measured in dollars: \(Y=12+0.08x+\varepsilon\). Assume the predictor values are fixed and the errors are independent with \(\varepsilon_i\sim N(0,25)\), so the error variance is \(25\) dollars squared. There is no interest-rate or mortality assumption in this regression example. Rewrite the model when the account balance is recorded in thousands of dollars, and find the fitted fee for a balance of $250.

Method. Let \(x^*=x/1000\), so \(c=1/1000\) and \(x=1000x^*\). Substitute into the original fitted relationship:

$$ 12+0.08x=12+0.08(1000x^*)=12+80x^*. $$

The transformed intercept is \(12\), and the transformed slope is \(80\) dollars of monthly fee per thousand dollars of account balance. The error is unchanged, so its variance remains \(25\) dollars squared.

For a $250 balance, \(x^*=250/1000=0.25\). The transformed fitted fee is \(12+80(0.25)=12+20=32\) dollars. Directly in the original units, it is \(12+0.08(250)=12+20=32\) dollars. The two calculations agree. The common mistake is to divide the slope by 1000; here the predictor was multiplied by \(1/1000\), so the slope is divided by \(1/1000\), which multiplies it by 1000.

Rescaling the Response

Now suppose the response is rescaled to \(Y^*=aY\), where \(a\ne 0\), while the predictor is unchanged. Multiplying the original model by \(a\) gives

$$ Y^*=a\beta_0+a\beta_1x+a\varepsilon. $$

The intercept and slope are both multiplied by \(a\). Residuals are also multiplied by \(a\); consequently, their squared sum and the error variance are multiplied by \(a^2\). For example, when a response is converted from dollars to thousands of dollars, \(a=1/1000\), so a variance measured in dollars squared is divided by \(1{,}000{,}000\).

Worked Example: Converting Fees from Dollars to Thousands

A hypothetical regression uses \(x\), the number of service days, to predict a fee \(Y\) in dollars. Its fitted line is \(\hat{Y}=200+3.5x\). For four observations at \(x=0,1,2,3\), the residuals in dollars are \(30,-30,-30,30\). Assume fixed predictor values and independent normal errors with mean zero and variance \(\sigma^2\), where \(\sigma^2\) is unknown. There is no interest-rate or mortality assumption. Express the fitted line and residuals in thousands of dollars, and calculate the residual estimate of error variance before and after conversion.

Method. Define \(Y^*=Y/1000\), so \(a=0.001\). The intercept becomes \(0.001(200)=0.2\) thousand dollars, and the slope becomes \(0.001(3.5)=0.0035\) thousand dollars per service day. Therefore, \(\hat{Y}^*=0.2+0.0035x\).

For example, at \(x=12\), the original fitted value is \(200+3.5(12)=200+42=242\) dollars. The converted fitted value is \(0.2+0.0035(12)=0.2+0.042=0.242\) thousand dollars, or \(242\) dollars. Each residual is multiplied by \(0.001\), giving \(0.03,-0.03,-0.03,0.03\) thousand dollars.

The original residual sum of squares is \(30^2+(-30)^2+(-30)^2+30^2=3600\) dollars squared. With \(n=4\) observations and two estimated coefficients, the usual residual estimate is \(\hat{\sigma}^2=3600/(4-2)=1800\) dollars squared. In the converted units, the residual sum of squares is \(4(0.03^2)=0.0036\) thousand-dollars squared, so \(\hat{\sigma}^{*2}=0.0036/2=0.0018\) thousand-dollars squared. Since one thousand-dollars squared equals \(1{,}000{,}000\) dollars squared, \(0.0018\) thousand-dollars squared equals \(1800\) dollars squared. The values are consistent; the common mistake is to compare variance numbers without converting the squared units.

Changing Both Units

A general scale conversion can change predictor and response units together. Let \(x^*=cx\) and \(Y^*=aY\), with \(a\ne0\) and \(c\ne0\). Substitution gives the transformed model and its coefficients:

$$ Y^*=(a\beta_0)+\left(\frac{a\beta_1}{c}\right)x^*+a\varepsilon. $$

The fitted responses in the new response units are \(a\) times the original fitted responses. The transformed residuals are \(a e_i\), and the transformed error variance is \(a^2\sigma^2\). Predictor rescaling alone does not change the residuals or error variance; response rescaling does.

Worked Example: Converting Days to Weeks and Dollars to Hundreds

A hypothetical model predicts a payment \(Y\) in dollars from a duration \(x\) in days: \(Y=50+14x+\varepsilon\). Assume fixed predictor values and independent errors \(\varepsilon_i\sim N(0,4900)\); thus the error variance is \(4900\) dollars squared. There is no interest-rate or mortality assumption. Convert the predictor to weeks, the response to hundreds of dollars, and check the fitted payment at 21 days.

Method. Set \(x^*=x/7\), so \(c=1/7\), and \(Y^*=Y/100\), so \(a=1/100\). The transformed intercept is \(a\beta_0=50/100=0.5\) hundreds of dollars. The transformed slope is \((a/c)\beta_1=(0.01/(1/7))(14)=0.07(14)=0.98\) hundreds of dollars per week. The transformed error variance is \(a^2\sigma^2=(0.01)^2(4900)=0.0001(4900)=0.49\) hundreds-of-dollars squared.

At 21 days, \(x^*=21/7=3\) weeks. The original fitted payment is \(50+14(21)=50+294=344\) dollars. The transformed fitted payment is \(0.5+0.98(3)=0.5+2.94=3.44\) hundreds of dollars, which equals \(344\) dollars. Both the predictor and response conversions are needed: applying only one part of the transformation would give coefficients or fitted values in inconsistent units.

Why the OLS Coefficients Transform This Way

The substitution argument explains the transformed model. The same result follows directly from the least-squares formulas, which also shows why the fitted relationship is preserved. Let \(\bar{x}\) and \(\bar{Y}\) be the sample means, \(S_{xx}=\sum_i(x_i-\bar{x})^2\), and \(S_{xY}=\sum_i(x_i-\bar{x})(Y_i-\bar{Y})\). For an OLS line with an intercept, \(\hat{\beta}_1=S_{xY}/S_{xx}\) and \(\hat{\beta}_0=\bar{Y}-\hat{\beta}_1\bar{x}\).

1
Transform the centered sums.
With \(x_i^*=cx_i\) and \(Y_i^*=aY_i\), the means are \(\bar{x}^*=c\bar{x}\) and \(\bar{Y}^*=a\bar{Y}\). Therefore \(S_{x^*x^*}=c^2S_{xx}\), while \(S_{x^*Y^*}=acS_{xY}\).
2
Transform the slope.
The OLS slope in the new units is \(S_{x^*Y^*}/S_{x^*x^*}=(acS_{xY})/(c^2S_{xx})=(a/c)\hat{\beta}_1\).
3
Transform the intercept and residuals.
The new intercept is \(a\bar{Y}-(a/c)\hat{\beta}_1(c\bar{x})=a(\bar{Y}-\hat{\beta}_1\bar{x})=a\hat{\beta}_0\). Substituting the transformed coefficients into each fitted value gives \(\hat{Y}_i^*=a\hat{Y}_i\), so \(e_i^*=Y_i^*-\hat{Y}_i^*=ae_i\).

It follows that \(\sum_i(e_i^*)^2=a^2\sum_i e_i^2\). With an intercept and one predictor, the usual estimate of error variance is \(\hat{\sigma}^2=\sum_i e_i^2/(n-2)\), provided \(n>2\). The denominator does not change when the units change, so \(\hat{\sigma}^{*2}=a^2\hat{\sigma}^2\). This derivation assumes the same observations and an OLS fit with an intercept; a different fitting procedure or a different set of observations need not obey these coefficient formulas.

Scale Changes Versus Shifts

Some unit conversions include an additive shift as well as a scale change. For example, a temperature conversion has both. To keep the result precise, write \(x^*=cx+d\) and \(Y^*=aY+b\). Substituting \(x=(x^*-d)/c\) into the original model gives

$$ Y^*=\left(a\beta_0+b-\frac{a\beta_1d}{c}\right) +\frac{a\beta_1}{c}x^*+a\varepsilon. $$

Thus a predictor shift changes the intercept as well as the slope, whereas a response shift adds \(b\) to the intercept. A pure rescaling has \(d=0\) and \(b=0\), the case emphasized above. The error variance is still multiplied by \(a^2\); adding a constant to every response does not change residuals.

A common error is to change the numerical values but keep the original coefficients. For instance, if \(x^*=x/7\), then a slope expressed per day cannot be used unchanged with a predictor expressed in weeks. Check the units of the slope: the coefficient must have units of response per unit of predictor. A second useful check is to substitute one predictor value into both the original and transformed equations and verify that the resulting fitted responses agree after conversion.

Key takeaway: Under \(x^*=cx\) and \(Y^*=aY\), the intercept becomes \(a\hat{\beta}_0\), the slope becomes \((a/c)\hat{\beta}_1\), residuals become \(ae_i\), and error variance becomes \(a^2\sigma^2\). If only the predictor is rescaled, fitted responses and error variance in the original response units are unchanged.

Check Your Understanding

For each problem, identify the unit conversion before calculating. The final answers use the transformed units stated in the question.

  1. A hypothetical model predicts a charge in dollars from distance \(x\) in miles: \(\hat{Y}=5+2x\). The predictor is changed to \(x^*=x/60\), measured in hours at a constant 60 miles per hour. Find the transformed line and the fitted charge for 90 miles. (Answer: \(\hat{Y}=5+120x^*\); at 90 miles, \(x^*=1.5\) hours and the fitted charge is $185.)
  2. A regression in dollars has fitted line \(\hat{Y}=80+6x\) and estimated error variance \(250{,}000\) dollars squared. Convert the response to thousands of dollars. Give the transformed line and error variance. (Answer: \(\hat{Y}^*=0.08+0.006x\); \(\hat{\sigma}^{*2}=0.25\) thousand-dollars squared.)
  3. A predictor is transformed by \(x^*=2x+5\), while the response is unchanged. The original fitted line is \(\hat{Y}=9+4x\). Find the transformed line and fitted value when \(x=3\). (Answer: \(\hat{Y}=-1+2x^*\); at \(x=3\), \(x^*=11\) and the fitted value is \(21\).)
  4. A model in dollars and days is \(\hat{Y}=12-3x\), with error variance \(16\) dollars squared. Define \(x^*=x/4\) and \(Y^*=2Y\). Find the transformed line and error variance. (Answer: \(\hat{Y}^*=24-24x^*\); \(\hat{\sigma}^{*2}=64\) squared response units.)
  5. A regression has original line \(\hat{Y}=40+5x\). Use \(x^*=x/10\) and \(Y^*=Y/100\). For \(x=20\), calculate the transformed coefficients and verify the fitted response in both units. (Answer: \(\hat{Y}^*=0.4+0.5x^*\); at \(x^*=2\), the fitted response is \(1.4\) hundreds of the original response unit, equal to \(140\) original units.)
Clinical Biostats