BrightChamps Logo
Login
Creative Math Ideas Image
Live Math Learners Count Icon1449 Learners

Last updated on June 12th, 2025

Math Whiteboard Illustration

Z Test

Professor Greenline Explaining Math Concepts

Most of us have wondered how mathematicians compare different datasets. Well, they use different methods and the z-test is one such method. The z-test can be used to assess the hypotheses concerning population proportions or averages. The z-test is usually applied to one sample, two samples, or proportions. It also has many real-life applications. For e.g., it can be used to compare the average weight of students belonging to one school to the weight of students from another school. This is done to check if there is any major variation between them. Let’s learn more about these tests.

Z Test for US Students
Professor Greenline from BrightChamps

What is the Z Test in Math?

It is a hypothesis test done to compare the sample's average to the average of the population. The result of the comparison is called z-score, which determines the total deviation of the sample average from the population average. This test is used when the size of the sample is greater than 30.


The formula for the z-score is:


z = (x - μ) / σ


Here: z = Z-score


x = the value being evaluated


μ = the mean


σ = the standard deviation

 

For example: The average height of 5th grade students from one school is 140 cm with a standard deviation of 6 cm; the average height of students of the same grade from another school is 120 cm. Find the z score.


Using the formula: z = (x - μ) / σ


Substituting the given values:


z = (120 –140) / 6 = -3.333


Here, the z-score tells us that the average height of students studying in the second school is 3.33 standard deviations below the average height of students from the first school.

Struggling with Math?

Get 1:1 Coaching to Boost Grades Fast !

curious child
Professor Greenline from BrightChamps

Key Takeaways from Z- Tests

Z tests are utilized in comparing one sample to another or with a population in various sectors. Let’s look at a few key takeaways:

  • Z- tests are applied when the sample sizes are more than 30.

 

  • These tests are used only when the standard deviation is known, otherwise we prefer t-tests.

 

  • Using these, we compare averages and proportions in data sets.

 

  • To draw conclusions from data, we assess assumptions using the null hypothesis (Ho) and the alternative hypothesis (H1).
Professor Greenline from BrightChamps

Type of Z-test

Z tests come in various types. We will now see how each of them varies:

 

One-sample z-test: We use the one-sample test when a single sample differs extensively from a known population mean. To use this test, the population standard deviation should be known and the sample size must be more than 30.

 


Two-sample z-test: This test compares the means of two independent samples.


Let μ1  and μ2 be the population means; X1 and X2 are the sample mean.


The null hypothesis of the test could be:


Ho : μ1 – μ2 = 0


H1 :  μ1 – μ2 ≠ 0


We calculate the z-test score using the formula:


Z = (X1 X2) (μ1 – μ2)σ 2n1 + σ 2n2 


Here:


X  sample mean


σ1 and σ2  standard deviation


n1 and n2  population sample sizes for p1 and p2 

Professor Greenline from BrightChamps

Z- Test for Proportions:

Z tests can be used in comparing proportions between a sample and a population, or two samples. For example: Determining whether the proportion of girls in a school differs significantly from the worldwide percentage.

Professor Greenline from BrightChamps

Tips and Tricks

Learning about the Z-test helps students compare datasets in real-world situations. The tips and tricks mentioned below will help us understand the concept easily:

 

  • The z-tests are used only when the sample size is greater than 30.

 

  • Correct formulas should be used for z-tests and t-tests.

 

  • Use the decision rule to make quick decisions: 

 

  • If ∣Z∣ > Z_critical, reject H0​ (significant difference).

 

  • If ∣Z∣ < Z_critical, fail to reject H0​ (no significant difference).

 

  • There is a trick to determine the normality: If n < 30, check for normality before applying a z-test.
Professor Greenline from BrightChamps

Real-life applications

