This question already has an answer here:

I have two data sets. The first data set, let's call it $X$ has an average value of $\bar{x}_{X}$ and standard deviation of $s_{X}$, the second data set $Y$ has an average value of $\bar{x}_{Y}$ and standard deviation of $s_{Y}$.I want to find out the standard error or standard deviation of a percentage change of data set 2 compared to 1. So I have:

$$ \frac{\bar{x}_{Y}-\bar{x}_{X}}{\bar{x}_{X}}\cdot100 $$

Now my question is, how to take into account the standard deviations for this percentage value?

marked as duplicate by COOLSerdash, gung, Peter Flom, Scortchi, Gala Jul 18 '13 at 12:28

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 3
    Hi Chris and welcome to the site! I have a question: Are the datasets independent from each other? – COOLSerdash Jul 17 '13 at 21:31

You can calculate the variance for the percentage change as follows: Your problem is to calculate $\mathrm{Var}(100\cdot (Y-X)/X)$. This can be written as: $100^{2}\mathrm{Var}(Y/X)$. Now we can use the delta method to calculate the approximative variance. The delta method states that an approximation of the variance of a function $g(t)$ is given by: $$ \mathrm{Var}(g(t))\approx \sum_{i=1}^{k}g'_{i}(\theta)^{2}\mathrm{Var}(t_{i})+2\sum_{i>j}g'_{i}(\theta)g'_{j}(\theta)\mathrm{Cov}(t_{i},t_{j}) $$ Your function $g(t)$ is: $g(\mu_{X},\mu_{Y})=\mu_{Y}/\mu_{X}$. For the variance, we need the partial derivatives of $g(\mu_{X},\mu_{Y})$: $$ \begin{align} \frac{\partial}{\partial \mu_{X}}g(\mu_{X},\mu_{Y}) & = -\frac{\mu_{Y}}{\mu_{X}^{2}} \\ \frac{\partial}{\partial \mu_{Y}}g(\mu_{X},\mu_{Y}) &= \frac{1}{\mu_{X}} \\ \end{align} $$ Using the function for the variance above, we get:

$$ \mathrm{Var}(Y/X)\approx\left(\frac{\mu_{Y}^{2}}{\mu_{X}^{4}}\right)\mathrm{Var}(X) + \left(\frac{1}{\mu_{X}^{2}}\right)\mathrm{Var}(Y)-2\cdot \left(\frac{\mu_{Y}}{\mu_{X}^{3}}\right)\mathrm{Cov}(X,Y) $$ So the estimated standard error of the percentage change would be: $$ \mathrm{SE}(100\cdot (Y-X)/X)\approx100\cdot \sqrt{\frac{\mathrm{Var}(Y)\mu_{X}^{2}-2\cdot\mathrm{Cov}(X,Y)\mu_{X}\mu_{Y}+\mathrm{Var}(X)\mu_{Y}^{2}}{\mu_{X}^4}} $$ If $X$ and $Y$ are independent (i.e. $\mathrm{Cov}(X,Y)=0$), the formula simplifies to: $$ \mathrm{SE}(100\cdot (Y-X)/X)\approx100\cdot \sqrt{\frac{\mathrm{Var}(Y)\mu_{X}^{2}+\mathrm{Var}(X)\mu_{Y}^{2}}{\mu_{X}^4}} $$

  • the link connection does not exist any more – Stat-R Jul 5 '17 at 18:35

Not the answer you're looking for? Browse other questions tagged or ask your own question.