Solved – the p-value for paired t-test if the two set of data are identical

As in the title, I have two sets of data that are identical. I performed a paired t-test using R.

The p-value for the difference estimated (which is essentially 0) is NaN.

I wonder if there can be a theoretical p-value for this case.

  1. If the two sets of data are identical because the variables are defined on a discrete set of values, then the assumptions of the t-test are false, since the random variables aren't even continuous.

    As such, any normal-theory calculation would not yield the correct p-values.

    I think the "correct" t-test p-value would be NaN.

  2. Alternatively, consider the degenerate case where continuous variables have finite variance but the differences have variance 0. Then the t-statistic would be 0/0; again I'd say that's "correctly" NaN. (edit: more details of that argument are in a comment)

  3. However, if you (for example) assumed some discrete distribution for the differences and derived say a likelihood ratio test, or did a permutation test, you'd get a (legitimate) p-value of 1, since anything but zero-differences would be "more extreme" than all-0-differences.

So I think justifiable p-values for a t-test will actually be what R gave you, while justifiable p-values if you have discrete variables and choose a more appropriate test would generally be 1.

Similar Posts:

Rate this post

Leave a Comment