AFAIK, there are two basic type of linear regression:(adsbygoogle = window.adsbygoogle || []).push({});

y=ax+b and y=a^{2}+ bx + c

But I have to do the same with the function y = asin(x)+bcos(x).

Here is what I have done:

We have:

[tex]

\begin{array}{l}

\frac{{\partial L}}{{\partial a}} = 0

\frac{{\partial L}}{{\partial b}} = 0[/tex]

Continue:

[tex]

\begin{array}{l}

\frac{{\partial L}}{{\partial a}} = \sum\limits_{i = 1}^n {2\left[ {fi - \left( {a\sin (\frac{{\pi x}}{2}) + b\cos (\frac{{\pi x}}{2})} \right)} \right]\left( { - \sin (\frac{{\pi x}}{2})} \right)}

\frac{{\partial L}}{{\partial b}} = \sum\limits_{i = 1}^n {2\left[ {fi - \left( {a\sin (\frac{{\pi x}}{2}) + b\cos (\frac{{\pi x}}{2})} \right)} \right]\left( {\cos (\frac{{\pi x}}{2})} \right)}

\end{array}[/tex]

At last, I have:

[tex]

\left( {\begin{array}{*{20}c}

{\sin ^2 \left( {\frac{{\pi x}}{2}} \right)} & {\sin \left( {\frac{{\pi x}}{2}} \right)\cos \left( {\frac{{\pi x}}{2}} \right)} \\

{\sin \left( {\frac{{\pi x}}{2}} \right)\cos \left( {\frac{{\pi x}}{2}} \right)} & {\cos ^2 \left( {\frac{{\pi x}}{2}} \right)} \\

\end{array}} \right)\left( \begin{array}{l}

a \\

b \\

\end{array} \right) = \left( \begin{array}{l}

fi\sin \left( {\frac{{\pi x}}{2}} \right) \\

fi\cos \left( {\frac{{\pi x}}{2}} \right) \\

\end{array} \right)

[/tex]

What I have to do now? Please suggest me with this situation.

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Least-squares estimation of linear regression coefficients

Loading...

Similar Threads - Least squares estimation | Date |
---|---|

A Confused about Weighted Least Squares | Jan 27, 2018 |

I Shaky model in least squares fit | Jun 16, 2017 |

I Hessian of least squares estimate behaving strangely | Aug 6, 2016 |

The linear in linear least squares regression | Jul 28, 2015 |

Proof of least Squares estimators | May 13, 2009 |

**Physics Forums - The Fusion of Science and Community**