6. 1 Calculating the p-value
To find the p-value corresponding to the z-statistic, we use Excel’s NORM.S.DIST(z, cumulative) function. The calculation method depends on the specific null hypothesis you are testing. Let us explore this in detail:
NORM.S.DIST(z, cumulative) function:
Where:
- "z" is the calculated z-statistic
- cumulative" is a logical value:
- TRUE returns the cumulative distribution function
- FALSE returns the probability density function
For hypothesis testing, we typically use the cumulative distribution function (TRUE).
Calculating p-values based on the null hypothesis:
1. For a two-tailed test:
First, take the absolute value of your z-statistic, which is denoted as |z|.
- p-value = 2 * (1 - NORM.S.DIST(|z|, TRUE))
We use the absolute value in two-tailed tests because we are interested in the magnitude of the deviation from the null hypothesis, regardless of its direction. This approach leverages the symmetry of the normal distribution and simplifies our calculations.
2. For a one-tailed test (upper tail): sample mean greater than or equal to hypothesised value
- p-value = 1 - NORM.S.DIST(z, TRUE)
3. For a one-tailed test (lower tail): sample mean less than or equal to hypothesised value
- p-value = NORM.S.DIST(z, TRUE)
This distinction is crucial because the direction of your hypothesis determines how you interpret the area under the normal distribution curve. By correctly aligning your p-value calculation with your null hypothesis, you ensure accurate interpretation of your statistical results.
Explanation in terms of probability:
- Two-tailed test: The p-value represents the probability of observing a test statistic as extreme as, or more extreme than, the calculated z-statistic in either direction, assuming the null hypothesis is true. We multiply by 2 to account for both tails of the distribution.
- Upper-tail test: The p-value represents the probability of observing a test statistic as extreme as, or more extreme than, the calculated z-statistic in the upper tail, assuming the null hypothesis is true.
- Lower-tail test: The p-value represents the probability of observing a test statistic as extreme as, or more extreme than, the calculated z-statistic in the lower tail, assuming the null hypothesis is true.
Remember, the z-statistic represents how many standard deviations your sample mean is from the population mean under the null hypothesis. The NORM.S.DIST() function then translates this z-statistic into a probability, allowing you to make informed decisions about rejecting or failing to reject your null hypothesis in various business scenarios.
In our marketing campaign (upper-tail test) example, we calculated a z-statistic of 2.58. To find the probability represented by this z-statistic, we use: =NORM.S.DIST(2.58, TRUE)

This returns approximately 0.9951, or 99.51%.
Under the null hypothesis (assuming the marketing campaign had no effect), there is a 99.51% chance that we would observe a z-statistic less than or equal to 2.58.
The p-value represents the probability of obtaining a result as extreme as, or more extreme than, the observed result, assuming the null hypothesis is true.
In our one-tailed test looking for an increase, “more extreme” means values greater than our observed z-statistic. To calculate the p-value, we find the area in the tail beyond our z-statistic:
p-value = 1 - 0.9951 = 0.0049 or 0.49%
To visualise this (Figure 15):
- The area to the left of z = 2.58 under the standard normal curve (approximately 99.51% of the total area).
- The p-value gives us the remaining area to the right of z = 2.58 (approximately 0.49% of the total area).
For our marketing campaign example, this means:
- Under the null hypothesis (assuming the campaign had no effect), there is a 99.51% chance that we would observe a z-statistic less than or equal to 2.58.
- There is only a 0.49% chance (our p-value) of observing a z-statistic of 2.58 or greater if the null hypothesis were true.
The p-value is smaller than the conventional significance level of 5%. This provides strong evidence against the null hypothesis, supporting our decision to reject it and conclude that the marketing campaign likely had a significant positive effect on purchases.
OpenLearn - Data analysis: hypothesis testing 
Except for third party materials and otherwise, this content is made available under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 Licence, full copyright detail can be found in the acknowledgements section. Please see full copyright statement for details.