Interpreting results of a polynomial fit

In summary, the data fit better when extrapolating it to twice the region it was fitted to which was the third order polynomial. Third order polynomial fit the data better than the first and second order polynomial when extrapolating data. It is dangerous to extrapolate a polynomial fit - I would only feel comfortable doing it if you had some physical insight that lead you to expect that the relationship should be a certain order polynomial.
  • #1
undergradphys
19
0
I am currently working on a gamma ray spectroscopy lab in which i have just fit a polynomial to my calibration points. The calibration points are in a relatively straight line, from x=40 to x=450, and y=34 to y=1300 for the first and last end points respectively. Where X is channel number, and Y is energy. The calibration will change Channel number to energy on the rest of my spectrum graphs.

I noticed while increasing the polynomial's degree from first, to second, to third order that the slope of the line decreased at twice the X value of the last calibration point. Taking it from the perspective of my data, the third order polynomial fit my data better when extrapolating data at twice the region i had fit my line to.

Is this because a third order is inherently a better estimate of extrapolated data because it fits a given data set more accurately? I am afraid i don't understand how increasing the degree of a line that is (supposedly) linear would increase its validity past the fit. Was this just luck?

(Equation of my line, 2.787e+ooo*Ch-5.952e-005*Ch^2, i assume the first term is the first order, and second is the second order term. i have forgotten to printout the graph with the third order fit, but it has a second order term of the same magnitude)
 
Physics news on Phys.org
  • #2
The higher order polynomial is inherently a better fit. Since it is almost linear, the coefficient for the second term turns out to be very small.
 
  • #3
yes i understand that a high order power will inherently fit a data set better, but would it extrapolate data better as well or is this just pure chance?
 
  • #4
undergradphys said:
yes i understand that a high order power will inherently fit a data set better, but would it extrapolate data better as well or is this just pure chance?

Actually, you have to be careful with polynomial regression as it tends to "overfit". As you add terms the model will be unduly influenced by outliers. Data that already "looks" linear should probably be modeled with least squares linear regression or maximum likelihood estimation.
 
Last edited:
  • #5
It is dangerous to extrapolate a polynomial fit - I would only feel comfortable doing it if you had some physical insight that lead you to expect that the relationship should be a certain order polynomial.

I'm curious why you are extrapolating at all. Do you not collect calibration data over the entire energy range of interest and use all of that data in your fit? You should if you want accurate results. Assuming you do that, you can calculate the least square error for different model orders: constant, linear, quadratic, cubic, ... You will always get less error with higher order, but you will find that at some point increasing the order only provides minimal decrease in error, indicating you are fitting noise. Plotting the least square error versus model order will usually make it obvious when you should stop.

Good luck!

jason
 
  • #6
@SW VandeCarr: Thank you, this was very helpful


@JasonRF: i had not calibrated over all the energies no, we used a mixed Eu(154?) radioactive source for calibration and the highest energy radiation line was about 1.2MeV. Additionally, there is a pileup line (a line caused when the detector can "see" two radiation counts because they arrive at the same time, thus they add together) from another source at 2.5MeV. Most of the data that was collected was within the calibration range, but this line was not.

The rest of the data was fitted very nicely to the calibration, within the range of error,but since i was extrapolating so far to estimate the energy of this line, which is weak at best, i was off by a factor of 4% or so. which for extrapolating so far out of my calibration range isn't terrible, but id like to get below 1%.
 

1. What is a polynomial fit?

A polynomial fit is a mathematical method used to approximate a relationship between variables by fitting a polynomial curve through a set of data points. In other words, it is a way to find a mathematical equation that best fits a set of data points.

2. How is a polynomial fit calculated?

A polynomial fit is calculated by using a technique called least squares regression, which minimizes the sum of squared errors between the actual data points and the predicted values from the polynomial curve. This is usually done using software programs or calculators.

3. What do the coefficients in a polynomial fit represent?

The coefficients in a polynomial fit represent the weights or multipliers of each term in the polynomial equation. For example, in the equation y = 3x^2 + 2x + 1, the coefficients are 3, 2, and 1.

4. How do I interpret the results of a polynomial fit?

The results of a polynomial fit can be interpreted by looking at the coefficient values and the overall shape of the curve. The coefficient values can give insight into the strength and direction of the relationship between the variables, while the curve can show the overall trend and patterns in the data.

5. What are some limitations of using a polynomial fit?

One limitation of using a polynomial fit is that it can only approximate a relationship between variables and may not accurately represent the true relationship. Additionally, using a higher degree polynomial (e.g. 3rd or 4th degree) may result in overfitting the data and making the model less generalizable to new data.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
16
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
488
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
0
Views
456
  • Set Theory, Logic, Probability, Statistics
Replies
8
Views
896
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
839
  • Set Theory, Logic, Probability, Statistics
Replies
16
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
24
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
8
Views
5K
Back
Top