The Student Room Group

Maths - Regression Question?

Hi Everyone,

For a maths project I am doing, I have modelled some data using a cosine function and I wanted to have a quantitative way to know how well the model fits the data points. Can I find an r^2 value for a cosine graph, because I have read that it can only be used for linear regression. However, when I did a sine regression on Desmos it gave me an r^2 value.

Thanks in advance
Reply 1
Original post by Dotti22
Hi Everyone,

For a maths project I am doing, I have modelled some data using a cosine function and I wanted to have a quantitative way to know how well the model fits the data points. Can I find an r^2 value for a cosine graph, because I have read that it can only be used for linear regression. However, when I did a sine regression on Desmos it gave me an r^2 value.

Thanks in advance


Hi! I'm not very great at maths, but I'll move your question over to the maths section so you get replies from our maths geniuses :biggrin:
Reply 2
Original post by Amefish
Hi! I'm not very great at maths, but I'll move your question over to the maths section so you get replies from our maths geniuses :biggrin:


Thank you so much!
Original post by Dotti22
Hi Everyone,

For a maths project I am doing, I have modelled some data using a cosine function and I wanted to have a quantitative way to know how well the model fits the data points. Can I find an r^2 value for a cosine graph, because I have read that it can only be used for linear regression. However, when I did a sine regression on Desmos it gave me an r^2 value.

Thanks in advance


Yes, this will work fine - the "linear" in "linear regression" refers to linearity in the regression coefficients - the betas that you estimate, not in the functional forms of the covariates. You can fit linear combinations of any functions that you like using linear regression.

Quick Reply

Latest