Z tests are significantly used in various fields in comparing averages. Let’s explore a few of them:

 

  • Z-tests can be used to compare the average scores of students in a school with those in another school to analyze if they are significantly different.

 

  • Companies apply z-tests to analyze and compare the effectiveness of two advertisements.

 

  • Researchers can use these tests to determine which drug or medicine yields a better result.

 

  • These are widely used by teachers to check the effectiveness of teaching methods to determine the most effective out of it.

 

  • Banks can make use of these tests in analyzing the default loan rates of two specific loans.
Max Pointing Out Common Math Mistakes

Common Mistakes and How to Avoid Them in Z-Test

We now understand how important it is to learn Z-tests; however, students make some errors in calculations, which can lead to incorrect results. We will now look at a few common mistakes to watch out for and the ways to avoid them:
 

Mistake 1

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Applying for Small Samples (n < 30)
 

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

Always ensure that you apply a t-test if the sample size is less than 30 and a standard deviation is not given.

 

Keep in mind that Z-tests are for samples of more than 30.
 

Mistake 2

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Not Defining Hypothesis Clearly
 

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

 To avoid bias, it is important to begin with an appropriate definition:


H0  Since H0  is a null hypothesis, its effect will be nil.


H1     Alternative hypothesis for which the effect exists.

Mistake 3

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Relying on Normality
 

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

To avoid this type of error, we must check the normality of data before performing the z-test.

 

For that, use histograms or Q-Q plots.
 

Mistake 4

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Mistakenly Applying Z-Test for Dependent Samples
 

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

Use z-tests only for independent samples. If the groups are of the same nature, always use t-tests.
 

Mistake 5

Red Cross Icon Indicating Mistakes to Avoid in This Math Topic

Not Considering Population Standard Deviation
 

Green Checkmark Icon Indicating Correct Solutions in This Math Topic

To avoid inaccurate results, use t-tests when the standard deviation (σ) is unknown.

arrow-right

Level Up with a Math Certification!

2X Faster Learning (Grades 1-12)

curious child
Max from BrightChamps Saying "Hey"

Solved examples of Z Test

Ray, the Character from BrightChamps Explaining Math Concepts
Max, the Girl Character from BrightChamps

Problem 1

A researcher wants to compare the average scores of two groups of students. Group A (20 students) has an average test score of 60 with a standard deviation of 5, while Group B (25 students) has an average score of 65 with a standard deviation of 10. Test at a 1.5 significance level if there is a significant difference in the means.

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"

We have insufficient evidence at the 1.5% level of significance to determine the variation of the scores.

Explanation

In the problem, we have that:


Group A:


n1 = 20


X1 =60


S1 = 5

 

The Group B is given as:


n2= 25


X2 =65


S2 = 10


The significance level is given as 1.5 %: 𝛂 = 0.015

 

Now, state the hypothesis:


Ho : μ1  = μ2 


H1 :  μ1 ≠ μ2 

 

Using the formula:


Z = (X1 -   X2)/ √σ 2n1+σ 2n2 

 

Z = (60 – 65)/ √(52/20 + 102/25)

 

Z = - 51.25 + 4 

 

Z = - 55.25  

 
Z = - 52.29  = – 2.18


We calculate the critical z-value for 𝛂 = 0.015 as ±2.42.


Since -2.18 > -2.42, we could not reject the null hypothesis at the 1.5% significance level. The evidence is insufficient to conclude a significant difference in test scores.

Max from BrightChamps Praising Clear Math Explanations
Max, the Girl Character from BrightChamps

Problem 2

A fruit seller says that the apples in his shop weigh 200 grams on average. You and your friends pick 35 apples and find that their average weight is 150 grams. You also know that apples usually have a weight variation of 15 grams. Should we believe the fruit seller’s claim?

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"

The possibility of getting a sample with an average weight of 150 grams if the true mean was 200 grams is exceedingly low. This shows the fruit seller’s assertion was low.
 

Explanation

Given that,


Claimed average weight  = 200 grams


Sample average weight = 150 grams


Standard deviation = 15 grams


Sample size = 35 apples

 

Here, we use the z-test formula:


