Home » excel » math – Exponential Regression: Translate mathematical notation to Excel syntax

math – Exponential Regression: Translate mathematical notation to Excel syntax

Posted by: admin May 14, 2020 Leave a comment

Questions:

I have a question on the Mathematics Stack Exchange site where I ask about generating an exponential regression equation.

One of the answers provides a mathematical solution to my problem. The solution is written in mathematical notation:

enter image description here

Unfortunately, I’m not a math wiz, and I’m having trouble translating the mathematical notation to Microsoft Excel syntax.

What would the math look like in Excel?

    +--------------+---------------+
    |    X (AGE)   | Y (CONDITION) |
    +--------------+---------------+
    |       0      |       20      |
    |       1      |       20      |
    |       2      |       20      |
    |       3      |       20      |
    |       4      |       20      |
    |       5      |       20      |
    |       6      |       18      |
    |       7      |       18      |
    |       8      |       18      |
    |       9      |       18      |
    |       10     |       16      |
    |       11     |       16      |
    |       12     |       14      |
    |       13     |       14      |
    |       14     |       12      |
    |       15     |       12      |
    |       16     |       10      |
    |       17     |        8      |
    |       18     |        6      |
    |       19     |        4      |
    |       20     |        2      |
    +--------------+---------------+
How to&Answers:

I can verify that your formula for a translates as follows into Excel:

=SUMPRODUCT(E2:E22,F2:F22)/SUMSQ(E2:E22)

where my E2:E22 is just your x and my F2:F22 is ln(21-y). It gives the same answer, 0.147233112, as doing an exponential fit and forcing the intercept to be zero (which corresponds to setting b=1 in

y-21=b*exp(ax)

as you can verify by taking logs).

The formula quoted is the same as the one mentioned here under Simple linear regression without the intercept term (single regressor)

So this begs the question of whether b should, in fact, be equal to 1 and this is outside the scope of the question.