Straight line equation that accounts for known error in X&Y?

In summary, the speaker is looking for a way to mathematically relate X and Y in order to minimize Chi-Squared per degree of freedom. They are attempting to program a straight line in Java that accounts for known errors in both X and Y, but have been unable to find a suitable method. They are seeking guidance on how to approach this problem, either through finding the right formula or calculating the derivatives themselves.
  • #1
AlanKirby
20
0
I'm looking for how to mathematically relate X and Y, in such a way that the Chi-Squared per degree of freedom is minimised. However I can't understand how this would work, given that I'm trying to use known X,Y dX and dY (errors) values, to get the related gradient and intercept for the line of best fit.

nb: I'm currently trying to program a straight line in java that accounts for known errors in both X and Y, however everything I find either obtains errors, or is way over complicated.

Please help!
 
Mathematics news on Phys.org
  • #2
Fit programs can certainly do that, and I guess somewhere hidden in this or at least one of those articles is the right formula.

Alternatively, write down the equation for ##\chi^2## yourself, calculate the derivatives and see how the expression can get minimized. I'm not sure if that gives a single nice formula.
 

Related to Straight line equation that accounts for known error in X&Y?

1. What is a straight line equation?

A straight line equation is a mathematical equation that represents a line on a graph. It can be written in the form of y = mx + b, where m is the slope of the line and b is the y-intercept.

2. What is the purpose of a straight line equation?

The purpose of a straight line equation is to describe the relationship between two variables on a graph. It can be used to make predictions and analyze data.

3. How does the equation account for known errors in X and Y?

The equation accounts for known errors by including a margin of error, or uncertainty, in the slope and y-intercept values. This allows for a more accurate representation of the data and takes into account any discrepancies or errors in the measured values.

4. Is the equation affected by random errors?

Yes, the equation can be affected by random errors, as it is based on the data that is inputted. However, the inclusion of a margin of error can help to minimize the impact of random errors on the accuracy of the equation.

5. Can the equation be used to make predictions?

Yes, the straight line equation can be used to make predictions about the relationship between the two variables on the graph. It can be used to estimate the value of one variable based on the known value of the other variable.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
17
Views
1K
Replies
4
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
8
Views
5K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
962
  • Advanced Physics Homework Help
Replies
3
Views
724
  • Set Theory, Logic, Probability, Statistics
Replies
16
Views
1K
Replies
13
Views
1K
Replies
12
Views
747
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
1K
  • Introductory Physics Homework Help
Replies
1
Views
727
Back
Top