Problem with fitting simple quadratic function to 3 data points

In summary, The individual has an array of data points representing chi^2 values for a fit and wants to calculate the 1-sigma error for the fit. The idea is to find the lowest chi^2 value and the two points on either side, fit a quadratic function to these points, and then calculate the deviations on either side to find the 1-sigma error. However, there is a mental block in figuring out how to fit a quadratic to the three data points and the individual is looking for a simpler way to implement this without using Cramer's Rule. Suggestions include using the Lagrange Polynomial or other polynomial interpolation methods.
  • #1
johnismint
1
0
Hello PF,

Ok so here is my problem. I have an array of data points which are the chi^2 values for a fit I have performed. I wish to calculate the 1-sigma error for this fit, so I figure I could find the lowest chi^2 value, and the two points either side that value, and fit a quadratic function to this. Then 'fill' this such that deltachi^2=1 and calculate the deviations either side. But this is somewhat irrelevant for now...

I have a complete mental block, and I'm really struggling to figure out how to fit a quadratic to these 3 data points. I'm editing a fortran-77 program to do this (which I'm not that familiar with) so would like to keep it as simple as possible. If my function is F(x)= a*x**2 + b*x + c, I already have c constrained to be my minimum value, however, I can't seem to figure out how to get these other co-efficients. I know there are methods such as Cramer's rule, however this would require significant changes to the program, which I would like to avoid. Can anyone think of an easier way to implement this?

Many thanks
 
Physics news on Phys.org
  • #2
If you plug in each of your data points, you'll get three linear equations in three unknowns (a, b, c). Then it's just a bit of linear algebra.
 
  • #4
rochfor1 said:
If you plug in each of your data points, you'll get three linear equations in three unknowns (a, b, c). Then it's just a bit of linear algebra.

I think that's what he was referring to by Cramer's Rule in his original post, he doesn't want to do that.
 

1. What is a simple quadratic function?

A simple quadratic function is a polynomial function of the form f(x) = ax^2 + bx + c, where a, b, and c are constants. It is a second-degree polynomial and its graph is a parabola.

2. Why is there a problem with fitting a simple quadratic function to only 3 data points?

The problem arises because a quadratic function has 3 parameters (a, b, and c) but only 3 data points are available. This means that there is not enough information to accurately determine the parameters and the resulting function may not accurately represent the data.

3. How can the problem of fitting a simple quadratic function to 3 data points be solved?

One way to solve this problem is by using a higher-order polynomial function, such as a cubic or quartic function, which have more parameters and can better fit the data. Another approach is to collect more data points to provide more information for accurate parameter estimation.

4. Are there any other factors that can affect the accuracy of fitting a simple quadratic function to 3 data points?

Yes, there are other factors that can affect the accuracy of fitting a simple quadratic function to 3 data points. These include measurement errors, outliers in the data, and the distribution of the data points. These factors can lead to a poor fit of the function to the data.

5. Can a simple quadratic function be fitted to 3 data points perfectly?

No, it is not possible to fit a simple quadratic function to 3 data points perfectly. This is because a quadratic function has 3 parameters and 3 data points can only determine a unique solution for a linear function. Therefore, a quadratic function can only be approximated to the given data points and there will always be some degree of error.

Similar threads

Replies
4
Views
1K
Replies
2
Views
922
Replies
5
Views
1K
  • Electrical Engineering
Replies
2
Views
727
Replies
3
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
26
Views
2K
  • Calculus
Replies
3
Views
970
Replies
6
Views
938
  • General Math
Replies
6
Views
777
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
3K
Back
Top