Forum Discussion
Possible to duplicate LOGEST() function in powerBI
- Anonymous6 years ago
Hi there.
Mate, it looks like you'd like to fit to your data points a curve of this shape:
y(x) = b*m^xwhere b, m are unknown constants.
This problem becomes a standard linear regression problem when you transform both sides with a logarithm:
log(y(x)) = log(b*m^x) log(y(x)) = log(b) + log(m) * xNow you can treat log(y(x)) as your new y-value and put log(b) = C, log(m) = B. Hence, you want to estimate B, C. Once you have these, you can do the reverse to get b and m.
Your new linear regression equation is y' = Bx + C. Now just calculate the estimates of B and C by the standard formulas for linear regression in one variable.
Best
D
Hi there.
Mate, it looks like you'd like to fit to your data points a curve of this shape:
y(x) = b*m^x
where b, m are unknown constants.
This problem becomes a standard linear regression problem when you transform both sides with a logarithm:
log(y(x)) = log(b*m^x)
log(y(x)) = log(b) + log(m) * x
Now you can treat log(y(x)) as your new y-value and put log(b) = C, log(m) = B. Hence, you want to estimate B, C. Once you have these, you can do the reverse to get b and m.
Your new linear regression equation is y' = Bx + C. Now just calculate the estimates of B and C by the standard formulas for linear regression in one variable.
Best
D
This is super helpful, thank you!