08-02-2019, 07:17 PM
The mean is the average of the numbers or in other words \(\bar{x} = \displaystyle \frac{1}{n}\displaystyle\sum_{k=1}^{n}x_k\)
How may I derive this simple formula using the Least Squares Method on an HP Prime?
I get quite close to it
\(\displaystyle \frac{\partial \displaystyle \sum_{k=1}^{n}(x(k)-m)^2}{\partial m} = sum(-2*(x(k)-m),k,1,n)\)
alas neither FNROOT nor solve are of much help for the last algebraic step. What do I wrong?
Another problem I was not able yet to solve on an HP Prime: How to prove which of the roots of a quadratic equation is the correct one. It's about orthogonal linear regression (sorry for the link to Wikipedia in german, but I could not find similar in English -- but honestly, the formulas are international), the Least Squares Method is applied to find both coefficients, where for m there are two solutions. One may be eliminated by fiddling out the sign of thethird second derivative at the roots (or one root at least). I did so using Reduce, but all I tried so far on a Prime failed.
So in both cases it is not about the result, I'd like to know how to get there using a Prime.
TIA
Hans
How may I derive this simple formula using the Least Squares Method on an HP Prime?
I get quite close to it
\(\displaystyle \frac{\partial \displaystyle \sum_{k=1}^{n}(x(k)-m)^2}{\partial m} = sum(-2*(x(k)-m),k,1,n)\)
alas neither FNROOT nor solve are of much help for the last algebraic step. What do I wrong?
Another problem I was not able yet to solve on an HP Prime: How to prove which of the roots of a quadratic equation is the correct one. It's about orthogonal linear regression (sorry for the link to Wikipedia in german, but I could not find similar in English -- but honestly, the formulas are international), the Least Squares Method is applied to find both coefficients, where for m there are two solutions. One may be eliminated by fiddling out the sign of the
So in both cases it is not about the result, I'd like to know how to get there using a Prime.
TIA
Hans