0
$\begingroup$

I'm trying to do a Welch's t-test of two sample groups which turn to have estimated variance equal to 0.

As could be seen from wikipedia page of Welch's t-test: https://en.wikipedia.org/wiki/Welch%27s_t-test, the formula for calculating the t-stat:

$$ t= \frac{\overline X_1 - \overline X_2}{\sqrt{\frac{s_1^2}{N_1} +\frac{s_2^2}{N_2}}} $$ contains 0 at the denominator and the t-stat could not be calculated (obviously my C++ program retuns me a NaN value...)

I need a way to handle this an calculate the t-test anyway, could you tell me how to proceed in these cases?

$\endgroup$
5
  • $\begingroup$ What do mean by handling the t-test? $\endgroup$
    – Ian_Fin
    Commented Sep 26, 2016 at 17:12
  • $\begingroup$ I mean that I need to calculate the t statistic anyway in order to do the t-test $\endgroup$
    – ela
    Commented Sep 26, 2016 at 17:15
  • $\begingroup$ If the variance is zero, then all the values are identical -- is it true? $\endgroup$
    – Tim
    Commented Sep 26, 2016 at 17:16
  • $\begingroup$ In my data I've found very similar samples, but not identical... $\endgroup$
    – ela
    Commented Sep 26, 2016 at 17:19
  • $\begingroup$ Also see stats.stackexchange.com/questions/86618. $\endgroup$
    – whuber
    Commented Sep 26, 2016 at 17:38

1 Answer 1

0
$\begingroup$

I need a way to handle this an calculate the t-test anyway

You can't. t is undefined. See here.

$\endgroup$

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