# For a two sample t-test, what is the relationship between the p-value and the test statistic?

Suppose we have a two sample t-test where the data have unequal variances and different counts. Let $X_1, \ldots, X_{N_1}$ be the first set of data and $Y_1, \ldots, Y_{N_2}$ be the second set of data. Then, a test statistic for this can be written from the Welch's Two-Sample Test as:

$$T = \dfrac{\bar{X}- \bar{Y}}{\sqrt{\dfrac{s_1^2}{N_1} + \dfrac{s_2^2}{N_2}}}$$

where $s_1^2$ and $s_2^2$ are the sample variances.

Then, by the definition of the p-value, it is the probability of our test statistic being as extreme as our observed data. Hence,

$$p = \mathbb{P}\left(T>t|H_0 \ \text{true}\right)$$

Now, my question is, is $t$ the computed test statistic under the formula:

$$\dfrac{\bar{X}- \bar{Y}}{\sqrt{\dfrac{s_1^2}{N_1} + \dfrac{s_2^2}{N_2}}}$$

using the real data? Do we then MUST know the distributional form of $T$?

• please define p, P and T. – Subhash C. Davar Mar 20 '18 at 11:14
• $p$ is the p-value, $\mathbb{P}$ is a probability operator. $T$ is a test statistic – user321627 Mar 20 '18 at 12:31
• An answer that touches on aspects of your question is here – Glen_b Mar 20 '18 at 14:28
• I'm having trouble parsing "do we then MUST know". Do you mean "Do we then know" or something else? – Glen_b Mar 21 '18 at 2:58
• p= P(T> t|H0 true) Please explain the terms in simple way. – Subhash C. Davar Mar 22 '18 at 15:29