Method of Least Squares Linear Fitting

In summary: so if you try to fit the equation to the data points around t=50, it should give you a pretty good approximation.
  • #1
Defennder
Homework Helper
2,593
5

Homework Statement



An experiment was conducted on a liquid at varying temperatures and the volume obtained at the differing temperatures are as follows:

Code:
V/cm3	θ/oC
1.032	10
1.063	20
1.094	29.5
1.125	39.5
1.156	50
1.186	60.5
1.215	69.5
1.244	79.5
1.273	90
1.3	99

Assume that [tex] V = 1 + B\theta + D\theta^2[/tex] , where B and D are constants.

Question: Linearize the above equation and plot the corresponding curve.


Homework Equations



Microsoft Excel LINEST function, Least squares method statistical equations (too many to post)

The Attempt at a Solution



Here's what I understand about linear least squares fitting. I attended a lab session where I was taught how to apply the least squares method in Excel to linearize a given equation and then use mbest and cbest to calculate the other unknown constants in the equation. My understanding is that firstly one takes the equation, and tries to express it, in any mathematical way possible in the form y=mx + c, where y is the dependent variable and x the independent variable. Hence while the y does not have to be the same independent variable as measured directly in the experimental setup, x has to be the same. Hence the resulting linearized equation cannot use expressions of x which are functions of x expressed in ways apart from simply x. eg. x^2 is not allowed, ln x is not allowed.

Is this understanding correct? If so, then how is it possible for me to linearise the above given equation? I only got as far as:

[tex]\theta + \frac{B}{2D} = \sqrt{ \frac{V-1}{D} + (\frac{B}{2D})^2 [/tex]


which should suggest (or at least it does to me) that mbest in Excel using the LINEST function should be 1, since the coefficient of θ is 1. But instead I get 0.003004423, which means I have somehow linearized the equation wrongly. How else could it have been linearized?

EDIT: I didn't quite get what it means by "plot the corresponding curve". I assume this involves using Excel, but apart from using as source data the values of V and theta from the table, what else could it mean?
 
Last edited:
Physics news on Phys.org
  • #3
I also got same value, 0.003004423*x+1.00

I instead used http://www.padowan.dk/graph/Download.php
it much more better than excel! give it a try.


A method to linearlize any equation
dV/dt = 2Dt+B
find dV/dt when t = 50 [almost middle point]

and so
y-1.156 = (dV/dt)[t-50]!
 
  • #4
learningphysics said:
Have a look at example 1 here:

http://ceee.rice.edu/Books/CS/chapter3/data34.html

Hope it helps.
Well, I've certainly haven't seen this approach before, but I don't see how relevant it is to my question. In the link you provided, there isn't any equation to linearize to start with, unlike in mine. The LINEST Excel function gives a straight line with R^2 = 0.9996, indicating a very close fit if the constant D is real close to 0. Without having to linearize V = 1 + B(theta) D(theta)^2, I could probably do the question simply by using MS Excel LINEST function. But the problem arises when I try to obtain a best fit line for the data from Excel as shown in my first post and obtain a gradient mbest which contradicts what I get from linearizing the equation directly.

rootX said:
I also got same value, 0.003004423*x+1.00

I instead used http://www.padowan.dk/graph/Download.php
it much more better than excel! give it a try.


A method to linearlize any equation
dV/dt = 2Dt+B
find dV/dt when t = 50 [almost middle point]

and so
y-1.156 = (dV/dt)[t-50]!
I don't understand your method. Differentiating with respect to [tex]\theta[/tex] gives me a whole new equation. Although it's in a linear form, isn't it totally different from the original one? And why set t=50?
 
Last edited:
  • #5
I am not really sure if you can use that equation, but it just gives an approximation.

I chose 50, because this is the equation of the tangent line of this quadratic function at t = 50 (which is midpoint as 10 is min. and 99 is max)...
 

1) What is the Method of Least Squares Linear Fitting?

The Method of Least Squares Linear Fitting is a statistical technique used to find the best-fit line for a set of data points. It minimizes the sum of the squared distances between the data points and the line, allowing for the determination of the line that best represents the relationship between the variables.

2) How does the Method of Least Squares Linear Fitting work?

The method works by calculating the residuals, or the differences between the observed data points and the predicted values on the line. The line is then adjusted to minimize the sum of the squared residuals, resulting in the line that best fits the data. This is achieved through the use of calculus and linear algebra.

3) When is the Method of Least Squares Linear Fitting used?

The method is commonly used in various fields of science, including physics, engineering, and economics. It is often used to analyze and model relationships between variables and make predictions based on the data.

4) What are the assumptions of the Method of Least Squares Linear Fitting?

The method assumes that the relationship between the variables is linear, there is no perfect correlation between the variables, and the errors or residuals are normally distributed with a mean of zero. Additionally, the data should be independent, meaning that the values of one variable should not be dependent on the values of another variable.

5) What are the limitations of the Method of Least Squares Linear Fitting?

The method is not suitable for non-linear relationships between variables. It also assumes that the data points have equal weight, meaning that they are all equally important. Additionally, it is sensitive to outliers, which can significantly affect the results. It is important to assess the validity of the assumptions before using this method to avoid inaccurate conclusions.

Similar threads

  • Introductory Physics Homework Help
Replies
1
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
457
  • Introductory Physics Homework Help
Replies
2
Views
2K
  • Introductory Physics Homework Help
Replies
7
Views
950
  • Linear and Abstract Algebra
Replies
9
Views
1K
  • Introductory Physics Homework Help
Replies
4
Views
1K
  • Linear and Abstract Algebra
Replies
5
Views
1K
  • Introductory Physics Homework Help
Replies
7
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Introductory Physics Homework Help
Replies
1
Views
2K
Back
Top