Z-Test vs P-Value
Z- Test and P-Value are although two statistical tests, but these are two separate things where the former is a statistical test that throws light upon whether one should reject the null hypothesis or not whereas the latter is a probability test signifying there is a probability that the null hypothesis will be rejected.
A Z-test in statistics, is a tool that is used to determine whether two population means vary even when the variables are known. It is a type of hypothesis test under the null hypothesis and can be approximated by a normal distribution.
A hypothesis testing in statistics is a way to figure out whether the results of a survey or experiment are meaningful or not.
Whereas, a P-Value or the probability value, in statistical hypothesis, is the probability of obtaining the test/ experiment results observed during the test or experiment with the assumption of the null hypothesis being correct.
A null-hypothesis is a general statement stating there is no relationship between the two measured groups.
The difference between Z-Test and P-Value is the Z-Test talks about whether the null hypothesis should be rejected or not, but on the contrary the P-Value throws light on the observations that have been made during the experiment if they are same or extreme when the null-hypothesis is true.
Comparison Table Between Z-Test and P-Value (in Tabular Form)
|Meaning||P-Value is the probability of the observations remaining the same or extreme, if the null hypothesis is true.||Z-Test describes the deviation from the mean in units of standard deviation.|
|Assumptions||The P-Value is the test carried forward with an assumption of the null hypothesis being true.||In the case of Z-Test, it does not make such assumptions.|
|Objective||The objective of this test is to find out whether the null hypothesis should be accepted or not.||The objective of this test is to check if the observations remain the same or not if the null hypothesis is true.|
|Indication of the test||The P-value indicates how unlikely the statistic is.||Whereas, the Z-Test indicates how far the mean is.|
What is Z-Test?
A Z-test in statistics, is a tool that is used to determine whether two population means vary even when the variables are known. Moreover, the sample size is large. It is a type of hypothesis test under the null hypothesis and can be approximated by a normal distribution.
It is used to check whether the null hypothesis should be rejected or not. The Z-scores are the measures of the standard deviation, for example, +1.95 or -1.95 denotes how much the test statistic result has deviated from the mean.
There are a few assumptions that are made in the One-Sample Z-test:
- The data are continuous and not discrete.
- The data follow the normal probability distribution.
- The sample must be random, otherwise, the test statistic result might not be correct.
- The population standard deviation is known
What is P-Value?
P-Value is the probability of the test statistic result being rejected or accepted with an assumption of the null hypothesis being correct. The experiment sets the level of significance and when the p-value is less than the significant level then the null hypothesis will be rejected.
To find out the p-value in one’s statistic:
- Look up the statistic on the appropriate distribution.
- Find the probability that the mean is beyond your test statistic.
- If the hypothesis is less than the alternative, then find the probability of mean being less than your test statistic This is the p-value.
- If the hypothesis is greater than the alternative, then find the probability of mean being greater than your test statistic. This is the p-value.
- If the hypothesis is equal to the alternative then we need to find the probability of mean being extreme to your test statistic and double it.
Main Differences Between Z-Test and P-Value
The P-Value is the probability of obtaining a test statistic result at least equal to or as extreme as a result that was observed in the experiment with an assumption that the null hypothesis is true.
Whereas, the Z-Test is the test that is used to determine whether the mean of a population is greater than, less than, or equal to a specific value. As it uses the standard normal distribution, this test is often known as the One-Sample Z-Test. It assumes that the standard deviation of the population is known.
In the case of P-Value, the null hypothesis is assumed to be true, based on which the test statistic result that is observed in the experiment is checked to see if the result is the same or extreme as it was observed before. On the other hand, the Z-Test is used to check whether the null hypothesis should be rejected or not.
In the P-Value, the alternative hypothesis is the crucial statement that the experimenter would like to conclude in the experimental test if the data allows it. Whereas, in Z-Test, the alternative hypothesis plays an important role along with the null hypothesis, alpha, and the Z-score. The alternative hypothesis is the opposing hypothesis, it is a claim of a difference in the population. It is the hypothesis that the experimenter hopes to prove.
In the case of P-Value, the p-value might not be correct if the sample size is small. Moreover, the p-value has a tendency of being concluded as significant or non-significant based on the factor that the p-value is less than or equal to 0.5, which is not the case with Z-Test however, there are a few limitations of using Z-Test.
The first of which is, the sample size may range from a small number to several hundred, If the data is discrete with at least five unique values then one may ignore the continuous variable assumption. Perhaps the greatest restriction is that the data must be random otherwise the significance levels might be incorrect.
If the p-value is very small as compared to the threshold value that was previously chosen known as the significant level (commonly 5% or 1%), it suggests that the observed data is inconsistent with the assumption that the null hypothesis is true and thus the hypothesis must be rejected and the alternative hypothesis is accepted.
- p < 0.1, the hypothesis is rejected
- 0.1<p<0.5, the hypothesis may or may not be rejected
- p>0.1, the hypothesis is accepted
Whereas, in Z-Test, to give an example: The critical Z-Score values when using a 95% confidence level, -1.96 and +1.96 standard deviations. The p-value associated with a 95% confidence level is 0.05. If your Z score is between -1.96 and +1.96, your p-value will be larger than 0.05, and you cannot reject your null hypothesis.
If the Z score falls outside that range (for example -2.5 or +5.4), the pattern exhibited is probably too unusual to be just another version of random chance and the p-value will be small to reflect this. In this case, it is possible to reject the hypothesis.
A key idea here is that the values in the middle of the normal distribution (Z scores like 0.19 or -1.2, for example), represent the expected outcome
P-Value and the Z-Test are two statistical tests with different objectives. The P-Value revolves around the probability of observations or results of the experiment being the same or extreme if the null hypothesis is true.
On the other hand, the Z-Test signifies the validity of the observations made during the experiment. It is used only when the sample size is more than 30 like in the case of population, it is because of the central theorem that is used during this test, as the number of samples increases, the samples are considered to be distributed normally and the data are randomly selected.
P-Value is affected by the sample size as well as the null hypothesis. The larger the sample size, the smaller is the P-Values, whereas, the Z-Test is affected by the null hypothesis, alternative hypothesis, alpha, and the Z-Score.
Word Cloud for Difference Between Z-Test and P-Value
The following is a collection of the most used terms in this article on Z-Test and P-Value. This should help in recalling related terms as used in this article at a later stage for you.