Book contents
- Frontmatter
- Contents
- Preface
- Part I Data and error analysis
- 1 Introduction
- 2 The presentation of physical quantities with their inaccuracies
- 3 Errors: classification and propagation
- 4 Probability distributions
- 5 Processing of experimental data
- 6 Graphical handling of data with errors
- 7 Fitting functions to data
- 8 Back to Bayes: knowledge as a probability distribution
- References
- Answers to exercises
- Part II Appendices
- Part III Python codes
- Part IV Scientific data
- Index
7 - Fitting functions to data
Published online by Cambridge University Press: 05 June 2012
- Frontmatter
- Contents
- Preface
- Part I Data and error analysis
- 1 Introduction
- 2 The presentation of physical quantities with their inaccuracies
- 3 Errors: classification and propagation
- 4 Probability distributions
- 5 Processing of experimental data
- 6 Graphical handling of data with errors
- 7 Fitting functions to data
- 8 Back to Bayes: knowledge as a probability distribution
- References
- Answers to exercises
- Part II Appendices
- Part III Python codes
- Part IV Scientific data
- Index
Summary
If you want to fit parameters in a functional relation to experimental data, the best method is a least-squares analysis: Find the parameters that minimize the sum of squared deviations of the measured values from the values predicted by your function. In this chapter both linear and nonlinear least-squares fits are considered. It is explained how you can test the validity or effectiveness of the fit and how you can determine the expected inaccuracies in the optimal values of the parameters.
Introduction
Consider the following task: you wish to devise a function y = f(x) such that this function fits as accurately as possible to a number of data points (xi, yi), i = 1, …, n. Usually you have – based on theoretical considerations – a set of functions to choose from, and those functions may still contain one or more yet undetermined parameters. In order to select the “best” function and parameters you must use some kind of measure for the deviation of the data points from the function. If this deviation measure is a single value, you can then select the function that minimizes this deviation.
This task is not at all straightforward and you may be lured into pitfalls during the process. For example, your choice of functions and parameters may be so large and your set of data may be so small that you can choose a function that exactly fits your data.
- Type
- Chapter
- Information
- A Student's Guide to Data and Error Analysis , pp. 84 - 110Publisher: Cambridge University PressPrint publication year: 2011