p-value Calculator | Formula | Interpretation (2024)

Created by Bogna Szyk and Anna Szczepanek, PhD

Reviewed by

Jack Bowater

Last updated:

Jan 18, 2024

Table of contents:
  • What is p-value?
  • How do I calculate p-value from test statistic?
  • How to interpret p-value?
  • How to use the p-value calculator to find p-value from test statistic?
  • How do I find p-value from z-score?
  • How do I find p-value from t?
  • p-value from chi-square score (χ² score)
  • p-value from F-score
  • FAQ

Welcome to our p-value calculator! You will never again have to wonder how to find the p-value, as here you can determine the one-sided and two-sided p-values from test statistics, following all the most popular distributions: normal, t-Student, chi-squared, and Snedecor's F.

P-values appear all over science, yet many people find the concept a bit intimidating. Don't worry – in this article, we will explain not only what the p-value is but also how to interpret p-values correctly. Have you ever been curious about how to calculate the p-value by hand? We provide you with all the necessary formulae as well!

🙋 If you want to revise some basics from statistics, our normal distribution calculator is an excellent place to start.

What is p-value?

Formally, the p-value is the probability that the test statistic will produce values at least as extreme as the value it produced for your sample. It is crucial to remember that this probability is calculated under the assumption that the null hypothesis H0 is true!

More intuitively, p-value answers the question:

Assuming that I live in a world where the null hypothesis holds, how probable is it that, for another sample, the test I'm performing will generate a value at least as extreme as the one I observed for the sample I already have?

It is the alternative hypothesis that determines what "extreme" actually means, so the p-value depends on the alternative hypothesis that you state: left-tailed, right-tailed, or two-tailed. In the formulas below, S stands for a test statistic, x for the value it produced for a given sample, and Pr(event | H0) is the probability of an event, calculated under the assumption that H0 is true:

  1. Left-tailed test: p-value = Pr(S ≤ x | H0)

  2. Right-tailed test: p-value = Pr(S ≥ x | H0)

  3. Two-tailed test:

    p-value = 2 × min{Pr(S ≤ x | H0), Pr(S ≥ x | H0)}

    (By min{a,b}, we denote the smaller number out of a and b.)

    If the distribution of the test statistic under H0 is symmetric about 0, then:
    p-value = 2 × Pr(S ≥ |x| | H0)

    or, equivalently:
    p-value = 2 × Pr(S ≤ -|x| | H0)

As a picture is worth a thousand words, let us illustrate these definitions. Here, we use the fact that the probability can be neatly depicted as the area under the density curve for a given distribution. We give two sets of pictures: one for a symmetric distribution and the other for a skewed (non-symmetric) distribution.

  • Symmetric case: normal distribution:
p-value Calculator | Formula | Interpretation (1)
  • Non-symmetric case: chi-squared distribution:
p-value Calculator | Formula | Interpretation (2)

In the last picture (two-tailed p-value for skewed distribution), the area of the left-hand side is equal to the area of the right-hand side.

How do I calculate p-value from test statistic?

To determine the p-value, you need to know the distribution of your test statistic under the assumption that the null hypothesis is true. Then, with the help of the cumulative distribution function (cdf) of this distribution, we can express the probability of the test statistics being at least as extreme as its value x for the sample:

  1. Left-tailed test:

    p-value = cdf(x).

  2. Right-tailed test:

    p-value = 1 - cdf(x).

  3. Two-tailed test:

    p-value = 2 × min{cdf(x) , 1 - cdf(x)}.

    If the distribution of the test statistic under H0 is symmetric about 0, then a two-sided p-value can be simplified to p-value = 2 × cdf(-|x|), or, equivalently, as p-value = 2 - 2 × cdf(|x|).

The probability distributions that are most widespread in hypothesis testing tend to have complicated cdf formulae, and finding the p-value by hand may not be possible. You'll likely need to resort to a computer or to a statistical table, where people have gathered approximate cdf values.

Well, you now know how to calculate the p-value, but… why do you need to calculate this number in the first place? In hypothesis testing, the p-value approach is an alternative to the critical value approach. Recall that the latter requires researchers to pre-set the significance level, α, which is the probability of rejecting the null hypothesis when it is true (so of type I error). Once you have your p-value, you just need to compare it with any given α to quickly decide whether or not to reject the null hypothesis at that significance level, α. For details, check the next section, where we explain how to interpret p-values.

