Should I calculate the mean and standard deviation with raw or transformed data? I'm an undergrad chemistry student, and in a recent laboratory session, we were given a set of observations for the volume of a solution in order to find an unknown concentration of a reactant $R$, via titration. The objective was to calculate an equilibrium constant as a sample statistic, transforming this data set using the given equation:
$$ K_{ps} = \left(A\times v_k\right)^2  $$
In this setup, $v_k$ is a value from the data set, and $A = \frac{M_{T}}{\bar{V}}$ is a positive constant, invariant through the experiments. $M_T$ refers to the concentration of the standard titrant $T$, and $\bar{V}$ refers to the volume of the analyzed solution. $A$ was determined by the conditions of the experiment, since we were given data from a simulation.
When I reported my results, I did so computing the value of $K_{ps}$ for each $v_k$, and then the mean and standard deviation for the output $K_{ps}$ values. Nonetheless, the lab assistant told us to change this and first compute the mean and standard deviation for $v_k$, and work with the mean as an input for the equation above.
My question is: when should I calculate the mean and standard deviation, given I will transform my initial data, before or after manipulating them? Both methods with the same set yield different results. Also, I am sure the SD or variance are unstable under non-linear transformations, which suggests that in order to be precise both statistics should be calculated with the transformed data.
 A: The reason is because you don't want to introduce unnecessary bias in your final result.
If you take the expectation value for the $K_{ps}$, observation error is introduced as bias. To see this, you can expand the formula as the following way:
Your observation can be modeled as the following:
$$
\tilde{v}_k = v_k + \varepsilon 
$$
where $v_k$ is true value and $\tilde{v_k} $ is observation.
Assume your observation is unbiased which means that $E[\varepsilon] = 0$ and
the error variance is $Var[\varepsilon] = \sigma^2$.
Now, calculate the expectation value of your target value with the model:
$$
\begin{align}
E[\tilde{K}_{ps}] & = E[\left(A\cdot \tilde{v}_k\right)^2]\\
& = A^2 \cdot E[( v_k^2 + 2v_k\varepsilon + \varepsilon^2)] \\
& = A^2 \left( E[ v_k^2] + 2v_k\cdot E[\varepsilon] + E[\varepsilon^2] \right)\\
& = A^2 \left( E[ v_k^2] + \sigma^2 \right)
\end{align}
$$
where $\tilde{K}_{ps}$ is your estimate of true value $K_{ps}$.
The second term is zero because we assume your observation is unbiased but the third term is not zero which is the same as the variance of the observation error.
Here you should notice that even though your observation is unbiased, your target value is biased by the variance of your observation which is not what you want.
On the other hand, if you calculated the mean value of the observation first, you would get
$$
\begin{align}
E[\tilde{K}_{ps}] &= \left(A\cdot E[\tilde{v}_k]\right)^2\\
& = A^2 \cdot v_k^2
\end{align}
$$
because we assume $E[\tilde{v}_k] = E[v_k + \varepsilon] = E[v_k]  = v_k$
Now your calculation result doesn't have any bias.
A: The mean and standard deviation of the more symmetric histogram are more simply predictive, less variable, and more easily understood. For example, if the data is lognormal distributed, then transforming the data by taking the logarithm will yield a normal distribution, which normal distribution, unlike a lognormal distribution, is symmetric, and has a left deviation equal to its right deviation. Now if instead one calculates the mean of the lognormal distribution, one has exactly that, i.e., the expected value of the lognormal distribution, but will not be an expectation of a normal distribution so it will not have a mean, mode, and median as occurring for large numbers in the same location. Moreover, a standard deviation of a lognormal distribution will be an inflated value not directly related to how a normal histogram relates to probability.
Therefore, one chooses data transformations that confer nice properties on the data, and one then uses that transformation for prediction. Care only needs to be exercised not to confuse what these transformed values are, that is, the mean of a transformed variable is generally not the mean of the untransformed variable.
