Interpreting 1-sample t-test results I have a question around interpretation of results of 1-sample t-test. I am using the test (with SciPy.stats.ttest_1samp function in Python) to check if the existing goal set for a productivity metric is correct. As I understand, for 1-sample t-test:
a) H0: population mean equals the specified mean value (the metric goal in this case)
b) Ha: population mean is different from the specified mean value (metric goal)
I encountered two different explanations for p-value given by the t-test. One says if p-value<alpha, then we reject H0 (https://www.graphpad.com/quickcalcs/oneSampleT1/,  and  https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.ttest_1samp.html) and another which says that we fail to reject H0 (https://www.analyticsvidhya.com/blog/2019/05/statistics-t-test-introduction-r-implementation/)
What is the correct approach to follow?


I encountered two different explanations for p-value given by the t-test. One says if p-value<alpha, then we reject H0 (https://www.graphpad.com/quickcalcs/oneSampleT1/,  and  https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.ttest_1samp.html) and another which says that we fail to reject H0 (https://www.analyticsvidhya.com/blog/2019/05/statistics-t-test-introduction-r-implementation/)

The difference is due to whether you compare the p-value or the t-statistic.

*

*You have either $$\text{p-value} \leq \alpha \quad \iff \quad t \geq t_\text{critical}$$ and the hypothesis becomes rejected.

*Or you have $$\text{p-value} > \alpha \quad \iff \quad t < t_\text{critical}$$  and the hypothesis becomes not rejected.

The two different explanations are not contradictory and you may have been confusing the uses of t-statistic, p-value, and the related inequality signs.
The first explanation uses the situation $\text{p-value} \leq \alpha$. The second uses the situation $t < t_\text{critical}$. So they refer to two different cases. The sign happens to be the same in the two explanations but the one explanation relates to the p-value and the other to the t-statistic.
Related: If p-values are random, why not decide using the test statistic instead?
