I have an experiment that relies on measuring temperature as a function of a given condition. I chan

uri2e4g

uri2e4g

Answered question

2022-06-29

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?

Answer & Explanation

billyfcash5n

billyfcash5n

Beginner2022-06-30Added 17 answers

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.
I suppose you want to show the relationship between X and Temperature, which seems quadratic rather than linear. In general, you will get a better fit if you don't try to combine data into three 'pseudo-points'. Below is Minitab 17 output for a quadratic regression of Temperature on X. The dotted lines express the likely error in determining the height of the parabola at each value of X. (Although 'error bars' are inexplicably popular, it is my experience that most of the 'error bars' experimenters use are unsupported by sound statistical theory, questionable as to purpose, and misleading in practice; it is better to use 'confidence bands' as in the Minitab plot.)

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?