Data Plotting help please

  • I
  • Thread starter K41
  • Start date
  • #1
K41
94
1
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?
 

Answers and Replies

  • #2
34,655
10,797
But how would I work out what the error bars would be for each gradient?
How do you get the central value? Every good approach (=a fit) should give both at the same time.
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?
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.
 
  • #3
K41
94
1
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.
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.
 

Related Threads on Data Plotting help please

Replies
3
Views
616
Replies
2
Views
690
Replies
1
Views
798
  • Last Post
Replies
1
Views
937
  • Last Post
Replies
3
Views
6K
Replies
1
Views
2K
Replies
7
Views
3K
  • Last Post
Replies
1
Views
12K
Replies
3
Views
571
Top