How to interpret p-value?

As we have mentioned above, the p-value is the answer to the following question:

Assuming that I live in a world where the null hypothesis holds, how probable is it that, for another sample, the test I'm performing will generate a value at least as extreme as the one I observed for the sample I already have?

What does that mean for you? Well, you've got two options:

  • A high p-value means that your data is highly compatible with the null hypothesis; and
  • A small p-value provides evidence against the null hypothesis, as it means that your result would be very improbable if the null hypothesis were true.

However, it may happen that the null hypothesis is true, but your sample is highly unusual! For example, imagine we studied the effect of a new drug and got a p-value of 0.03. This means that in 3% of similar studies, random chance alone would still be able to produce the value of the test statistic that we obtained, or a value even more extreme, even if the drug had no effect at all!

The question "what is p-value" can also be answered as follows: p-value is the smallest level of significance at which the null hypothesis would be rejected. So, if you now want to make a decision on the null hypothesis at some significance level α, just compare your p-value with α:

  • If p-value ≤ α, then you reject the null hypothesis and accept the alternative hypothesis; and
  • If p-value ≥ α, then you don't have enough evidence to reject the null hypothesis.

Obviously, the fate of the null hypothesis depends on α. For instance, if the p-value was 0.03, we would reject the null hypothesis at a significance level of 0.05, but not at a level of 0.01. That's why the significance level should be stated in advance and not adapted conveniently after the p-value has been established! A significance level of 0.05 is the most common value, but there's nothing magical about it. Here, you can see what too strong a faith in the 0.05 threshold can lead to. It's always best to report the p-value, and allow the reader to make their own conclusions.

Also, bear in mind that subject area expertise (and common reason) is crucial. Otherwise, mindlessly applying statistical principles, you can easily arrive at statistically significant, despite the conclusion being 100% untrue.

How to use the p-value calculator to find p-value from test statistic?

As our p-value calculator is here at your service, you no longer need to wonder how to find p-value from all those complicated test statistics! Here are the steps you need to follow:

  1. Pick the alternative hypothesis: two-tailed, right-tailed, or left-tailed.

  2. Tell us the distribution of your test statistic under the null hypothesis: is it N(0,1), t-Student, chi-squared, or Snedecor's F? If you are unsure, check the sections below, as they are devoted to these distributions.

  3. If needed, specify the degrees of freedom of the test statistic's distribution.

  4. Enter the value of test statistic computed for your data sample.

  5. Our calculator determines the p-value from the test statistic and provides the decision to be made about the null hypothesis. The standard significance level is 0.05 by default.

Go to the advanced mode if you need to increase the precision with which the calculations are performed or change the significance level.

How do I find p-value from z-score?

In terms of the cumulative distribution function (cdf) of the standard normal distribution, which is traditionally denoted by Φ, the p-value is given by the following formulae:

  1. Left-tailed z-test:

    p-value = Φ(Zscore)

  2. Right-tailed z-test:

    p-value = 1 - Φ(Zscore)

  3. Two-tailed z-test:

    p-value = 2 × Φ(−|Zscore|)

    or

    p-value = 2 - 2 × Φ(|Zscore|)

🙋 To learn more about Z-tests, head to Omni's Z-test calculator.

We use the Z-score if the test statistic approximately follows the standard normal distribution N(0,1). Thanks to the central limit theorem, you can count on the approximation if you have a large sample (say at least 50 data points) and treat your distribution as normal.

A Z-test most often refers to testing the population mean, or the difference between two population means, in particular between two proportions. You can also find Z-tests in maximum likelihood estimations.

p-value Calculator | Formula | Interpretation (3)

How do I find p-value from t?

The p-value from the t-score is given by the following formulae, in which cdft,d stands for the cumulative distribution function of the t-Student distribution with d degrees of freedom:

  1. Left-tailed t-test:

    p-value = cdft,d(tscore)

  2. Right-tailed t-test:

    p-value = 1 - cdft,d(tscore)

  3. Two-tailed t-test:

    p-value = 2 × cdft,d(−|tscore|)

    or

    p-value = 2 - 2 × cdft,d(|tscore|)

