3
$\begingroup$

The unpaired $t$-test is commonly used to reject the null hypothesis that two sample means are equal.

However, suppose one wants to prove that the sample means are no different than some given maximal difference, i.e. we want to reject the hypothesis $|\mu_1-\mu_2|>y\%$. Moreover, suppose we have an a priori estimate of the pooled sample variance $\sigma^2$.

How can one calculate the minimal sample size needed $n$ so that we can reject this hypothesis with a given power?

$\endgroup$
4
  • $\begingroup$ Null hypotheses typically do not have strict inequality, and are usually specified as based on "(almost) no difference" rather than "at least some specified absolute difference" which is strangely two-tailed. You might also say what $y\%$ means here: is that a percentage of $\mu_1$ or $\mu_2$? $\endgroup$
    – Henry
    Commented Nov 3, 2022 at 9:13
  • $\begingroup$ @Henry - The percentage shouldn't matter that much, it can be quantified as a specific number or a percentage of the mean of means, either the way the math should be the same. $\endgroup$ Commented Nov 3, 2022 at 14:24
  • $\begingroup$ @Henry - Do see my answer below. $\endgroup$ Commented Nov 3, 2022 at 20:58
  • 1
    $\begingroup$ Look for TOST : two one-sided t-tests $\endgroup$
    – Roger V.
    Commented Nov 8, 2022 at 11:01

1 Answer 1

0
$\begingroup$

A possible approach:

Using the CDF of the student-$t$ distribution: $$F(t)=1-\frac{1}{2}I_x(\nu/2,1/2),\quad x \equiv \frac{\nu}{\nu+t^2}$$ The $p$-value for the hypothesis $H_0:|\mu_1-\mu_2|>y$ assuming equal sample sizes and average standard deviation $\sigma$ is: $$t=\frac{\mu_1 - \mu_2}{\sigma\sqrt{2/N}} $$ $$P(H_0)=2-2F\left(\sqrt{\frac{N}{2}}\frac{y}{\sigma}\right)$$ If one is given a priori values of $y$ and $\sigma$ in terms of percentages of the expected value, one can then calculate $N$ for a given $p$-value. This answer is incomplete as it does not give $N$ explicitly nor does it give the dependence of $N$ on the power.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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