Z-Test: Formula, Examples, Uses, Z-Test vs T-Test (2024)

by Anupama Sapkota

Table of Contents

Z-test Definition

z-test is a statistical tool used for the comparison or determination of the significance of several statistical measures, particularly the mean in a sample from a normally distributed population or between two independent samples.

  • Like t-tests, z tests are also based on normal probability distribution.
  • Z-test is the most commonly used statistical tool in research methodology, with it being used for studies where the sample size is large (n>30).
  • In the case of the z-test, the variance is usually known.
  • Z-test is more convenient than t-test as the critical value at each significance level in the confidence interval is the sample for all sample sizes.
  • A z-score is a number indicating how many standard deviations above or below the mean of the population is.
Z-Test: Formula, Examples, Uses, Z-Test vs T-Test (1)

Z-test formula

For the normal population with one sample:

Z-Test: Formula, Examples, Uses, Z-Test vs T-Test (2)

where is the mean of the sample, and µ is the assumed mean, σ is the standard deviation, and n is the number of observations.

z-test for the difference in mean:

Z-Test: Formula, Examples, Uses, Z-Test vs T-Test (3)

where 1 and 2 are the means of two samples, σ is the standard deviation of the samples, and n1 and n2 are the numbers of observations of two samples.

One sample z-test (one-tailed z-test)

  • One sample z-test is used to determine whether a particular population parameter, which is mostly mean, significantly different from an assumed value.
  • It helps to estimate the relationship between the mean of the sample and the assumed mean.
  • In this case, the standard normal distribution is used to calculate the critical value of the test.
  • If the z-value of the sample being tested falls into thecriteria for the one-sided tets, the alternative hypothesis will be accepted instead of the null hypothesis.
  • A one-tailed test would be used when the study has to test whether the population parameter being tested is either lower than or higher than some hypothesized value.
  • A one-sample z-test assumes that data are a random sample collected from a normally distributed population that all have the same mean and same variance.
  • This hypothesis implies that the data is continuous, and the distribution is symmetric.
  • Based on the alternative hypothesis set for a study, a one-sided z-test can be either a left-sided z-test or a right-sided z-test.
  • For instance, if our H0: µ0 = µ and Ha: µ < µ0, such a test would be a one-sided test or more precisely, a left-tailed test and there is one rejection area only on the left tail of the distribution.
  • However, if H0: µ = µ0 and Ha: µ > µ0, this is also a one-tailed test (right tail), and the rejection region is present on the right tail of the curve.

Two sample z-test (two-tailed z-test)

  • In the case of two sample z-test, two normally distributed independent samples are required.
  • A two-tailed z-test is performed to determine the relationship between the population parameters of the two samples.
  • In the case of the two-tailed z-test, the alternative hypothesis is accepted as long as the population parameter is not equal to the assumed value.
  • The two-tailed test is appropriate when we have H0: µ = µ0 and Ha: µ ≠ µ0 which may mean µ > µ0 or µ < µ0
  • Thus, in a two-tailed test, there are two rejection regions, one on each tail of the curve.

Z-test examples

If a sample of 400 male workers has a mean height of 67.47 inches, is it reasonable to regard the sample as a sample from a large population with a mean height of 67.39 inches and a standard deviation of 1.30 inches at a 5% level of significance?

Taking the null hypothesis that the mean height of the population is equal to 67.39 inches, we can write:

H0 : µ = 67.39

Ha: µ ≠ 67.39

= 67.47“, σ = 1.30“, n = 400

Assuming the population to be normal, we can work out the test statistic z as under:

Z-Test: Formula, Examples, Uses, Z-Test vs T-Test (4)

Z = 1.231

Z-Test: Formula, Examples, Uses, Z-Test vs T-Test (5)

z-test applications

  • Z-test is performed in studies where the sample size is larger, and the variance is known.
  • It is also used to determine if there is a significant difference between the mean of two independent samples.
  • The z-test can also be used to compare the population proportion to an assumed proportion or to determine the difference between the population proportion of two samples.

Z-test vs T-test (8 major differences)

Basis for comparison

T-test

Z-test

