# Standard deviation of the Ratio of two means

#### shanshuiii

##### New Member
Hi, guys

I have two sets of data: A and B.

I want to calculate a ratio of average(A)/average(B).

I wonder if there is a way to get the standard deviation of this ratio?

thanks.

#### ichbin

##### New Member
Suppose avg(A) and avg(B) are normally distributed. This will be exactly true if A and B are normally distributed, because a sum of normally distributed deviates is itself normally distributed. It will be approximately true for large samples however A and B are distributed, by the central limit theorem.

Then what you are asking is how the ratio of two independent normal deviates is distributed. The answer is the Cauchy distribution. (http://en.wikipedia.org/wiki/Normal_distribution#Related_distributions)

The Cauchy distribution has infinite variance, so your ratio's standard deviation is infinite.

#### BGM

##### TS Contributor
Using Taylor Expansion, you can easily see the result:

Let $$f(x, y) = \frac {x} {y}$$

Then $$\frac {\partial f} {\partial x} = \frac {1} {y}, \frac {\partial f} {\partial y} = - \frac {x} {y^2}$$

Taylor Expand at $$(\mu_X, \mu_Y)$$, we have

$$Var\left[\frac {X} {Y}\right] \approx Var\left[\frac {\mu_X} {\mu_Y} + \frac {1} {\mu_Y}(X - \mu_X) - \frac {\mu_X} {\mu_Y^2}(Y - \mu_Y) \right]$$

$$= Var\left[\frac {1} {\mu_Y} X - \frac {\mu_X} {\mu_Y^2}Y\right]$$

$$= \frac {1} {\mu_Y^2}Var[X] + \frac {\mu_X^2} {\mu_Y^4}Var[Y] - 2\frac {\mu_X} {\mu_Y^3}Cov[X, Y]$$

#### shanshuiii

##### New Member
Using Taylor Expansion, you can easily see the result:

Let $$f(x, y) = \frac {x} {y}$$

Then $$\frac {\partial f} {\partial x} = \frac {1} {y}, \frac {\partial f} {\partial y} = - \frac {x} {y^2}$$

Taylor Expand at $$(\mu_X, \mu_Y)$$, we have

$$Var\left[\frac {X} {Y}\right] \approx Var\left[\frac {\mu_X} {\mu_Y} + \frac {1} {\mu_Y}(X - \mu_X) - \frac {\mu_X} {\mu_Y^2}(Y - \mu_Y) \right]$$

$$= Var\left[\frac {1} {\mu_Y} X - \frac {\mu_X} {\mu_Y^2}Y\right]$$

$$= \frac {1} {\mu_Y^2}Var[X] + \frac {\mu_X^2} {\mu_Y^4}Var[Y] - 2\frac {\mu_X} {\mu_Y^3}Cov[X, Y]$$
Thanks, I seem to get it.

For my data, A and B are independent, does it mean that Cov(A,B)=0?

#### BGM

##### TS Contributor
Yes if you accept that the independent assumption.

Reminder: As what Ichbin mentioned above, the variance of the ratio is usually
large if the random variable in the denominator have a high probability to
fall in the neighborhood of 0. So make sure, if you have make any distributional
assumptions, check whether the moment exist or not.

#### ltleung

##### New Member
that ratio should follow the ratio normal dist. See this paper: D. V. Hinkley (December 1969). "On the Ratio of Two Correlated Normal Random Variables". Biometrika 56 (3): 635–639 and substitute the corresponding parameters. If the means are zero you should Cauchy dist even the variances of the A and B are not one. Also Cauchy dist is a special case of the ratio normal dist.