Least-squares-fitting-with-Excel

Least-squares-fitting-with-Excel - Least Squares Fitting...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Least Squares Fitting with Excel.1 Introduction to the Least Squares Fit Table of Contents 1. Uses for a Least Squares Fit: Linear Dependence 2. Methods of Finding the Best Fit Line: Estimating, Using Excel, and Calculating Analytically 3. Calculating a Least Squares Fit 4. Uncertainty in the Dependent Variable, Slope, and Intercept 5. Calculating the r 2 Value 6. Sample Data and Setting up the Spreadsheet 6.1 Example: Entering a Sum 6.2 Example: Entering a Formula 6.3 Formulae for Excel Using Sample Data 6.4 Using Excel’s LINEST Function
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Least Squares Fitting with Excel.2 1. Uses for a Least Squares Fit: Linear Dependence What’s the reason for wanting to do a Least Squares Fit? Why bother with finding a best fit line to a set of data in the first place? Well, a graph is used to show whether there is a relation between the dependent variable (the y-axis) and the independent variable (the x-axis). Usually, one looks for a linear relation, that is to say whether the data points fall roughly on a line or not. A linear relation has the form y = a + bx , which is useful for showing direct relationships such as F=ma and V=IR . A graph of the force of gravity vs. mass would yield a line with a slope equal to the acceleration due to gravity. A graph of voltage vs. current would give a value for resistance. This is good stuff! What about equations which are non-linear? How could calculating a best fit line using the Least Squares Fitting method help with that? Here are two examples of equations that may appear non- linear but can be made linear. The first example involves the magnetic force on electrons and the circular motion the electrons undergo in a uniform magnetic field. The equation is m eV r m eB 2 = , which doesn’t seem like it could be graphed easily. However, one wants to graph the charge vs. the mass of the electron, as was done in 1897 by Sir J. J. Thompson. Therefore, that messy equation can be rearranged as follows: m eV m eBr 2 = m eV m r B e 2 2 2 2 2 = V m r eB 2 2 2 = m r B V e 2 2 2 = This involves simple algebra, however, one had to know ahead of time what variables one wanted to graph. In order to graph charge vs. mass, the charge had to be alone on the left-hand side, and the mass had to be on the right-hand side, to the first power only, and with a prefactor of known variables ( V , B , and r ). This gives a linear graph of the charge vs. the mass with a slope of 2 2 2 r B V . Figure 1: Linearization of an equation. (A) shows a graph of y vs. x of the quadratic function ax 2 . (B) shows a graph of y vs. x 2 , a linear relation with slope a . (A) (B)
Background image of page 2
Least Squares Fitting with Excel.3 The second example involves the period of a pendulum, given by g l T π 2 = . In lab one measures the period and the length of the pendulum. What to do? Squaring the equation gives l g T 2 2 4 = .
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 12

Least-squares-fitting-with-Excel - Least Squares Fitting...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online