DefinitionThe t-test is a test in statistics that is used for testing hypotheses regarding the mean of a small sample taken population when the standard deviation of the population is not known.z-test is a statistical tool used for the comparison or determination of the significance of several statistical measures, particularly the mean in a sample from a normally distributed population or between two independent samples.
Sample sizeThe t-test is usually performed in samples of a smaller size (n≤30).z-test is generally performed in samples of a larger size (n>30).
Type of distribution of populationt-test is performed on samples distributed on the basis of t-distribution.z-tets is performed on samples that are normally distributed.
AssumptionsA t-test is not based on the assumption that all key points on the sample are independent.z-test is based on the assumption that all key points on the sample are independent.
Variance or standard deviationVariance or standard deviation is not known in the t-test.Variance or standard deviation is known in z-test.
DistributionThe sample values are to be recorded or calculated by the researcher.In a normal distribution, the average is considered 0 and the variance as 1.
Population parametersIn addition, to the mean, the t-test can also be used to compare partial or simple correlations among two samples.In addition, to mean, z-test can also be used to compare the population proportion.
Conveniencet-tests are less convenient as they have separate critical values for different sample sizes.z-test is more convenient as it has the same critical value for different sample sizes.

References and Sources

  • C.R. Kothari (1990) Research Methodology. Vishwa Prakasan. India.
  • https://ncss-wpengine.netdna-ssl.com/wp-content/themes/ncss/pdf/Procedures/PASS/One-Sample_Z-Tests.pdf
  • https://www.wallstreetmojo.com/z-test-vs-t-test/
  • https://sites.google.com/site/fundamentalstatistics/chapter-13
  • 3% – https://www.investopedia.com/terms/z/z-test.asp
  • 2% – https://www.coursehero.com/file/61052903/Questions-statisticswpdf/
  • 2% – https://towardsdatascience.com/everything-you-need-to-know-about-hypothesis-testing-part-i-4de9abebbc8a
  • 2% – https://ncss-wpengine.netdna-ssl.com/wp-content/themes/ncss/pdf/Procedures/PASS/One-Sample_Z-Tests.pdf
  • 1% – https://www.slideshare.net/MuhammadAnas96/ztest-with-examples
  • 1% – https://www.mathandstatistics.com/learn-stats/hypothesis-testing/two-tailed-z-test-hypothesis-test-by-hand
  • 1% – https://www.infrrr.com/proportions/difference-in-proportions-hypothesis-test-calculator
  • 1% – https://keydifferences.com/difference-between-t-test-and-z-test.html
  • 1% – https://en.wikipedia.org/wiki/Z-test
  • 1% – http://www.sci.utah.edu/~arpaiva/classes/UT_ece3530/hypothesis_testing.pdf
  • <1% – https://www.researchgate.net/post/Can-a-null-hypothesis-be-stated-as-a-difference
  • <1% – https://www.isixsigma.com/tools-templates/hypothesis-testing/making-sense-two-sample-t-test/
  • <1% – https://www.investopedia.com/terms/t/two-tailed-test.asp
  • <1% – https://www.academia.edu/24313503/BIOSTATISTICS_AND_RESEARCH_METHODS_IN_PHARMACY_Pharmacy_C479_4_quarter_credits_A_Course_for_Distance_Learning_Prepared

About Author

Z-Test: Formula, Examples, Uses, Z-Test vs T-Test (6)

Anupama Sapkota

Anupama Sapkota has a bachelor’s degree (B.Sc.) in Microbiology from St. Xavier's College, Kathmandu, Nepal. She is particularly interested in studies regarding antibiotic resistance with a focus on drug discovery.

Z-Test: Formula, Examples, Uses, Z-Test vs T-Test (2024)

FAQs

When to use z-test vs t-test examples? ›

If the population standard deviation is known, use a z-test. If the population standard deviation is unknown, but the sample size is larger than 30, use a z-test. For small samples and unknown population standard deviations, use a t-test.

What is the formula for the t-test and z-test? ›

The t-test formula is just like the Z-test one on top – sample mean minus comparison population mean. Then you divide by SM, the estimate of standard deviation that you calculated back in step 2. If your calculated t-test score fell into the shaded tail beyond your cutoff score, then you may reject the null hypothesis.

What are the similarities and differences between the z-test formulas and a 1 sample t-test formulas? ›

The one-sample t-test assumes that the population standard deviation is unknown and must be estimated from the sample data, while the z-test assumes that the population standard deviation is known. Another difference is in the distribution used to calculate the p-value.

When to use z and t-distribution? ›

