How Can I Determine the Linearity of Experimental Curves in Statistics?

Click For Summary

Discussion Overview

The discussion revolves around determining the linearity of experimental curves in the context of statistics, specifically related to stepper motor step linearity. Participants explore methods to measure how closely a straight line fits the data from two different experimental curves at varying speeds.

Discussion Character

  • Homework-related
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant is unsure about the appropriate method to measure linearity and mentions confusion regarding the use of the ##R^2## value versus regression lines.
  • Another participant suggests that ##R^2## is a correlation coefficient that indicates the quality of the linear regression, implying that a high ##R^2## is desirable for demonstrating good linearity.
  • A different participant cautions that while ##R^2## can be useful, it may not fully capture the linearity of the data, especially in the presence of noise, and suggests analyzing residuals to assess linearity more thoroughly.
  • This participant proposes fitting a line, calculating residuals, and checking for patterns or normal distribution in the residuals as alternative methods to evaluate linearity.

Areas of Agreement / Disagreement

Participants express varying opinions on the best approach to determine linearity, with no consensus on a single method. Some emphasize the importance of ##R^2##, while others highlight the limitations of this measure and propose additional analyses.

Contextual Notes

There are unresolved aspects regarding the choice of regression type (linear, quadratic, cubic) and the interpretation of residuals in the context of linearity assessment.

roam
Messages
1,265
Reaction score
12

Homework Statement



I have two different experimental curves, and I would like to measure how closely a straight line fits each data, and which curve is more crooked. In statistics how can I measure this "linearity"?

By the way this is about stepper motor step linearity (ideally it has to be a straight line i.e. homogeneous step sizes). I am comparing the two plots made for two different speeds:

1582o3.jpg

Homework Equations

The Attempt at a Solution



I'm new to stats and I'm not sure what method to use. I'm very confused because some websites say I have to calculate the ##R^2## value, while others say I need a some kind of regression line. :confused:

So, if the linearity could somehow be determined from the equation of regression line, what kind of regression do I need to use (linear or quadratic, cubic, etc)? And how exactly do I determine linearity from that equation?

Any explanation is greatly appreciated.

P.S. I am using Matlab.
 
Physics news on Phys.org
roam said:
I'm very confused because some websites say I have to calculate the R2R^2 value, while others say I need a some kind of regression line.

I am not sure of the nomenclature, but I assume R2 is just a correlation coefficient, which in this case is a measure of how good the linear regression is. Two sides of the same coin.
 
  • Like
Likes   Reactions: roam
Borek said:
I am not sure of the nomenclature, but I assume R2 is just a correlation coefficient, which in this case is a measure of how good the linear regression is. Two sides of the same coin.

Thank you for the clarification. A high ##R^2## is what I think I will need to show good linearity.
 
R2 may be one way to do it but remember that is just a measure of how "far" away your linear fit is from the data (in the R2 it is squared to get rid of negative numbers and somehow normalized such that a perfect fit gets you a value of 1). You can have a lower R2 from noisy data which are still linear or from data which are not described well by a linear equation. What I would do is to fit a line, calculate the residuals, then either show the residuals are just noise with respect to the independent variable (this would just be a plot showing that there is no pattern to the residuals) or you can make a histogram/frequency plot of the residuals and show that they follow a gaussian/normal type of distribution.

It all depends on how far you want to go to show the linearity of your data (sometimes just plotting your line and data on the same graph is enough).
 
  • Like
Likes   Reactions: roam

Similar threads

Replies
3
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
7
Views
2K
  • · Replies 30 ·
2
Replies
30
Views
5K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 64 ·
3
Replies
64
Views
6K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 19 ·
Replies
19
Views
4K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 12 ·
Replies
12
Views
4K