The Z-test is a statistical test used to determine whether two population means are different when the variances are known and the sample sizes are large. It can also be used to compare a mean to a hypothetical value.
The Z-test is a statistical test used to determine whether two population means are different when the variances are known and the sample sizes are large. It can also be used to compare a mean to a hypothetical value.
The data must be approximately normally distributed, otherwise the test is invalid. In order to perform a Z-test, parameters such as variance and standard deviation need to be calculated.
The Z test is also a hypothesis test in which the Z statistic is normally distributed. The Z-test is best used for samples larger than 30 because, according to the central limit theorem, as the sample size increases, the samples are considered to be approximately normally distributed.
When conducting a Z-test, the null and alternative hypotheses should be stated as well as the significance level (alpha level). The Z-score (also called the test statistic) should be calculated, and the results and conclusions should be stated. The Z statistic or Z score is a number that indicates how many standard deviations the score from the Z test differs from the population mean.
Examples of tests that can be conducted as Z tests include one-sample position test, two-sample position test, paired difference test, and maximum likelihood estimation. The Z-test is closely related to the t-test, but when the sample size of the experiment is small, it is better to perform the t-test. Additionally, the t-test assumes that the standard deviation is unknown, whereas the Z-test assumes that the standard deviation is known. If the population standard deviation is unknown, the sample variance is assumed to be equal to the population variance.
Suppose an investor wishes to test whether a stock's average daily return is greater than 3%. A simple random sample of 50 returns is calculated with a mean of 2%. Assume that the standard deviation of returns is 2.5%. Therefore, the null hypothesis is that the mean is equal to 3%.
In contrast, the alternative hypothesis is that the average return is greater or less than 3%. Assume that an alpha value of 0.05% is chosen for a two-tailed test. Therefore, each tail has 0.025% of samples, and the critical alpha value is 1.96 or -1.96. If the value of z is greater than 1.96 or less than -1.96, reject the null hypothesis.
The value of z is calculated by subtracting the observed sample mean from the average daily return value chosen for the test (3% in this case). Next, divide the resulting value by the standard deviation divided by the square root of the number of observations.
Therefore, the test statistic is:
The investor rejects the null hypothesis because z is less than -1.96 and concludes that the average daily return is less than 3%.
The Z-test is closely related to the t-test, but when the data consists of small sample sizes (that is, less than 30), it is better to perform the t-test. Additionally, the t-test assumes that the standard deviation is unknown, whereas the Z-test assumes that the standard deviation is known.
You can use the Z test if the population standard deviation is known and the sample size is greater than or equal to 30. Regardless of the sample size, if the population standard deviation is unknown, the t-test should be used instead.
The Z-score or Z-statistic is a number that indicates how many standard deviations the score from the Z-test differs from the population mean. Essentially, it is a numerical measurement that describes the relationship between a value and the mean of a set of values. A Z-score of 0 means that the data point's score is the same as the mean score. A Z-score of 1.0 means that the value is one standard deviation away from the mean. Z-scores can be positive or negative, with positive values indicating a score above the average and negative values indicating a score below the average.
In the study of probability theory, the central limit theorem (CLT) states that as sample size increases, the distribution of samples approximates a normal distribution (also known as a "bell curve"), assuming that all samples are of the same size and are independent of the shape of the population distribution. A sample size of 30 or greater is considered sufficient for CLT to accurately predict the characteristics of the population. The accuracy of the Z-test relies on the establishment of CLT.
The Z test is used in hypothesis testing to assess whether a finding or association is statistically significant. In particular, it tests whether two means are the same (null hypothesis). The Z test can be used only when the population standard deviation is known and the sample size is 30 data points or greater. Otherwise, the t test should be used.
TheQuantHackers is a cutting-edge community composed of a group of people from the world's top universities and quantitative finance practitioners, dedicated to exploring the infinite possibilities in the fields of artificial intelligence (AI) and quantification (Quant). Our team members come from world-renowned universities such as the University of Cambridge, Oxford University, Harvard University, ETH Zurich, Peking University, and the University of Science and Technology of China. Our external consultants come from first-class companies such as Microsoft, HSBC, Citadel, Man Group, Citi, Jump Trading, and top domestic private equity companies.
Upgrade to unlock all institutional-grade algorithms, derivative pricing engines, factor backtesting frameworks, and live QuantLab execution.
Explore Membership Access
Pre-order · £490Quantitative analytics platform
Waitlist closed — signal locked. Pre-order TQH TERMINAL now at £490 with launch-day delivery.