The p test is used for hypothesis testing to determine whether the the difference between the observed and alternative hypothesis is statistically significant.

We can use a one sided or two side p-value

Essentially we would use a two tail if our alternate hypothesis if our alternative hypothesis is that there is a difference. This means we are looking at the area in the tails as seen on the left. For our restaurant example seen in our t-test, our alternative hypothesis was it would not take 25 minutes hence we would use the two tail.

However, if our alternative hypothesis is that the time for a meal to come would take more then 25 minutes we would use the one sided t test as seen on the right. However, this runs the risk of missing it if the meal takes less then 25 minutes to come.

We should set a significance level to know what size our p-value needs to be in order for our results to have statistical significance. It is convention to use 0.05 as your significance level.

So reject H_{0 }if our p value is less then the significance level

Fail to reject H_{0} if our p value is greater then the significance level