# Error analysis

1. Apr 5, 2005

### whozum

For a function f(x,y): The error is:

$$\Delta f(x,y) = \sqrt{(\frac{df}{dx})^2+(\frac{df}{dy})^2}$$

Is this a form of the approximation in algebraic error determination:

$$\Delta f(x,y) = \sqrt{f(x+\Delta x,y) + f(x,y+\Delta y)}$$?

Now I was trying to do this in my bio lab for genetics and probability distribution. We had 27 samples, predicted 75% (20.25) to be purple and 25% (6.75) to be white. We observed that 23 were purple and 4 were white, so to calculate the deviation I used the above function and got:

$$\frac{df}{dx} = \frac{23-20.25}{20.25}, \frac{df}{dy} = \frac{4-6.75}{6.75}$$

*For some reason latex doesnt want to show it, but I plugged in my numbers into the first equation above.

So the observed sample was 18.44% off?

They gave us an equation to find the deviation of a population from the expected value which is similar to the one above:

$$\chi^2 = {\frac{(Obs_p - Exp_p)}{Exp_p}^2+\frac{(Obs_w - Exp_w)}{Exp_w}^2}$$

$$\chi^2 = {\frac{(2.75)}{20.25}^2+\frac{(2.75)}{6.75}^2} = 1.494$$

It claims that "If the value for chi squared is less than or equal to 3.841, then your sample is within the expected range."

Is this a standard deviation?

This is pretty similar to the first equation, except we're squaring the numerator instead of the whole fraction. Did I get my error equation wrong, or are these truly diferent and unlinked?

Last edited: Apr 5, 2005
2. Apr 5, 2005

### Data

$$\Delta f(x,y) = \sqrt{\left(\frac{\partial f}{\partial x}\right)^2+\left(\frac{\partial f}{\partial y}\right)^2}$$

isn't quite right. It's

$$\Delta f(x,y) = \sqrt{\left(\frac{\partial f}{\partial x}\Delta x\right)^2+\left(\frac{\partial f}{\partial y}\Delta y\right)^2}$$

this error formula is indeed just the standard deviation of $f$, assuming $\Delta x$ and $\Delta y$ are standard deviations of the respective variables, and that $x$ and $y$ are independent.

Last edited: Apr 5, 2005
3. Apr 5, 2005

### whozum

Your corrected formula is the standard deviation of f? Or are you talking about my Chi formula? Are they the same?

4. Apr 5, 2005

### Data

The equation I posted gives the standard deviation of $f$. Your chi formula is an example of the chi square test for goodness of fit of experimental data to a certainly distribution (the one that the expected values come from). The best online resource that I found to explain it (and it's not very good...) is here: http://www.stat.yale.edu/Courses/1997-98/101/chigf.htm