z = (X1 -   X2) σ 2n1+σ 2n2 

 

=  (150 -  200 15/35 


=  -  50 15/ 5.92 


=  -  50 2.53  = -19.76

 

Z = -19.76

 

Since Z is below any significance threshold, we should reject the null hypothesis and conclude that the fruit seller’s claim is likely false. 

Max from BrightChamps Praising Clear Math Explanations
Max, the Girl Character from BrightChamps

Problem 3

A company says their new running shoes help people run 5 minutes faster than usual. Your school tests these shoes on 35 students and finds that, on average, students run 5.5 minutes faster with a variation of 4.5 minutes. Can we believe the company?

Ray, the Boy Character from BrightChamps Saying "Let’s Begin"

As the value does not cross the critical value, we cannot reject the null hypothesis. Therefore, we cannot deny the company’s claim.

Explanation

We have that:


n = 35


Claimed change = 5 minutes


Sample average change = 5.5 minutes


Standard deviation = 4.5 minutes


Step 1 is to formulate the hypotheses:


Null Hypothesis: The company’s claim is true.


H0 : μ = 5


Alternative hypothesis: The true mean could be different from 5 minutes.


H𝛼 : μ ≠ 5


Using t-test:


t  =  x̄ -  μ0 s/n 

 

t = 5.5  -  5 4.5/35 

 

t = 0.50.76 = 0.66


To find the critical value:


For a two-tailed test with a significance threshold of 0.05, the crucial t-value for df = 34 (because df = n - 1) is ±2.03.
Now we make the decision: since the calculated value is 0.66 < 2.03


As the value does not cross the critical value, we cannot reject the null hypothesis. Therefore, we cannot deny the company’s claim.

Max from BrightChamps Praising Clear Math Explanations

Turn your child into a math star!

#1 Math Hack Schools Won't Teach!

curious child
Ray Thinking Deeply About Math Problems

FAQs on the Z Test

1.What do you mean by z-test?

Math FAQ Answers Dropdown Arrow

2.Write the different kinds of Z-tests.

Math FAQ Answers Dropdown Arrow

3.When should we use a Z-test instead of a T-test?

Math FAQ Answers Dropdown Arrow

4.Cite one real-life example of a z-test.

Math FAQ Answers Dropdown Arrow

Struggling with Math?

Get 1:1 Coaching to Boost Grades Fast !

curious child
Math Teacher Background Image
Math Teacher Image

Jaipreet Kour Wazir

About the Author

Jaipreet Kour Wazir is a data wizard with over 5 years of expertise in simplifying complex data concepts. From crunching numbers to crafting insightful visualizations, she turns raw data into compelling stories. Her journey from analytics to education ref

Max, the Girl Character from BrightChamps

Fun Fact

: She compares datasets to puzzle games—the more you play with them, the clearer the picture becomes!

INDONESIA - Axa Tower 45th floor, JL prof. Dr Satrio Kav. 18, Kel. Karet Kuningan, Kec. Setiabudi, Kota Adm. Jakarta Selatan, Prov. DKI Jakarta
INDIA - H.No. 8-2-699/1, SyNo. 346, Rd No. 12, Banjara Hills, Hyderabad, Telangana - 500034
SINGAPORE - 60 Paya Lebar Road #05-16, Paya Lebar Square, Singapore (409051)
USA - 251, Little Falls Drive, Wilmington, Delaware 19808
VIETNAM (Office 1) - Hung Vuong Building, 670 Ba Thang Hai, ward 14, district 10, Ho Chi Minh City
VIETNAM (Office 2) - 143 Nguyễn Thị Thập, Khu đô thị Him Lam, Quận 7, Thành phố Hồ Chí Minh 700000, Vietnam
Dubai - BrightChamps, 8W building 5th Floor, DAFZ, Dubai, United Arab Emirates
UK - Ground floor, Redwood House, Brotherswood Court, Almondsbury Business Park, Bristol, BS32 4QW, United Kingdom