Problem with fitting simple quadratic function to 3 data points

Click For Summary

Discussion Overview

The discussion revolves around the challenge of fitting a simple quadratic function to three data points, specifically in the context of calculating 1-sigma errors from chi-squared values. Participants explore methods for obtaining the coefficients of the quadratic function while considering constraints and programming limitations.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Homework-related

Main Points Raised

  • One participant describes their approach to fitting a quadratic function and expresses difficulty in calculating the coefficients, particularly avoiding complex methods like Cramer's rule.
  • Another participant suggests that plugging in the data points will yield three linear equations in three unknowns (a, b, c), implying that linear algebra could be used to solve for the coefficients.
  • A third participant introduces the concept of the Lagrange Polynomial as a potential method for polynomial interpolation, although they express uncertainty about its effectiveness compared to other methods.
  • A later reply reiterates the previous point about obtaining linear equations from the data points but notes that the original poster is specifically looking to avoid the complexity of Cramer's rule.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best method for fitting the quadratic function, and multiple approaches are suggested without agreement on a preferred solution.

Contextual Notes

The discussion highlights the constraints of the original poster's programming environment and their desire to keep the implementation simple, which may limit the applicability of some proposed methods.

johnismint
Messages
1
Reaction score
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
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.
 
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.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
27
Views
3K
  • · Replies 26 ·
Replies
26
Views
3K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 20 ·
Replies
20
Views
3K