Linear combination of data with uncertainty

Click For Summary

Discussion Overview

The discussion revolves around the computation of a linear combination of two measured data points with associated uncertainties, specifically focusing on how to calculate the value and uncertainty of the combination. Participants explore the implications of different error types and the relationship between linear combinations and linear fitting.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant presents the problem of calculating a linear combination of two data points with different uncertainties and seeks guidance on the correct approach.
  • Another participant argues that measuring the uncertainty of the slope and intercept from a linear fit is more complex than measuring the uncertainty of the linear combination itself.
  • A method is proposed that assumes the errors of the measurements are independent and utilizes the rule for variances of linear combinations of independent random variables to derive the uncertainty in the linear combination.
  • There is a request for clarification on how to compute the actual value of the linear combination and whether uncertainties should be accounted for in that calculation.
  • A participant mentions the concept of "Propagation of Errors" as relevant to understanding error in functions of random variables.
  • Another participant emphasizes that the actual values of the random variables cannot be known, only their expected values can be calculated under the assumption of independence.
  • There is a question about which two points are being referred to in the context of fitting a straight line.

Areas of Agreement / Disagreement

Participants express differing views on the complexity of measuring uncertainties in linear combinations versus linear fits. The discussion remains unresolved regarding the best approach to compute the uncertainties and the specifics of fitting a line to the data points.

Contextual Notes

Participants reference the independence of measurements and the use of variances in their calculations, but the assumptions and definitions of the errors are not fully clarified. There is also ambiguity regarding the relationship between the linear combination and the linear fit.

Malamala
Messages
348
Reaction score
28
Hello! I have 2 measured data points (they are measurements of different observable, not 2 measurement of the same observable), with quite different errors, say ##x_1 = 100 \pm 1## and ##x_2 = 94 \pm 10##. I want to compute the value (and associated uncertainty) of a linear combination of them, say ##y = 0.23x_1 + 0.55x_2##. What is the right way to do it, accounting for their different uncertainties? (This is basically equivalent to fitting the 2 points with a straight line, and extracting the uncertainty on the slope and intercept).
 
Physics news on Phys.org
Malamala said:
This is basically equivalent to fitting the 2 points with a straight line, and extracting the uncertainty on the slope and intercept)
That's not right. Measuring the uncertainty of the slope and intercept of the line is different to, and more complex than, measuring the uncertainty of the linear combination ##y##.
A typical approach would be to assume that the errors of the two measurements are independent. Since the most common error measurement is a standard deviation, which is the square root of a variance, we can then use the rule for variances of linear combinations of independent random variables, which is that:
$$Var(aX+bY) = a^2\ Var(X) + b^2\ Var(Y)$$
whence
$$error(aX+bY) = \sqrt{a^2\ (error(X) )^2+ b^2\ (error(Y))^2}$$
Substitute your errors from above, with ##a=0.23,b=0.55## and you'll get the answer.
 
  • Like
Likes   Reactions: Twigg
andrewkirk said:
That's not right. Measuring the uncertainty of the slope and intercept of the line is different to, and more complex than, measuring the uncertainty of the linear combination ##y##.
A typical approach would be to assume that the errors of the two measurements are independent. Since the most common error measurement is a standard deviation, which is the square root of a variance, we can then use the rule for variances of linear combinations of independent random variables, which is that:
$$Var(aX+bY) = a^2\ Var(X) + b^2\ Var(Y)$$
whence
$$error(aX+bY) = \sqrt{a^2\ (error(X) )^2+ b^2\ (error(Y))^2}$$
Substitute your errors from above, with ##a=0.23,b=0.55## and you'll get the answer.
Thank you for this! But what would be the actual value for ##aX+bY##? Do I just plug in the values for ##X## and ##Y##? Do I account for the uncertainties on X and Y when computing aX+bY?

About the linear fit, if I wanted to fit a straight line to these 2 points, how can I get the uncertainty on the slope and intercept of the fit?
 
@Malala: Look up 'Propagation of Erros'. It deals with the error/variance in functions of Random variables.
 
Malamala said:
Thank you for this! But what would be the actual value for ##aX+bY##? Do I just plug in the values for ##X## and ##Y##? Do I account for the uncertainties on X and Y when computing aX+bY?

About the linear fit, if I wanted to fit a straight line to these 2 points, how can I get the uncertainty on the slope and intercept of the fit?
You can't know the actual value, because X,Y are Random Variables. This means/implies you can know their long-term distribution but cannot tell the actual values. Best you can do is use linearity of expectation (Edit: Assuming independence of X,Y):

$$E(aX+bY) =aE(X)+bE(Y) $$
 
Last edited:
  • Like
Likes   Reactions: Twigg
Malamala said:
About the linear fit, if I wanted to fit a straight line to these 2 points.
What two points are you talking about?
 
  • Like
Likes   Reactions: BvU

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 30 ·
2
Replies
30
Views
4K
  • · Replies 28 ·
Replies
28
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 21 ·
Replies
21
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 26 ·
Replies
26
Views
3K