# Whats the equation for uncertainties of a gradient?

1. May 6, 2008

### kittassa

i need to know the formula for calculating the uncertainty of a gradient from a graph. the gradient is being used to calculate the moment of inertia but i can't calculate the error in my I cause i don't know how to calculate the error in my M!!!!

when i did the experiment, i assumed the error to be 5%(ran out of time) and so worked out the I and its uncertainty using that, but now i'm doing a lab report and can't assume, i have to work it out properly.

All i want is the formula, i can do the rest of it... Can anyone help?

2. May 6, 2008

### Chi Meson

There are many ways of determining the uncertainty of a slope. Without proper statistical analysis, all other methods are approximations. One way is to draw error bars for all your data points. Then draw the maximum possible slope and the minimum possible slope tht could be interpreted with your error bars. Your best fit should be in the middle, and your max and mins would be the plus and minus.

Here's a page with further explanation. See section C at the bottom of the page.

3. May 6, 2008

### Mapes

Fitting a line $a+bx$ to $n$ data pairs $x_i,y_i$:

$$a=\bar y-b\bar x$$

$$b=\frac{\sum_i(x_i-\bar x)(y_i-\bar y)}{\sum_i(x_i-\bar x)^2}$$

The standard deviation of the slope is

$$s_b=\sqrt{\left(\frac{1}{n-2}\right)\left[\frac{\sum_i(y_i-\bar y)^2}{\sum_i(x_i-\bar x)^2}-\left(\frac{\sum_i(x_i-\bar x)(y_i-\bar y)}{\sum_i(x_i-\bar x)^2}\right)^2\right]}$$

From Motulsky's Intuitive Biostatistics.