How does adjusting the axes of a graph change the geometric angle of a regression line?

3.7k Views Asked by At

I know that you can adjust the scale of the x and y axes to change the geometric angle of a regression line. For example, if you plotted a regression line with slope of b=0.3, perhaps the default settings of axes length etc. would create a regression angle of 35 degrees. If you adjust the axes, you will change the angle the regression line makes with the x-axis so that it is greater or less than 35 degrees-WITHOUT changing the mathematical value of the slope--it will still stay as b=0.3. What systematic equation/set of equations is there that allows me to know how the geometric angle of the regression line will be changed as I change the axes of the graph itself?

The equation relating the angle of a line to the slope (angle = arctan(m)) seems 'oversimplified' because it doesn't take into account the dimensions of the axes. If you zscore a set of datapoints and plot the original data points in one graph and the zscore data points in another graph (in Matlab or Excel), the geometric angle of the two graphs will LOOK identical even though the slope of the line (the b from the regression) is different. According to the equation above (angle = arctan(m)), the angle should be different since the slope of the lines is different, but it's not. Clearly, excel or matlab is changing something about the scales to accommodate and make the angles appear the same, when in fact they should not be.

Thank you for your help.

2

There are 2 best solutions below

0
On

You should notice that transformations of axis can be expressed in this form:

$$ay = f \left ( bx \right )$$

Note that this will change the mathematical value of the slope, and that this is exactly what you want in order to find the angle between the line and the x-axis. If the slope is $m$, you get the angle as $$\theta = \arctan(m)$$

You can think of $a$ and $b$ as factors of contraction of the axis.

Now, let's call the plot of your function plot 1. What you want to do is to make a new function and a new plot, call it plot 2, which has proportional axes and a function called function 2, at first equal to function 1. You have to find the relation between the axes of plot 1 and plot 2, and apply those transformations to your the second function, function 2. Your second function will now look exactly like the first one, but with proportionnal axes.

Then, if you find the angle between the second function and its x-axis, it will be exactly the same as the geometric angle between your first function and its axes. Do this using the formula above.

0
On

If I understand your question, you're saying "If I stretch the $x$-axis of my graph paper, but leave the labels the same, then the calculated slope of the line will change, but the angle on the stretched page will change. How can I know by how much it'll change?"

Well, this is then a problem that has nothing to do with regression. You're really asking "If, on axes with equal 'unit lengths' on the two axes, I have a line of slope $m$, and I scale the $x$-axis unit so that it becomes $c$ times the $y$-axis unit, what will the slope of the transformed line be?"

Solution: let's look at a particularly simple line, namely $$ y = m x $$ which passes through $(0,0)$ and $(1, m)$. The angle it makes with the $x$-axis is $$\theta = \tan^{-1}(m)$$.

When you scale the $x$-axis, the origin remains fixed, but the point $(1, m)$ moves to a location that, on the old graph paper, would be $(c, m)$. The resulting angle to the $x$-axis (which we have to compute using the same units on both axes, i.e., using something like the old graph paper) is therefore $$\theta' = \tan^{-1}(m/c)$$.

In general, to find $\theta'$ from $\theta$, you do this: $$ \theta' = \tan^{-1}(\frac{\tan(\theta)}{c} ), $$ or $$ \theta' = \arctan(\frac{\tan(\theta)}{c} ), $$ which is the same thing using a different notation for the inverse tangent function.