## p-Values Calculator

- This tool computes
*p*-values for*Student's t*hypothesis testing. - To use the tool, just submit a
*t*value and its degrees of freedom, υ. - This tool comes handy when you don't have around statistical
*t*-tables or are working with*p*and*t*values or degrees of freedom not available from such tables. Avoid pausing a problem for annoying linear interpolation workarounds!

**About***p*-values

A*p*-value is used in null hypothesis (*H*) significance testing. We first define_{0}*H*and a threshold value_{0}*α*for*p*, typically 5% or 1%, where*α*is referred to as the confidence level of the test. If*p*is calculated properly, the test guarantees that the Type I error rate is at most*α*(Wikipedia, 2017a).For instance, for a typical two-tailed test adopting

*α*= 0.05,*H*is rejected when_{0}*p < α*= 0.05-
*H*is not rejected when_{0}*p > α*= 0.05.

A similar reasoning applies for a one-tailed test, for instance, adopting a confidence level

*α*= 0.05/2 = 0.0250.If

*H*is rejected, the experiment was conclusive at the confidence level selected, meaning the data is sufficiently inconsistent with_{0}*H*. By contrast, if_{0}*H*is not rejected, the experiment is inconclusive at the chosen confidence level, so the data is sufficiently consistent with_{0}*H*._{0}Evidently, a

*p*-value is only a tool for addressing whether to reject*H*. Consider this:_{0}*p*<*α*suggests that the observed data is so sufficiently inconsistent with*H*that it may be rejected. On the other hand,_{0}*p*>*α*does not prove that*H*can be accepted. It only means that it cannot be rejected with the sample data examined. We can do better by formulating an alternative hypothesis known to be true,_{0}*H*so if_{1}*H*is rejected, we could accept_{0}*H*._{1}However, to accept

*H*, we must consistently reject_{1}*H*. This can be done by increasing the statistical power of the test, by increasing_{0}*α*; for instance, from 0.01 to 0.05 to 0.10. Thus, if one end rejecting*H*more often, there is a greater chance of safely accepting_{0}*H*(Trochim, 2006)._{1}**Calculating***p*-values for*t*-testing Hypotheses

Given*t*and υ,*p*-values can be computed from the Cumulative Distribution Function (CDF) of the*Student's t Distribution*by integrating its Probability Distribution Function (PDF). These functions are shown below (Wikipedia, 2017b).(1)

(2)

where Γ stands for a gamma function and

_{2}*F*_{1}for a hypergeometric function with two parameters in its numerator and one in its denominator.Numerical approximation methods are required to solve these functions, particularly considering that (2) is valid for

*t*υ. One of such approximations are given as equations 26.7.3 and 26.7.4 in Abramowitz and Stegun (1972).^{2}<Computing

*t*from a*p*-value for a given υ is also possible by inverting the CDF to compute the Quantile Function (QF), also known as the inverse CDF. (Wikipedia, 2017c).For the reverse calculations, computing

*t*-values from*p*-values, you may want to use our t-values Calculator.In addition, our t,p & Effect Size Estimator tool allows you to easily move back-and-forth between calculations, then between CDF and ICDF transforms.

Abramowitz and Stegun (1972), Shaw (2006), and Culham (2004) describe these functions extensively. Introductory discussions on

*p*-values are given elsewhere (Bowles, 2013; Willet, 2016).

- Anyone that need to compute
*p*-values for*t*-test hypothesis testing.

- From 20 pairs of measurements from a population you find a Pearson correlation coefficient equal to
*r*= 0.495. Calculate a*p*-value for this correlation.

Hint. Calculate first*t*from*r*. - In the previous exercise: Compute a range of significance levels that allows you to conclude that a significant correlation exits in the population.

- Abramowitz, M. and Stegun, I. A. (1972).
Handbook of Mathematical Functions.

p. 948-949. National Bureau of Standards. See also full pdf. - Bowles, C. (2013). The P-Value "Formula," Testing Your Hypothesis.
- Culham, J. R. (2004).Factorial, Gamma and Beta Functions.
- Shaw, W. T. (2006). Sampling Student's
T distribution - Use of the inverse cumulative distribution function.

Computational Finance Notes 2011-12, JCF Volume 9/Number 4, Summer 2006. - Trochim, W.M.K. (2006). Statistical Power.
- Wikipedia (2017a). p-value.
- Wikipedia (2017b). Student's t-distribution.
- Wikipedia (2017c). Quantile function.
- Willet, R. (2016). t-tests and p-value.

#### Feedback

Contact us for any suggestion or question regarding this tool.