# p value in a testing [duplicate]

Why does a test return the p value?

I am looking at the Diebold-Mariano-Test (DM Test): https://github.com/johntwk/Diebold-Mariano-Test

Basically, this test gives me a DM statistics, and also the p value. So, do I just the p-value to judge a null hypthoesis?

For instance, if p-val > alpha = 0.05, then I reject the null hypothesis, is this correct?

That's because the p-value is small when an observed data point $$P$$ (a result of a test, for example) is (far) in the tail of the null-hypothesis-based distribution.