# What is the best measure of error for a data set where each point is the mean of 3 quick readings?

I have an experiment that relies on measuring temperature as a function of a given condition. I change the condition, allow the temperature to stabilize as much as possible, then take 3 measurements in a row, which are all slightly different, as the values tend to oscillate.

For example, I might have a set of readings that looks like this:

X          Temperature
10.1        80.3
10.8        82.1
10.3        78.9
20.4        100.2
20.0        101.1
20.2        101.0
30.1        139.1
30.0        140.2
30.0        138.2


Which I will combine to look like this:

uniqueX    Xmean       Xstd      Tmean      Tstd
_______    ______    ________    ______    _______

10           10.2         0.1    80.433     1.6042
20           20.2         0.2    100.77    0.49329
30         30.033    0.057735    139.17     1.0017

% Matlab code for computation
xNom = round(X);
[uniqueX,~,subs] = unique(xNom);
Tmean = accumarray(subs, T, [], @mean);
Tstd  = accumarray(subs, T, [], @std);
Xmean = accumarray(subs, X, [], @mean);
Xstd  = accumarray(subs, X, [], @std);
tb = table(uniqueX, Xmean, Xstd, Tmean, Tstd);


I'm wondering: what is the best way to plot such data, i.e. when three data points like this are combined to represent one point, what is the best value to use for the error bars on a plot of T vs X, for example in this case?

I think full disclosure is almost always best, especially for your data. I see nothing wrong with plotting all $n = 9$ points. It will be immediately clear that the clusters of three show your remarkably successful attempt to replicate measurements under three (slightly unstable) conditions.
• OK, if you need to plot data, then it is OK to show averages (of X's and Temps) on the graph. But you should use all of the original observations to get any regression lines or curves. The formula for confidence bands of a linear plot are shown in most elementary statistics books (I think you want bands for estimates rather then predictions.) For quadratic regression, the formulas are a bit messier, and usually done by software. Linear case, look for something like: $\hat y_i \pm t^*s_{y|x}\sqrt{\frac{1}{n} + \frac{(x_i -\bar x)^2}{(n-1)s_x^2}}.$ – BruceET Jun 6 '17 at 18:11