Transformations of Variables
Transformations of Variables
Home Tutorials AP Statistics Stat Tables Stat Tools Calculators Books Help
Overview AP statistics Statistics and probability Matrix algebra
Planning a Study Transforming a variable involves using a mathematical operation to change its measurement scale.
Broadly speaking, there are two kinds of transformations.
Surveys
Experiments Linear transformation. A linear transformation preserves linear relationships between variables.
Therefore, the correlation between x and y would be unchanged after a linear transformation.
Anticipating Patterns
Examples of a linear transformation to variable x would be multiplying x by a constant, dividing x
Probability by a constant, or adding a constant to x.
Random variables
Nonlinear tranformation. A nonlinear transformation changes (increases or decreases) linear
Discrete variables relationships between variables and, thus, changes the correlation between variables. Examples
Continuous variables of a nonlinear transformation of variable x would be taking the square root of x or the reciprocal
Sampling distributions of x.
Statistical Inference In regression, a transformation to achieve linearity is a special kind of nonlinear transformation. It is a
Estimation nonlinear transformation that increases the linear relationship between two variables.
Estimation problems
Methods of Transforming Variables to Achieve Linearity
Hypothesis testing
There are many ways to transform variables to achieve linearity for regression analysis. Some common
Hypothesis tests
methods are summarized below.
Appendices
Practice Exam Method Transformation(s) Regression equation Predicted value ()
Notation y = b 0 + b 1x = b 0 + b 1x
Standard linear regression None
AP Statistics Formulas
Exponential model Dependent variable = log(y) log(y) = b0 + b1x = 10b0 + b1x
In practice, these methods need to be tested on the data to which they are applied to be sure that they
increase rather than decrease the linearity of the relationship. Testing the effect of a transformation
method involves looking at residual plots and correlation coefficients, as described in the following
sections.
Note: The logarithmic model and the power model require the ability to work with logarithms. Use a
graphic calculator to obtain the log of a number or to transform back from the logarithm to the original
number. If you need it, the Stat Trek glossary has a brief refresher on logarithms.
The best tranformation method (exponential model, quadratic model, reciprocal model, etc.) will depend
on nature of the original data. The only way to determine which method is best is to try each and
compare the result (i.e., residual plots, correlation coefficients).
A Transformation Example
Below, the table on the left shows data for independent and dependent variables - x and y, respectively.
When we apply a linear regression to the untransformed raw data, the residual plot shows a non-
random pattern (a U-shaped curve), which suggests that the data are nonlinear.
y 2 1 6 14 15 30 40 74 75
Suppose we repeat the analysis, using a quadratic model to transform the dependent variable. For a Buy Used: $18.95
Buy New: $89.99
quadratic model, we use the square root of y, rather than y, as the dependent variable. Using the
transformed data, our regression equation is:
Approved for AP Statistics and
where
Statistics & Probability with the
yt = transformed dependent variable, which is equal to the square root of y
TI-89
y't = predicted value of the transformed dependent variable yt Brendan Kelly
x = independent variable
b0 = y-intercept of transformation regression line
b1 = slope of transformation regression line
where
The residual plot (above right) shows residuals based on predicted raw scores from the transformation 5 Steps to a 5 AP Statistics,
regression equation. The plot suggests that the transformation to achieve linearity was successful. The 2010-2011 Edition (5 Steps to
pattern of residuals is random, suggesting that the relationship between the independent variable (x) a 5 on the Advanced
and the transformed dependent variable (square root of y) is linear. And the coefficient of determination Placement Examinations
was 0.96 with the transformed data versus only 0.88 with the raw data. The transformed data resulted in Series)
a better model. Duane Hinders
Problem
Solution
The correct answer is (C). A linear transformation neither increases nor decreases the linear relationship
List Price: $16.99
between variables; it preserves the relationship. A nonlinear transformation is used to increase the Buy Used: $0.01
relationship between variables. The most effective transformation method depends on the data being Buy New: $14.77
transformed. In some cases, a logarithmic model may be more effective than other methods; but it other
cases it may be less effective. Non-random patterns in a residual plot suggest a departure from linearity
in the data being plotted. Texas Instruments TI-83-Plus
Silver Edition
The contents of this webpage are copyright 2016 StatTrek.com. All Rights Reserved.