If a machine is suppose to read 100 when analyzing a substance, but it's average is 98. Is standard deviation calculated using 100 or 98 as the mean?
1 Answer
If this is a real world problem (rather than a "textbook" type issue), there are two issues here -- what to calculate and what to call it.
The first issue to consider is "what are you trying to find out by your calculation?"
If you're trying to figure out "how spread out are the readings among themselves?" that's different from if you're trying to figure out "typically, how far are the readings from what they're supposed to be?"
The first of those possibilities could be answered with a standard deviation, which would be in terms of root-mean-square deviations from 98. That is if you want a sample standard deviation the usual calculation would be $\sqrt{\frac{1}{n-1}\sum_{i=1}^{n}(x_i-\bar{x})^2}$ where $\bar{x}$ represents the sample mean and $x_i$ is the $i$th observation.
A similar calculation for the second thing (deviations from 100 rather than 98) would normally not be called a standard deviation, but might be called a root-mean-square-error: $\sqrt{\frac{1}{n}\sum_{i=1}^{n}(x_i-\mu_0)^2}$, where $\mu_0$ is that value it's supposed to be ($100$ in this example).
Note that shift in the denominator when we're not using the deviations from the sample mean.
[With a textbook-style question we could simply consult (for example) Wikipedia on the definition of standard deviation (which is clear that it's in terms of deviations from the reading's own mean). Or indeed almost any basic textbook which will give the same information.]