“Facts are stubborn things, but statistics are pliable.” Mark Twain
Z - Test
A Z-test is a type of hypothesis test. Hypothesis testing is just a way for you to figure out if results from a test are valid or repeatable. For example, if someone said they had found a new drug that cures cancer, you would want to be sure it was probably true. A hypothesis test will tell you if it’s probably true, or probably not true. A Z test, is used when your data is approximately normally distributed.
A z-test is used for testing the mean of a population versus a standard, or comparing the means of two populations, with large (n ≥ 30) samples whether you know the population standard deviation or not. It is also used for testing the proportion of some characteristic versus a standard proportion, or comparing the proportions of two populations.
Example:Comparing the average engineering salaries of men versus women.
Example: Comparing the fraction defectives from 2 production lines.
Conditions:
You would use a Z test if:
Your sample size is greater than 30. Otherwise, use a t test.
Data points should be independent from each other. In other words, one data point isn’t related or
doesn’t affect another data point.
Your data should be normally distributed. However, for large sample sizes (over 30) this doesn’t always matter.
Your data should be randomly selected from a population, where each item has an equal chance of being selected.
Sample sizes should be equal if at all possible.
HYPOTHESIS TEST FOR THE DIFFERENCE OF TWO POPULATION PROPORTIONS
HYPOTHESIS TEST FOR ONE SAMPLE Z TEST