0
$\begingroup$

I have a theoretical model of the form $$y=kx$$ Say I experimentally measure the data pairs $(y,x)$, from which I want to determine the value of $k$. I am using the curve fitting feature of MS Excel (which I assume uses linear regression method). That is, I plot the $y$ data as a function of the $x$ data, and then apply a "linear" trendfit to the data plot to obtain the value for $k$. My data $(y,x)$ will undoubtedly have error (as discussed in answers and comments in this PSE post). In creating the curve fit, I have the option to set the y-intercept to zero, i.e., make the fitted line pass through the origin of the plot. This would be the result predicted by the theoretical model.

Alternatively, the curve fit can be made such that the y-intercept is the value the makes the best fit to the data, which would change the value determined for $k$.

Looking past the fact I am using MS Excel, what is the best practice for regressing data to find the parameter $k$? Should I force the regression to fit the data and the $y$-intercept at zero or not?

$\endgroup$
0

2 Answers 2

1
$\begingroup$

If you believe the model, you should find the slope by fitting $y=kx$. The least squares solution, for data with identical errors, is $k=\overline{xy} / \overline{x^2}$.

Should you believe the model? That is a totally different question. Don't get them confused. Calculating the $\chi^2$ would be a good place to start.

In any case you should not be using Excel for anything seriously scientific. Keep it for your expenses forms.

$\endgroup$
1
  • $\begingroup$ To clarify, if the model for voltage is $V=IR$, and we have the data as shown in this PSE post (physics.stackexchange.com/questions/55534/…), the fit should be made so that the y-intercept is zero and we find the best value for $R$ (which is the slope of the line to the data with y-intercept = 0)? $\endgroup$
    – Armadillo
    Commented Aug 10, 2021 at 19:27
1
$\begingroup$

If you are getting spring stretch data, the answer should be that you do not force the y intercept to be zero. For such data, new springs have some resistance to them that requires a small amount of force to be applied to them (e.g., a small hanging weight) before they will show any stretch. This is a real effect, is equivalent to an "overly compressed" spring, and is no doubt due to the spring manufacturing process. In addition, whether your process is stretching a spring or not, you should get data in the range that can verify if you are dealing with such an effect, and make sure that your mathematical model matches the experimental data.

$\endgroup$
7
  • $\begingroup$ Agreed, the question about what is the best practice for regressing data to solve for parameters is an interesting one. On one hand, the finite intercept regression might tell you something about the data, e.g., it suffers some form of experimental error or it is subject to phenomena not accounted for in the model you assume governs it (your 'overly compressed' spring example). On the other hand, if all you know is the one “theoretical” model, and you believe that model to be “true”, then it seems you should pick the zero-intercept option to be in alignment with the model... $\endgroup$
    – Armadillo
    Commented Aug 12, 2021 at 16:28
  • $\begingroup$ ...Likewise, if this option shows the fit to the model to be “poor”, then it points out there is something awry with your measurements. If you were a spring manufacturer and had to report the spring constant $k$, according to the model $y=kx$, would it be best practice to use the zero-intercept approach to find $k$ and then report the uncertainty associated with that $k$? $\endgroup$
    – Armadillo
    Commented Aug 12, 2021 at 16:30
  • $\begingroup$ @Armadillo, for the spring example, once a small amount of weight is added to a "compressed" spring, it follows Hooke's Law, which can be demonstrated by experiment. Therefore, there is nothing wrong with using the equation that actually represents that particular spring, especially if you are using that spring as an element of another experiment. $\endgroup$ Commented Aug 12, 2021 at 18:40
  • $\begingroup$ What if the y-intercept is a positive value? I.e., the best fit line shows that the spring is stretching when the force on the spring is zero. Do you still suggest I not force the y-intercept to be zero? $\endgroup$
    – Armadillo
    Commented Aug 27, 2021 at 16:07
  • $\begingroup$ @Armadillo, I think that you mean what if the y-intercept is negative (i.e., it takes compressive force to get the spring back to its original length and you are curve fitting spring length vs. stretching force). The answer depends on whether or not you are fitting the data to the spring's original length or the spring's stretched length. $\endgroup$ Commented Aug 27, 2021 at 17:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.