Use the t-score option if your test statistic follows the t-Student distribution. This distribution has a shape similar to N(0,1) (bell-shaped and symmetric) but has heavier tails – the exact shape depends on the parameter called the degrees of freedom. If the number of degrees of freedom is large (>30), which generically happens for large samples, the t-Student distribution is practically indistinguishable from the normal distribution N(0,1).

p-value Calculator | Formula | Interpretation (4)

The most common t-tests are those for population means with an unknown population standard deviation, or for the difference between means of two populations, with either equal or unequal yet unknown population standard deviations. There's also a t-test for paired (dependent) samples.

🙋 To get more insights into t-statistics, we recommend using our t-test calculator.

p-value from chi-square score (χ² score)

Use the χ²-score option when performing a test in which the test statistic follows the χ²-distribution.

This distribution arises if, for example, you take the sum of squared variables, each following the normal distribution N(0,1). Remember to check the number of degrees of freedom of the χ²-distribution of your test statistic!

p-value Calculator | Formula | Interpretation (5)

How to find the p-value from chi-square-score? You can do it with the help of the following formulae, in which cdfχ²,d denotes the cumulative distribution function of the χ²-distribution with d degrees of freedom:

  1. Left-tailed χ²-test:

    p-value = cdfχ²,d(χ²score)

  2. Right-tailed χ²-test:

    p-value = 1 - cdfχ²,d(χ²score)

    Remember that χ²-tests for goodness-of-fit and independence are right-tailed tests! (see below)

  3. Two-tailed χ²-test:

    p-value = 2 × min{cdfχ²,d(χ²score), 1 - cdfχ²,d(χ²score)}

    (By min{a,b}, we denote the smaller of the numbers a and b.)

The most popular tests which lead to a χ²-score are the following:

  • Testing whether the variance of normally distributed data has some pre-determined value. In this case, the test statistic has the χ²-distribution with n - 1 degrees of freedom, where n is the sample size. This can be a one-tailed or two-tailed test.

  • Goodness-of-fit test checks whether the empirical (sample) distribution agrees with some expected probability distribution. In this case, the test statistic follows the χ²-distribution with k - 1 degrees of freedom, where k is the number of classes into which the sample is divided. This is a right-tailed test.

  • Independence test is used to determine if there is a statistically significant relationship between two variables. In this case, its test statistic is based on the contingency table and follows the χ²-distribution with (r - 1)(c - 1) degrees of freedom, where r is the number of rows, and c is the number of columns in this contingency table. This also is a right-tailed test.

p-value from F-score

Finally, the F-score option should be used when you perform a test in which the test statistic follows the F-distribution, also known as the Fisher–Snedecor distribution. The exact shape of an F-distribution depends on two degrees of freedom.

p-value Calculator | Formula | Interpretation (6)

To see where those degrees of freedom come from, consider the independent random variables X and Y, which both follow the χ²-distributions with d1 and d2 degrees of freedom, respectively. In that case, the ratio (X/d1)/(Y/d2) follows the F-distribution, with (d1, d2)-degrees of freedom. For this reason, the two parameters d1 and d2 are also called the numerator and denominator degrees of freedom.

The p-value from F-score is given by the following formulae, where we let cdfF,d1,d2 denote the cumulative distribution function of the F-distribution, with (d1, d2)-degrees of freedom:

  1. Left-tailed F-test:

    p-value = cdfF,d1,d2(Fscore)

  2. Right-tailed F-test:

    p-value = 1 - cdfF,d1,d2(Fscore)

  3. Two-tailed F-test:

    p-value = 2 × min{cdfF,d1,d2(Fscore), 1 - cdfF,d1,d2(Fscore)}

    (By min{a,b}, we denote the smaller of the numbers a and b.)

