# Test statistics for ratio of means t-test

Standard t-test for two independent samples enables us to test whether sample difference is above some value $$\mu$$. For example:

$$H0:\mu_{X} - \mu_{Y} - \mu \ge 0$$

$$H1: \mu_{X} - \mu_{Y} - \mu < 0$$

Than we use the test statistics for Student t-test (or Welch test), depending on our assumptions about samples' variance (from Wiki, that is why $$X_{2}$$ in formulas):

$${\displaystyle t={\frac {{\bar {X}}_{1}-{\bar {X}}_{2}}{s_{p}\cdot {\sqrt {{\frac {1}{n_{1}}}+{\frac {1}{n_{2}}}}}}}}$$ ; $${\displaystyle s_{p}={\sqrt {\frac {\left(n_{1}-1\right)s_{X_{1}}^{2}+\left(n_{2}-1\right)s_{X_{2}}^{2}}{n_{1}+n_{2}-2}}}}$$

Now suppose I want to test:

$$H0: \mu_{x} / \mu_{Y} \ge 1.2$$

$$H1: \mu_{x} / \mu_{Y} < 1.2$$

In this question I've seen a suggestion to express the hypothesis in terms of logarithms:

$$H0: \log{\mu_{X}} - \log{\mu_{Y}} \ge \log{1.2}$$

$$H1: \log{\mu_{X}} - \log{\mu_{Y}} < \log{1.2}$$

I understand this transformation, but do not know how to derive appropriate test statistic in this case?

Edit: Replaced $$\bar{X}$$ and $$\bar{Y}$$ in hypotheses formulation to remove confusion. Also updated the equality signs.

• Equality belongs in your null, not your alternative – Glen_b Sep 26 '18 at 1:08
• H0 should be $\leq$ in order that a significant $p<0.05$ have the > meaning. – Carl Sep 27 '18 at 8:02

A simpler alternative is to test:

$$H_0: \mu_x - 1.2\mu_y \geq 0$$

vs. the obvious alternative. (Note that the test is not of $$\bar{X} - 1.2\bar{Y} \geq 0$$; as soon as you calculate the two sample means you know for certain whether or not that is true, no testing needed, and what you are really interested in anyway is the relationship between the true means.)

We can then use the Welch (or Student-t) test, slightly modified to take into account the fact that we are multiplying $$\mu_y$$ by $$1.2$$ in our test. The motivation for our modification is as follows. If we define the random variables $$y^*_i, \dots, y^*_{n_2} = 1.2y_1, \dots, 1.2y_{n_2}$$, then $$\mu_{y^*} = 1.2\mu_y$$, and our test can be restated as:

$$H_0: \mu_x - \mu_{y^*} \geq 0$$

Rather than actually multiplying the whole sample by $$1.2$$, we can just note that the variance of $$y^*$$ equals $$1.2^2$$ times the variance of $$y$$, and the mean of $$y^*$$ equals $$1.2$$ times the mean of $$y$$. Plugging this in to the Welch formula gives us:

$${\displaystyle t={\frac {{\bar {X}}_{1}-{1.2\bar {X}}_{2}}{s_{p}\cdot {\sqrt {{\frac {1}{n_{1}}}+{\frac {1}{n_{2}}}}}}}}$$ ; $${\displaystyle s_{p}={\sqrt {\frac {\left(n_{1}-1\right)s_{X_{1}}^{2}+\left(n_{2}-1\right)1.44s_{X_{2}}^{2}}{n_{1}+n_{2}-2}}}}$$

where I have not restated in terms of $$X$$ and $$Y$$ in order to make clearer the relationship between this slightly modified formula and the one in the original question.

• The null should include equality, not the alternative. Otherwise computing the null distribution of the test statistic will actually be at a value under H1 rather than H0. – Glen_b Sep 26 '18 at 1:10
• Thank you for your answers and comments. I get the idea of modifying the the second population $\mu_{y}$ (I meant population means for hyothesis in my question, sorry for the confusion). For my task I'll follow the above answer, but in general case it is still interesting how to derive the test statistic for the log case. Maybe you can advise some literature/articles on the topic. – knst4444 Sep 26 '18 at 7:32
• @Glen_b - fixed. – jbowman Sep 26 '18 at 14:15