0
$\begingroup$

I have what seems like a simple question and it may be that the answer is simply using the quadrature error equation, but I am uncertain so thought I'd ask.

I have a simple equation: $Y = aX$

where constant $a$ is obtained from a fit through various data points measured experimentally.

  • constant $a$ has an error associated with the fit ($\sigma_a$).
  • the data points used to obtained the fit (and therefore constant $a$) were measured experimentally with a sensor that has a quoted standard deviation$~(\sigma_{\rm sensor}$).
  • $X$ is a value that is set manually in the sensor (so we assume there is no error associated with it).

What is the total error in Y?

Is it simply $\sigma = \sqrt{\sigma_a^2 + \sigma_{\rm sensor}^2}$?

Thanks in advance.

$\endgroup$
3
  • $\begingroup$You have an error in X, an error in fitted a, and an error in Y. Either you use X and Y and their errors to find the fitted a and its error, or you use fitted a and X and their errors to find Y and its error. You need to provide clarity in what it is you want. If Y is a single variable, it would make more sense for a to be a vector that you can dot with the vector X.$\endgroup$CommentedAug 15, 2024 at 18:31
  • $\begingroup$Thanks for your answer. You make great points. Let me provide some clarity, X is a variable that is set in the sensor (e.g. set voltage) so we assume X has no error. I hope that helps clarify.$\endgroup$
    – jrjrjr
    CommentedAug 15, 2024 at 18:40
  • 2
    $\begingroup$Aside from not "double-counting the errors" discussed in the comment and answer, note too that the formula $\sigma_z = \sqrt {\sigma_x^2+ \sigma_y^2}$ is NOT applicable to a measurement of the product of two independent random quantities, instead it applies only to the SUM of two random quantities: $Z=X+Y.$$\endgroup$
    – hyportnex
    CommentedAug 15, 2024 at 23:36

3 Answers 3

3
$\begingroup$

The $\sigma_a$ already includes $\sigma_s$ inside it. You should not double count $\sigma_s$ by putting it in again.

However, I generally recommend against forcing the intercept to zero.

$\endgroup$
1
  • 1
    $\begingroup$thank you, I appreciate it!$\endgroup$
    – jrjrjr
    CommentedAug 15, 2024 at 22:02
3
$\begingroup$

The "Guide to the expression of uncertainty in measurement" [ISO/IEC Guide 98-3 (2008)] contains an example, which describes your situation:

  1. We express $Y = a X$ as a generic function $y=f(a, X) = f(p_1, p_2)$. The parameters $p_i$ of this generic function are the "parameter" $a$ as well as the "input variable" $X$.
  2. The variance of $Y$ is given by $$ \sigma^2_y = \sum_{i=1}^2 \left( \frac{\partial f}{\partial p_i} \right)^2 \cdot \sigma^2_{p_i} + \textrm{cross terms} $$ where the derivative describes the "sensitivity" of the model to the change. The cross terms vanishes, if the parameters are independent.

Using this generic expression we obtain $$ \sigma^2_y = \left( \frac{\partial f}{\partial a} \right)^2 \cdot \sigma^2_{a} + \left( \frac{\partial f}{\partial X} \right)^2 \cdot \sigma^2_{X} = X^2 \cdot \sigma^2_a + a^2 \cdot \sigma^2_X $$

$\endgroup$
6
  • 1
    $\begingroup$This explanation is exactly true and completely thorough. Note additionally that the OP is asking for a case where $\sigma_X = 0$ because the input value for $X$ is exact.$\endgroup$CommentedAug 24, 2024 at 15:15
  • $\begingroup$Thanks for the added insights. One follow-up, shouldn't the variance be $(\sigma_a/a)^2$ instead of $(a \cdot \sigma_a)^2$? In references I've come across discussing uncertainty propagation in multiplication of variables, the variable is in the denominator and the variance of the variable is in the numerator (e.g., statisticshowto.com/statistics-basics/error-propagation/…). Thank you.$\endgroup$
    – jrjrjr
    CommentedAug 24, 2024 at 19:12
  • $\begingroup$@Semoi thank you for correcting my mistake in that message. It is still unclear to me why the variance you derive yields $\sigma_y$ = $\sqrt{(x^2\sigma_a^2) + (a^2\sigma_x^2)}$, when multiple references I have found (see link above, e.g.) derive variances for multiplicating variables as $\sigma_y$ = $y \sqrt{(\sigma_a/a)^2 + (\sigma_y/y)^2}$. I understand you also reference an ISO guide, so is there a reason why one would use one versus the other? Thank you for your time.$\endgroup$
    – jrjrjr
    CommentedAug 25, 2024 at 18:17
  • $\begingroup$My formula is true in general as long as the errors are (1) independent and (2) random -- for systematic errors a different formula is used. In contrast, the formula in the link is only true if each term is either multiplied or divided. Just use "my" formula and check that it yields the formula in the link, if we assume $y = \frac{a \cdot b}{c \cdot d}$. The key is $\frac{\partial y}{\partial a} \sigma_a= \frac{\sigma_a}{a} y$, as well as $\frac{\partial y}{\partial c} \sigma_c= \frac{\sigma_c}{c} y$.$\endgroup$
    – NotMe
    CommentedAug 27, 2024 at 12:24
  • $\begingroup$@Semoi thank you once more for your time. However, I must apologize, as I am struggling to understand the differences. I have tried but did not comprehend why you proposed $y$ = $(ab)/(cd)$. When you say: "The formula in the link is only true if each term is either multiplied or divided." This is the case in the equation $Y = aX$. So are both formulations expected to yield the same variance? i.e., $\sigma_y$ = $\sqrt{(X^2\sigma_a^2) + (a^2\sigma_X^2)}$ = $Y\sqrt{(\sigma_a/a)^2 + (\sigma_X/X)^2}$ ? In other words, the formulation in the link is still correct? Apologies for the long comment.$\endgroup$
    – jrjrjr
    CommentedAug 28, 2024 at 18:50
0
$\begingroup$

You should use a chi squared fitting technique which weights the data in the fit you use to extract $a$ by the uncertainty in the data. If you do this then the uncertainty in $a$ from the fit will include the uncertainty in the data already.

$\endgroup$
3
  • $\begingroup$thank you for your comment. The variance $\sigma_a$ is obtained from the fit: specifically, it is the variance of that data to the fit that was used to obtain constant $a$. Is this what you mean by "weighing the data in the fit you use to extract $a$ by the uncertainty in the data"? Just want to make sure I understand your wording. Thank you again.$\endgroup$
    – jrjrjr
    CommentedAug 25, 2024 at 18:32
  • $\begingroup$@jrjrjr I can't tell if you're doing the right thing. But I suspect you're not. You need to make sure you're doing weighted least squares for your fit and weighting each data point by $\sigma_{\text{sensor}}$. Maybe you can share what programming language and packing you're using to do the fitting.$\endgroup$CommentedAug 25, 2024 at 21:56
  • $\begingroup$I understand what you mean now. I will do that.$\endgroup$
    – jrjrjr
    CommentedAug 28, 2024 at 17:58

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.