Below we list the most important tests that produce F-scores. All of them are right-tailed tests.

  • A test for the equality of variances in two normally distributed populations. Its test statistic follows the F-distribution with (n - 1, m - 1)-degrees of freedom, where n and m are the respective sample sizes.

  • ANOVA is used to test the equality of means in three or more groups that come from normally distributed populations with equal variances. We arrive at the F-distribution with (k - 1, n - k)-degrees of freedom, where k is the number of groups, and n is the total sample size (in all groups together).

  • A test for overall significance of regression analysis. The test statistic has an F-distribution with (k - 1, n - k)-degrees of freedom, where n is the sample size, and k is the number of variables (including the intercept).

    With the presence of the linear relationship having been established in your data sample with the above test, you can calculate the coefficient of determination, R2, which indicates the strength of this relationship. You can do it by hand or use our coefficient of determination calculator.

  • A test to compare two nested regression models. The test statistic follows the F-distribution with (k2 - k1, n - k2)-degrees of freedom, where k1 and k2 are the numbers of variables in the smaller and bigger models, respectively, and n is the sample size.

    You may notice that the F-test of an overall significance is a particular form of the F-test for comparing two nested models: it tests whether our model does significantly better than the model with no predictors (i.e., the intercept-only model).

FAQ

Can p-value be negative?

No, the p-value cannot be negative. This is because probabilities cannot be negative, and the p-value is the probability of the test statistic satisfying certain conditions.

What does a high p-value mean?

A high p-value means that under the null hypothesis, there's a high probability that for another sample, the test statistic will generate a value at least as extreme as the one observed in the sample you already have. A high p-value doesn't allow you to reject the null hypothesis.

What does a low p-value mean?

A low p-value means that under the null hypothesis, there's little probability that for another sample, the test statistic will generate a value at least as extreme as the one observed for the sample you already have. A low p-value is evidence in favor of the alternative hypothesis – it allows you to reject the null hypothesis.

Bogna Szyk and Anna Szczepanek, PhD

Related calculators
  • Sum of Squares Calculator
  • Midrange Calculator
  • Coefficient of Variation Calculator
p-value Calculator | Formula | Interpretation (2024)

FAQs

How do you calculate p-value easily? ›

  1. For a lower-tailed test, the p-value is equal to this probability; p-value = cdf(ts).
  2. For an upper-tailed test, the p-value is equal to one minus this probability; p-value = 1 - cdf(ts).

Can you calculate p-value on calculator? ›

You can get a p-value by doing an inference test, which can be done by pressing the stat key followed by two clicks to the right. There will be a list of tests, and by putting in your numbers, the calculator will give you a p-value.

What is the p-value 5% rule? ›

A p-value less than 0.05 is typically considered to be statistically significant, in which case the null hypothesis should be rejected. A p-value greater than 0.05 means that deviation from the null hypothesis is not statistically significant, and the null hypothesis is not rejected.

Why is 0.05 the threshold for statistical significance? ›

As I was told waaaay back in college, it was arbitrarily chosen by Sir Ronald Fisher (considered by many to be the father of modern statistics.) He had given a lecture and just threw out a value of 5% as being a dividing line to describe an event so improbable that it was probably not due to chance alone.

How do you calculate p by hand? ›

To compute a p-value by hand all you do is find the area “outside” of the test ratio value from step 6 in 'normal curve' – that is your p-value. There are two areas “outside” of your test ratio from step 6 – one on each side of the normal curve. The p-value is the area to the “outside” of the z-scores of -2.0 and 2.0.

How to find p-value on ti84? ›

TI-83 or 84

Type in the hypothesized proportion (p0), X, sample size, arrow over to the ≠, <, > sign that is the same in the problems alternative hypothesis statement then press the [ENTER] key, arrow down to [Calculate] and press the [ENTER] key. The calculator returns the z-test statistic and the p-value.

Can Excel calculate p-value? ›

Using the Data Analysis Toolpak for Regression Analysis

If you need to calculate a P value for a regression analysis, you can use the Data Analysis Toolpak in Excel.

How do you do P on a calculator? ›

When you turn your calculator upside down in hexadecimal mode, you can turn b into q and d into p. Along with q and p, you can make the letters O, D, I, Z, E, h, A, S, g/q, L, B, and G from numbers.

What is the golden rule of p-value? ›

(3) The value 0.05 is the “gold-standard” significance level. We cannot offer a strong recommendation for a “gold-standard” significance level. The number 0.05 was coined by Fisher for convenience (see “The rise of the p value”).

Why is my p-value so low? ›

A small P value means that the difference (correlation, association,...) you observed would happen rarely due to random sampling. There are three possibilities: The null hypothesis of no difference is true, and a rare coincidence has occurred.

Is .05 a good p-value? ›

If the p-value is less than 0.05, it is judged as “significant,” and if the p-value is greater than 0.05, it is judged as “not significant.” However, since the significance probability is a value set by the researcher according to the circ*mstances of each study, it does not necessarily have to be 0.05.

