2
$\begingroup$

The resulting $t$ statistic from a t-test follows a t-distribution with parameter $k = $ freedom-degrees. For us to compute the probability of $t$ to occur, we use the cumulative distribution function of the t-distribution ($CDF_t$).

For a left-sided test, this is equal to finding the probability on the y-axis of the CDF, which intersects with the given $t$ value.

For a right-sided test, this is equal to 1 - the left-sided p-value.

What about the two-sided test? I am not sure how this p-value is computed using the CDF.

So far I have only seen this method: (from https://stackoverflow.com/questions/45045802/how-to-do-a-one-tail-pvalue-calculate-in-python)

$ p = CDF_t(t , df) * 2$

i.e. the left-sided p-value multiplied by two.. which strikes me as odd, as the p-value ranges from 0 to 1, this equation generates a p-value in the domain [0-2].

$\endgroup$

1 Answer 1

1
$\begingroup$

For an easy way of understanding, the two sided $p$ value turns out to be equal to double the smallest one-sided $p$ value. Since these sum to 1, the smallest is in the domain [0-0.5], so the two sided is in the domain [0,1].

$\endgroup$
3
  • 1
    $\begingroup$ This is easy and (crucially) correct, but why do you say it’s intuitive? Perhaps you can elaborate on that. $\endgroup$
    – Dave
    Apr 30, 2020 at 21:29
  • $\begingroup$ I guess intuitive wasn't the right word to use. Kind of meant easy to remember. Edited that out of the answer $\endgroup$
    – E. Rei
    Apr 30, 2020 at 21:36
  • 1
    $\begingroup$ @H.Green that makes sense. But it also means that the equation I wrote in the question is incomplete right? $\endgroup$
    – hirschme
    Apr 30, 2020 at 22:22

Your Answer

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

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