A Curve Fitting Data: Gamma Spectroscopy Lab Results

AI Thread Summary
Using a calibration curve derived from gamma spectroscopy lab data, the discussion emphasizes the importance of selecting the appropriate trend line for fitting energy spectra. While polynomial trend lines can improve fit accuracy, they should be supported by theoretical expectations to avoid misleading results. Analyzing residuals can indicate whether a more complex model is justified, and statistical criteria like AIC or BIC can help assess model validity. The conversation also highlights the risks of overfitting and the need for a sufficient number of data points relative to the model's complexity. Ultimately, using more advanced statistical tools, such as R, is recommended over Excel for better fitting capabilities.
bobred
Messages
170
Reaction score
0
Hi
I have some data from a gamma spectroscopy lab and using a series of known radioactive sources I obtain a calibration curve. The equipment is a scintillation crystal coupled to a photo-multiplier tube connected to a multi-channel analyser to obtain an energy spectrum. Using Excel I add a linear trend line of the form y=mx+c, adding a polynomial of increasing order the equation gives the energy more precisely. Is using a polynomial trend line appropriate or should I be using a linear trend line?
 
Physics news on Phys.org
Sure it is appropriate. However, adding more terms to a model will almost always improve a fit. So the mere fact that a fit is improved is not by itself a good criteria.

The first thing to do is figure if there is a sound theoretical reason to expect a curve of a certain form. You can always do a Taylor series expansion to get a linear term and some correction terms, but having a theory to support your statistical model is always best.

The second thing to do is to look at a plot of your residuals for the linear plot. If the residuals show a quadratic trend then that is a good indication that the extra term is warranted.

Most statistics packages will also let you calculate the AIC or the BIC. Those criteria penalize a model for having too many terms.
 
To clarify you want to produce a calibration curve by fitting a curve to your calibration peak channel no vs their specified energy. You should expect it to be linear for good equipment. How many calibration energies do you have?
 
The best answer is if you have a theoretical expectation of the functional form the relation should take.

Ok, you don't have that. The next question is what is the curve for? If it is just going to be used as a calibration curve for that instrument the only rule is you have to avoid lying to yourself.

There are all kinds of good reasons such a calibration curve will be some unknown and not nice shape. This usually happens because there are several different factors contributing all with different functional forms.

It is therefore perfectly valid to try various functional forms trying to find one that reproduces the data within the apparent error bars.

However the trick is to NOT wind up with functional behaviors that aren't really in the data. You want to avoid making functions that have almost as many free parameters as you have data. You can always put a parabola through three points ... or a third order polynomial ... or any higher polynomial. The difference in all those possible shapes gives you an idea of how the fit can lie to you. The way to feel confident is to have a lot of data points and many fewer free parameters in the fit function.

If you do have a lot of data, and you arent really trying to find or understand the functional form of the curve, it is also perfectly valid to average or smooth or do a piece wise fit like a cubic spline. You'll get just as good or better calibration.
 
  • Like
Likes Dale
PS: when you are faking it like this beware of extrapolation. A functional form that fits the data you have shouldn't be trusted to say anything beyond the edges of the region the data samples.
 
Thanks for the replies. I have 5 Isotopes but two have multiple peaks, I shall include them and see if this improves things and revert back to a linear fit.
 
I suggest using something more powerful than Excel, like R for example. Excel can do unweighted linear fits fine, but requires all sorts of hacks to get weighted fits or nonlinear fits, that you lose the only advantage of excel in simplicity.
 
  • Like
Likes Dale
Can you show us a plot of the data?
 

Similar threads

Back
Top