The odds of getting results that are as extreme if not more than our data is the p-value. This is based on the idea of the hypothesis is false ergo the null hypothesis is true. The smaller the p-value the lower the odds of the results randomly occurring, so the greater chance that the hypothesis is actually true.
We will be doing a right tailed test using \(T\) as our test stat and observed value \(t_{\text{obs}}\), the p-value is \[ \small \text{p-value} = P_{Null Hypothesis}\!\big(T \ge t_{\text{obs}}\big). \] For a two-sided test, \[ \small \text{p-value} = 2\,\min\!\Big\{P_{Null Hypothesis}\!\small(T \le t_{\text{obs}}\small),\; P_{Null Hypothesis}\!\small(T \ge t_{\text{obs}}\small)\Big\}. \]