offers statistics lesson videos made simple!

Sign up or log in to Magoosh Statistics.

How to Calculate a z-score

Determining if something is probable in statistics can be tricky. I mean, how am I supposed to know if one measurement of a sample is particularly significant when compared to the entire sample or even the population? Well, luckily for us, statisticians of the highest caliber have calculated probabilities for us and we can calculate something called a z-score to determine significance.

How the z-score came about

For a moment, let’s imagine that you have opened 118 bags of M&Ms and counted the total number of candies in each bag (thank you, by the way). When you take such a large number of measurements, one quick way to analyze the data is to calculate the mean, median, and mode of the data.

Another way to analyze the data is to compare the frequency or the number of occurrences for each value. Determining the frequency of each value allows you to build a histogram to look for overall trends in the data. The histogram for your M&M data is below.

Do you notice that there is only one large hill in the data? That means that the data show a normal distribution. The normal distribution represents the tendency of that particular measurement to occur. In our data, there is a high chance that any random bag of M&Ms will contain 20 pieces of candy, whereas there is a very small chance of a random bag containing 23 candies.

A normal curve, shown below, is the statistical model of the distribution. It tells us how “normal” the data is.

How to calculate a z-score?

A z-score represents probability of a particular measure occurring. In our example, it would represent the probability of selecting a bag of M&Ms that contains a specific number of M&Ms. The z-score is calculated using the difference between an individual sample measure and in terms of the standard deviation.

With the measure now in terms of standard deviations, we can use the normal curve. Calculating the z-score means you can determine the probability of a specific measure occurring. For example, you want to know how likely it is to get a package of M&Ms with 24 candies in it (enough to share, lol). So we calculate the z-score.

how to calculate a z-score

Now that you have a z-score, what does it mean? Well, what you need to determine how likely that z-score is to occur. To do that, we have a nifty little chart that has calculated the probability of each z-score occurring.

On one side is the value of the z-score. Across the top is the percentage of error that we are willing to accept and reject the null hypothesis. Notice that the value where the boxes meet is 0.9997. This represents the percentage of probabilities that are less than our z-score. It represents the probability of the null hypothesis occurring (e.g., the bag contains less than 24 candies.

In the case of the M&Ms, this means that the probability of getting a bag of M&Ms with less than 24 candies is 0.9997 or 99.97%. Which means there is at most 0.05 probability or 5% chance of getting a bag with 24 or more candies.

The z-score is essential to determining the probability of a measure occurring, which is also essential to hypothesis testing. Good thing you can calculate one now.

2 Responses to How to Calculate a z-score

  1. Elizabeth Colquitt December 30, 2017 at 9:26 am #

    I am confused. Where did the 1.16 come from? Thanks.

    • John Clark
      johnclark December 30, 2017 at 11:42 am #

      Hi Elizabeth!
      The 1.16 represents the standard deviation of the dataset we are using to calculate the z-score. Hope that helps! Thanks for reading!


Magoosh blog comment policy: To create the best experience for our readers, we will only approve comments that are relevant to the article, general enough to be helpful to other students, concise, and well-written! 😄 Due to the high volume of comments across all of our blogs, we cannot promise that all comments will receive responses from our instructors.

We highly encourage students to help each other out and respond to other students' comments if you can!

If you are a Premium Magoosh student and would like more personalized service from our instructors, you can use the Help tab on the Magoosh dashboard. Thanks!