Analysis 5

From Advanced Labs Wiki
Revision as of 00:49, 11 February 2012 by Tobias Marriage (talk | contribs)
Jump to navigation Jump to search

Back to 2012 Main Page

In the past few tutorials, you learned how to fit data using a linear model. While many datasets may be fit with such a model, other datasets, including some that you encounter in the lab course, will not be described by linear models. Remember that a model is linear if it is linear in the parameters, so a nonlinear model must be nonlinear in the parametes. Here we introduce some data <math>c_i</math> representing, say, the number of gamma-rays incident on a detector. These data are sorted by their energy <math>e_i</math>. We model the counts as a function of their energy:

<math> c_i = A \exp(-(e_i-B)^2/(2 C^2)) + D^x + E </math>

Data for non-linear model and confidence interval example: media:counts.txt; Code (change sufixx to .py) media:Nonlinear_model.txt; Output media:Data_nonlinear.png, media:Counts_with_fit.png, media:Confidence_peak_constant_background.png