Data Management

Transform Means and Spread Under an Affine Conversion

Write the transformation as an equation

An affine conversion has the form y = a×x + b, where a is a scale factor and b is an offset. Record both values, their units, and the reason for the transformation. Confirm that the same rule applies to every observation represented by the supplied summary.

This guide focuses on transforming statistical summaries once that rule is justified. It does not establish that two instruments measure the same construct or that a clinical conversion is valid. Those questions belong in the measurement and unit-harmonization review before any arithmetic is applied.

Transform location and variability differently

The transformed mean is a times the original mean plus b. The SD is multiplied by the absolute value of a, and the variance by a². The offset b does not change the distances between observations, so it does not get added to the SD or variance.

These identities follow from centering each transformed observation around its transformed mean. The official R SD documentation specifies the sample convention with denominator n−1. Keeping that convention consistent lets a raw-data calculation check the transformed summaries.

Verify a fictional three-value sample

Take fictional observations 10, 20, and 30. Their mean is 20, sample SD is 10, and sample variance is 100. Under y = 2x + 5, the observations become 25, 45, and 65, with mean 45, SD 20, and variance 400.

Under y = −2x + 5, they become −15, −35, and −55. The mean is −35, while SD remains 20 and variance remains 400. Negative scaling changes direction; it cannot make an SD negative. The affine conversion tool illustrates these summary transformations for a supplied nonzero slope.

Preserve interval and relationship meaning

When transforming an interval, apply the equation to both endpoints and reorder them if a is negative. For an original interval from 10 to 30 and y = −2x + 5, the ordered transformed interval is −55 to −15. Merely transforming the lower endpoint and retaining its label would reverse the interval.

For relationships between variables, an offset leaves covariance unchanged, while scaling one variable by a multiplies its covariance with another variable by a. These extensions require the appropriate joint information; a mean and SD alone cannot recover a covariance. Do not imply that the demonstration tool estimates relationships from marginal summaries.

Keep the original summaries, equation, transformed results, and rounding policy together in the analysis record. Verify a small synthetic example and, when possible, compare against transforming the raw observations. Finish by updating labels and units consistently so a correctly calculated number is not displayed under the original scale's heading.

Source checked on 4 November 2026; fictional transformed samples independently recalculated.

Related reading

Reading path: Prepare data. Guide 1 of 14. Choose any guide to suit your project.

Data Management

Track Complete-Case Denominators for Each Planned Model

Explain why adding a variable changes the usable sample and distinguish sample changes from covariate adjustment.

Data Management

Audit Missingness Patterns Across Variables

Count overlapping missing fields at the record level before summarizing complete and incomplete observations.

Browse this reading pathTools for this stageGuides and downloads for this stage