1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How to calculate uncertainty of gradient of straight line?

  1. Nov 18, 2016 #1
    Mod note: Moved from a technical forum section, so missing the homework template.
    I am analysing the data from my undergrad experiment, which the aim is to find the Plank's constant by scattering x-ray off NaCl crystal and using Braggs law.
    The straight-line equation is as follows: [tex]eV=h\frac{c}{2dsin(\theta)}[/tex]. I am only considering the uncertainty in theta since it is the dominant uncertainty in my experiment.
    To find the uncertainty in the Planks constant, h, I rearranged the above equation to [tex]h=\frac{2eVdsin(\theta)}{c}[/tex] and used the error propagation equation and found [tex]\Delta h=\frac{2eVdcos(\theta)\Delta \theta}{c}[/tex]. I have 16 data points of different x-ray energies, so I found dh of all 16 data points and took its average. Is this a good approach?
    PS: Should I move this thread to the Homework and Coursework section?
    Last edited by a moderator: Nov 19, 2016
  2. jcsd
  3. Nov 18, 2016 #2
    So I presume these 16 measurements were 16 different x ray energies and you measure theta for each one, or were these 16 repeated measurements and you just have random scatter in theta?
  4. Nov 18, 2016 #3
    Sorry, I should've specified, I have taken 16 measurements of different x-ray energies.
  5. Nov 18, 2016 #4
    If they are just 16 repeated measurements with random variation in theta, then yes, your error propagation is correct.
  6. Nov 18, 2016 #5
    Ah, that's different. To see why picture three measurements on a straight line behavior and you want to know the slope. Say all three points had the same error bar. Now picture the range of slopes you could put through the error bars of points one and two. Now picture the range of slopes you could put through the error bars of points 1 and 3. The end points put a much harder constraint on the possible slopes than adjacent points. If you look at what slopes points 1 and 3 allow you see that point two adds very little extra constraint. So how the points are spread out affects the constraint on the slope.

    At the extreme, assume a whole bunch of points are close together on the x axis and one single measurement is far to the right. The error in that single measurement has a much greater impact on the uncertainty of the slope than the other points do.
  7. Nov 18, 2016 #6
    So should I plot y=hx and find h_min and h_max by fitting line using the uncertainty in x and y?
    The problem is, however, if y=eV and x=c/(2dsin(theta)), the associated uncertainty in x will be HUGE.
    Last edited: Nov 18, 2016
  8. Nov 18, 2016 #7
    No, the energy is the thing you have confidence in and the angle is the thing you measured and think you have uncertainty in. Plot energy as x and angle (or better yet sine(angle)) as y. Regarding uncertainty, the error bars shouldn't be large compared to the size of the values, right?

    Unfortunately this isn't a straight line, so I'm not sure they wanted you to go in this direction. I think I am misleading you.
  9. Nov 18, 2016 #8
    BTW I thought I would reiterate. The title of the post is incorrect. The thing you varied is Energy. The thing you measured is angle. They are not directly proportional. They are inversely proportional. h is not proportional to the slope of a straight line. Unless you want the complicated version, I think a simplified way of looking at it is in order. You probably took each measurement as an independent measurement of h without regard to the energy and averaged the values. In that case I think what you did to propagate the error is a reasonable approach.

    Your measurements actually can produce a much better estimate of h by least squares, and while the error in the least squares estimate is much smaller, calculating it is much harder to follow.
  10. Nov 19, 2016 #9
    I plotted eV=hc/lambda using excel, where it gave me a straightline. (lambda is 2dsin(theta), y is eV and x is c/lambda) It does linear least squares for me, and gave me h=6.745*10^-34. I think I will take your advice to plot max and min gradient lines permitted by my uncertainties and find out h_max and h_min.
    Thank you very much!
    Last edited: Nov 19, 2016
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted

Similar Discussions: How to calculate uncertainty of gradient of straight line?