How to find a p-value

A p-value is the probability of getting a sample result at least as extreme as yours, assuming the null hypothesis is true. To find one, you need four things:

A printed page with a stacked bar chart and a line graph
Charts on a printed report, where a p-value compares a result with the null hypothesis.Photo: Goumbik / Pixabay
  1. 1

    Two hypotheses

    The null H₀ and the alternative Hₐ.

  2. 2

    A test statistic

    Such as z or t, computed from your sample.

  3. 3

    The tail

    Left, right or two-tailed, from Hₐ.

  4. 4

    A table or software

    Turns the statistic into a probability.

Do your homework in Evernote. The AI Assistant explains any problem you photograph, step by step.

Keep your formulas in Evernote

How to find a p-value in 6 steps

  1. 1

    State the hypotheses

    H₀ is the "no effect" claim, such as μ = 100. Hₐ is what you suspect: μ > 100, μ < 100 or μ ≠ 100.

  2. 2

    Pick the test

    For a mean with a known population standard deviation σ, use a z-test. If σ is unknown and you use the sample's s, use a t-test with n − 1 degrees of freedom.

  3. 3

    Compute the test statistic

    For a z-test, z = (x̄ − μ₀) ÷ (σ ÷ √n). It counts how many standard errors your sample mean is from the hypothesized mean.

  4. 4

    Find the tail area

    Look up the area beyond your statistic in a z (or t) table, or with software. Right-tailed: area to the right. Left-tailed: area to the left.

  5. 5

    Double it for a two-tailed test

    When Hₐ says "not equal", extreme results in either direction count, so p = 2 × the one-tail area.

  6. 6

    Compare with α

    If p ≤ α (for example 0.05), reject H₀. If p > α, do not reject H₀. A large p-value does not prove H₀ is true.

p-value example

Two-tailed z-test for a mean, σ known

Test scores have σ = 15. A class of n = 36 has x̄ = 104.5. At α = 0.05, is the mean different from 100?

  1. 1HypothesesH₀: μ = 100. Hₐ: μ ≠ 100 (two-tailed)
  2. 2Testz-test, because σ is known
  3. 3Statisticz = (104.5 − 100) ÷ (15 ÷ √36) = 4.5 ÷ 2.5 = 1.8
  4. 4One tailP(Z > 1.8) = 1 − 0.9641 = 0.0359
  5. 5Two tailsp = 2 × 0.03593 = 0.0719
  6. 6Decision0.0719 > 0.05, so do not reject H₀

p ≈ 0.072: not enough evidence at α = 0.05 that the mean differs from 100

If the question had been "is the mean greater than 100?", the test would be right-tailed with p ≈ 0.036, and you would reject H₀. Decide the tail before you look at the data.

One-tailed or two-tailed?

The alternative hypothesis decides which tail areas count toward the p-value.

HₐTestp-value
μ > μ₀Right-tailedArea to the right of the statistic
μ < μ₀Left-tailedArea to the left of the statistic
μ ≠ μ₀Two-tailed2 × the area beyond |statistic|

OpenStax Introductory Statistics 2e, chapter 9 "Hypothesis Testing with One Sample", sections 9.4 and 9.5; z value from the standard normal table.

Trusted by Millions Worldwide

4.4

2,100+ reviews on G2

4.4

8,200+ reviews on Capterra

4.4

73,000+ reviews on App Store

248M

Registered users

p-value questions

What does a p-value tell you?

How surprising your data would be if the null hypothesis were true. A small p-value means a result like yours would be rare under H₀, which counts as evidence against it.

What is a significant p-value?

One at or below the significance level α you chose before the test, for example 0.05.

Is the p-value the probability that the null hypothesis is true?

No. It assumes H₀ is true and gives the probability of data at least as extreme as yours. It does not measure the probability of either hypothesis.

How do I find a p-value in Excel or Google Sheets?

For a z statistic, the right-tail area is =1-NORM.S.DIST(z,TRUE) in Excel, or =1-NORMSDIST(z) in Google Sheets. Double it for a two-tailed test.

How do I find a p-value from a t statistic?

Use a t table or software with n − 1 degrees of freedom. The tail logic is the same as for z.

What does "fail to reject" mean?

The data do not give strong enough evidence against H₀ at your α. It is not the same as showing H₀ is true.

Why is a two-tailed p-value twice the one-tailed one?

For symmetric distributions like z and t, the area beyond −|z| equals the area beyond |z|, and a two-tailed test counts both.

How to keep your statistics steps with Evernote

Keep a Math notebook with your statistics formula sheet and a note for each problem you photograph.

  1. 1

    Build a formula sheet.

    Ask the AI Assistant to add the z statistic formula to your statistics formula sheet, with one worked example. It writes the formula in a formula block, so it reads like the textbook.

  2. 2

    Explain a problem.

    Add a photo of your statistics problem, such as the class mean test, and ask the Assistant to explain it step by step. It reads the photo and adds the steps under it.

  3. 3

    Practice before the test.

    Ask the Assistant for a repeating practice task, such as 10 p-value problems every Tuesday and Thursday until the test. You get a reminder each time.

  • You can also search for a word in your photographed worksheets and find the page.
  • You can also draw a graph by hand in a sketch block.
  • You can also ask the AI Assistant to write practice problems from your notes, with answers.

Keep every formula and worked example in one place

Build a formula sheet, photograph a problem for a step-by-step explanation, and practice on a schedule before the test.

Start for free