## p-value for t-test

If the test statistic $t$ has $t$ distribution with $n$ degrees of freedom, then the $p$-value of the test for testing

a. left-tailed alternative is $p$-value = `$P(t_{n}\leq t)$`

.

b. right-tailed alternative is $p$-value = `$P(t_{n}\geq t)$`

.

c. two-tailed alternative is $p$-value = `$2P(t_{n}\geq |t|)$`

.

## Formula

The $p$-value of t-test for left tailed alternative is

### $p$-value = $P(t_{n}\leq t)$

The $p$-value of t-test for right tailed alternative is

### $p$-value = $P(t_{n}\geq t)$

The $p$-value of t-test for two tailed alternative is

### $p$-value = $2P(t_{n}\geq |t|)$

where,

`$t$`

is the value of test statistic,`$n$`

is the degrees of freedom.