Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

I Data Plotting help please

  1. Apr 12, 2016 #1

    K41

    User Avatar

    I'm doing an experiment at work where I am observing an "event" over time. This event can be anything, but lets assume its a bucket of water being filled to the top, then it gets replaced with another bucket and I watch the whole "event" again.

    So x axis will be time, y axis will be the volume of water in the bucket at time, x. For the first observation, I put a line of best fit which models how the volume of water increases with time. I get the gradient from this. I then plot the next event. I get another gradient. I then plot the third event. I get a third gradient and so fourth.

    1) Now here comes an issue. I want to plot the gradient against the event number. This is easily doable. But how would I work out what the error bars would be for each gradient?

    Potential Ans. I'm thinking maybe I have to find the standard deviation of the volumes and then get a standard error from this and use that for my error bars?

    2) Also, I have plotted an average gradient (its the mean of all the gradients). I want to find the error bar for this. How do I do that?

    Potential Ans: I'm thinking just find the standard deviation of the gradients, then compute the standard error. But I'm not sure how the error bars from each individual gradient should be taken into account.

    Any advice?
     
  2. jcsd
  3. Apr 12, 2016 #2

    mfb

    User Avatar
    2016 Award

    Staff: Mentor

    How do you get the central value? Every good approach (=a fit) should give both at the same time.
    Make a weighted average of the gradients, where the weights are the inverse squares of the uncertainties. If the uncertainties are all very similar, an unweighted average can do the job as well.
     
  4. Apr 13, 2016 #3

    K41

    User Avatar

    My measurements of the volume are taken with a code (processing experimental data) in Matlab. I use the polyfit and polyval function to put a line of best fit and this gives me its intercept and gradient. (Polyfit gives the line of best fit and polyval enables me to plot the line of best fit over the data points).

    I understand the second answer, thanks.
     
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: Data Plotting help please
Loading...