I am feeling very inept at the moment, as I have forgotten how to solve for y=x in a linear regression. By this, I mean the value of x and y in y=mx+b should be equal. I can use solver in Excel, but my method feels like a Rube Goldberg way of going about it. I turned 40 last week, which means I will defer to senility on this problem.
EDIT: I feel that it isn't particularly informative to add context, as the solution would be the same for any linear regression. Additionally, it does not require complex notation. However, for the sake of compliance, here we go:
I exposed stone to heat. The stone lost mass during the heating process, which resulted in a net loss of density.
For each specimen, I plotted the initial density as the independent variable (x axis) and the post-treatment density as the dependent variable (y axis). The linear regression that results is y=1.0999x-0.263, where y is the post-treatment density and x is the initial density.
The regression predicts an initial density at which no change would be expected after exposure to heat. In other words, I want to find the value of x that will result in an identical value of y.
In Excel, I used an overly-complex way to arrive at the answer using Solver. The ideal mineralogical density of the stone I was working with is 2.65 g/cm^3. Here is what I did:
Cell A1: 2.65 (I used this as the seed for Solver because it seems to perform better with a seed value. Call me crazy.)
Cell A2: (A1+0.263)/1.0999
Cell B2: 1.0999*A1-0.263
Cell B3: A2-B2
I asked solver to find the value of cell A1 that will result in a value of 0 in cell B3. Unfortunately, I don't have a high school algebra student around to refresh my memory on how to do this with a pencil and paper.
Given any line of the form $y = mx+b$, if we want to find where it intersects the line $y = x$ (meaning $y$ and $x$ are the same at that point), we just have to solve the equation $y = mx+b = x$, and we obtain \begin{align} mx + b =x &\implies b = x-mx\\ &\implies b = x(1-m)\\ &\implies \frac{b}{1-m} = x, \end{align} and so we conclude that on the line $y = mx+b$, we have $x$ and $y$ equal when $x = \frac{b}{1-m}$. Of course this shows that we need $m\neq1$, which makes sense since otherwise our line will be parallel to $y=x$, and in that case either every single input is equal to its output, or none of them are.