How do you explain p-value to non-technicians? ›

Academically, the P-value is the probability of obtaining results as extreme as the observed data, assuming that the null hypothesis is correct1.

What is a good p-value? ›

The p-value can be perceived as an oracle that judges our results. If the p-value is 0.05 or lower, the result is trumpeted as significant, but if it is higher than 0.05, the result is non-significant and tends to be passed over in silence.

Is p 0.1 significant? ›

Commonly adopted guidelines suggest p < 0.001 as very strong evidence, p < 0.01 as strong evidence, p < 0.05 as moderate evidence, p < 0.1 as weak evidence or a trend, and p ≥ 0.1 as insufficient evidence.

What is the formula for probability with p? ›

The probability mass function of the binomial distribution is f(x)=P[X=x]=(nx)px(1−p)n−x. f ( x ) = P [ X = x ] = ( n x ) p x ( 1 − p ) n − x .

What is an example of a p-value? ›

P-values are expressed as decimals and can be converted into percentage. For example, a p-value of 0.0237 is 2.37%, which means there's a 2.37% chance of your results being random or having happened by chance. The smaller the P-value, the more significant your results are.

Top Articles
Sites Like Craigslist Personals: 20 Top Craigslist Alternatives
Opening Hours, Price and Opinions
Dairy Queen Lobby Hours
jazmen00 x & jazmen00 mega| Discover
Genesis Parsippany
Www.fresno.courts.ca.gov
The UPS Store | Ship & Print Here > 400 West Broadway
Missed Connections Inland Empire
Robot or human?
Phone Number For Walmart Automotive Department
Sarpian Cat
Meritas Health Patient Portal
Char-Em Isd
Sonic Fan Games Hq
Nhl Wikia
Ess.compass Associate Login
Where to Find Scavs in Customs in Escape from Tarkov
Christina Steele And Nathaniel Hadley Novel
Toyota Camry Hybrid Long Term Review: A Big Luxury Sedan With Hatchback Efficiency
Tips on How to Make Dutch Friends & Cultural Norms
Reborn Rich Kissasian
Seeking Arrangements Boston
THE FINALS Best Settings and Options Guide
12 Facts About John J. McCloy: The 20th Century’s Most Powerful American?
Bn9 Weather Radar
Craigslist Panama City Beach Fl Pets
Skymovieshd.ib
Combies Overlijden no. 02, Stempels: 2 teksten + 1 tag/label & Stansen: 3 tags/labels.
Wells Fargo Bank Florida Locations
Ridge Culver Wegmans Pharmacy
Ff14 Laws Order
Mobile Maher Terminal
Orange Pill 44 291
Jr Miss Naturist Pageant
Rocketpult Infinite Fuel
Missouri State Highway Patrol Will Utilize Acadis to Improve Curriculum and Testing Management
Linabelfiore Of
Stafford Rotoworld
Craigslist Jobs Brownsville Tx
Orion Nebula: Facts about Earth’s nearest stellar nursery
Colorado Parks And Wildlife Reissue List
How Does The Common App Work? A Guide To The Common App
About My Father Showtimes Near Amc Rockford 16
The Attleboro Sun Chronicle Obituaries
2017 Ford F550 Rear Axle Nut Torque Spec
Sound Of Freedom Showtimes Near Amc Mountainside 10
Gonzalo Lira Net Worth
Bellelement.com Review: Real Store or A Scam? Read This
Used Auto Parts in Houston 77013 | LKQ Pick Your Part
Optimal Perks Rs3
Jovan Pulitzer Telegram
Latest Posts
Article information

Author: Ray Christiansen

Last Updated:

Views: 5508

Rating: 4.9 / 5 (69 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Ray Christiansen

Birthday: 1998-05-04

Address: Apt. 814 34339 Sauer Islands, Hirtheville, GA 02446-8771

Phone: +337636892828

Job: Lead Hospitality Designer

Hobby: Urban exploration, Tai chi, Lockpicking, Fashion, Gunsmithing, Pottery, Geocaching

Introduction: My name is Ray Christiansen, I am a fair, good, cute, gentle, vast, glamorous, excited person who loves writing and wants to share my knowledge and understanding with you.