Hi!
I had a problem when I was trying to fit some values into an equation using LINEST, it returned 0 for some coefficients. It clearly was different from the equation given by the trendline. I read from some forums that this was because of the precision limitation of excel however, I was able to discover some function somewhere that uses something like this
=MMULT(LINEST(D4:D8,(C4:C8-AVERAGE(C4:C8))^{1,2,3,4}),IFERROR(COMBIN({4;3;2;1;0},{4,3,2,1,0})*(-AVERAGE(C4:C8))^({4;3;2;1;0}-{4,3,2,1,0}),0))
This has been bugging me for 3 months already, my mathematics isn't that advanced so I learned about some simple matrix ideas just like getting the roots using Inverse Matrix and I used that instead to get the coefficients. It worked for some order however as I reached higher orders the discrepancy was more prominent. I have been trying to find the concept behind what the MMULT function is. I tried to separate the function into its parts. I noticed that he used LINEST to determine an equation of a line with respect to the deviations of the X's from the average, then he used some concept to rescale it back to the original value.
Can somebody shed some light on how this works or if that's not possible what concept is this in matrixes so I can read about it. It's been constantly passing my mind for 3 months already and I always think how he did it while doing other things. If there are other ways to get the coefficients that would be great too. Thanks!
I've attached the sample excel regarding my work
MMULT.xlsx
Bookmarks