# How do you calculate the p-value in a hypothesis test?

##### 1 Answer

Dec 12, 2017

p-value is the probability of getting as or more extreme sample, as observed, if null hypothesis was true. We test this in the direction of alternative hypothesis.

For example: if we test

(probability is obtained from test-statistics distribution, here it came from z-table).