If the population standard deviation is known, use the z-distribution. If the population standard deviation is not known, use the t-distribution.

What is an example of a t-test? ›

The most common example is when measurements are taken on each subject before and after a treatment. A paired t test example research question is, “Is there a statistical difference between the average red blood cell counts before and after a treatment?”

Is the z-test or t-test for proportions? ›

When you're working on a statistics word problem, these are the things you need to look for. Proportion problems are never t-test problems - always use z!

What is the z-test formula used for? ›

What Is a Z-Test? A z-test is a statistical test used to determine whether two population means are different when the variances are known and the sample size is large. It can also be used to compare one mean to a hypothesized value.

What are the two z-test formulas? ›

A two sample z test is used to check if there is a difference between the means of two samples. The z test statistic formula is given as follows: z = (¯¯¯¯¯x1−¯¯¯¯¯x2)−(μ1−μ2)√σ21n1+σ22n2 ( x 1 ¯ − x 2 ¯ ) − ( μ 1 − μ 2 ) σ 1 2 n 1 + σ 2 2 n 2 .

What is the t-test formula used for? ›

A t-test is an inferential statistic used to determine if there is a significant difference between the means of two groups and how they are related. T-tests are used when the data sets follow a normal distribution and have unknown variances, like the data set recorded from flipping a coin 100 times.

What are 2 key differences between the T and Z distributions? ›

The Z distribution is a special case of the normal distribution with a mean of 0 and standard deviation of 1. The t-distribution is similar to the Z-distribution, but is sensitive to sample size and is used for small or moderate samples when the population standard deviation is unknown.

What is the major difference between the Z and T obtained formula? ›

c) The major difference between the z- and t-obtained formulas is that the z formula requires the population mean and the t formula requires the sample mean.

Why do Z and T values differ? ›

The Z-score and t-score tables themselves have different numbers in response to the fact that you can't have as much confidence in the data with a smaller sample size. You'll get a different value from Z=1.382 than t=1.382.

What are the differences between T and Z-distribution? ›

What's the key difference between the t- and z-distributions? The standard normal or z-distribution assumes that you know the population standard deviation. The t-distribution is based on the sample standard deviation.

What is the difference between Z scores and T scores? ›

T-scores compare bone density with that of a healthy person, whereas Z-scores use the average bone density of people of the same age, sex, and size as a comparator. Although both scores can be useful, most experts prefer using Z-scores for children, teenagers, premenopausal females, and younger males.

What is the main difference between z-score and t score? ›

Z score is the standardization from the population raw data or more than 30 sample data to a standard score, while the T score is the standardization from the sample data of less than 30 data to a standard score. Z score ranges from -3 to 3, while the T score ranges from 20 to 80.

In which cases would you prefer to use a T procedure over a Z procedure? ›

You should use the t-test for your statistical problem, as the sample size is less than 30. A z-test is only used to determine whether two population means are different when the variances are known and the sample size is large (n>30).

How to know which t-test to use? ›

If you are studying one group, use a paired t-test to compare the group mean over time or after an intervention, or use a one-sample t-test to compare the group mean to a standard value. If you are studying two groups, use a two-sample t-test. If you want to know only whether a difference exists, use a two-tailed test.

What is an example of Z score hypothesis testing? ›

Using z is an occasion in which the null hypothesis is a value other than 0. For example, if we are working with mothers in the U.S. whose children are at risk of low birth weight, we can use 7.47 pounds, the average birth weight in the US, as our null value and test for differences against that.

What are the assumptions for z-test and t-test? ›

The difference between the z-test and the t-test is in the assumption of the standard deviation σ of the underlying normal distribution. A z-test assumes that σ is known; a t-test does not. As a result, a t-test must compute an estimate s of the standard deviation from the sample.

Top Articles
Latest Posts
Article information

Author: Kieth Sipes

Last Updated:

Views: 5699

Rating: 4.7 / 5 (67 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Kieth Sipes

Birthday: 2001-04-14

Address: Suite 492 62479 Champlin Loop, South Catrice, MS 57271

Phone: +9663362133320

Job: District Sales Analyst

Hobby: Digital arts, Dance, Ghost hunting, Worldbuilding, Kayaking, Table tennis, 3D printing

Introduction: My name is Kieth Sipes, I am a zany, rich, courageous, powerful, faithful, jolly, excited person who loves writing and wants to share my knowledge and understanding with you.