## How a z-test Works

A hypothesis is an idea or an assumption that you propose for the sake of argument so that you and others can test it to see if it might be correct. A z-test is a type of calculation that you can use to test a hypothesis to know if the results or claims of your hypothesis are accurate or repeatable. When doing a z-test, you have to state the claim (this is called a null hypothesis) and possible evidence against it (an alternate hypothesis).

You can also use a z-test to compare the means of two independent samples collected from one population with known variance, which describes the difference between a random variable and its expected value. To use a z-test to determine if your proposed assumption is valid, you'll need a large sample population or at least thirty (this must be normally distributed, i.e., the data should have the shape of a bell curve when you plot it in a graph).

Let's say someone claims to have discovered a new cancer-curing drug, and you'd want to make sure it was probably accurate. A hypothetic z-test can tell you if it is most likely true or false, especially when your data is roughly normally distributed.

## Example of z-test

Like with other calculations, the z-test has a unique formula that features unique symbols. x̄ = mean (the total of all items in a data set divided by the number of items on the list) of the sample, μ0 = mean of the population, σ = standard deviation (how much the items of a group differ from the group's mean value) of population, and n = no. of observations.

Assuming your mum claims that kids in your neighborhood are above average intelligence, you take a random sample of thirty kids' IQ scores and get a mean score of 112.5. You need to find out if there is proof to support mum's claims given a mean population IQ of 100 and a standard deviation of 15. To test your mum's claims, you need to state the null hypothesis (which is the accepted fact that the population mean is 100) and the alternate hypothesis (assuming that the kids have above average IQ score).

You can assume your alpha level (an alpha level is a probability of making a wrong choice or decision) is 0.05, which will return a z-score (difference between a value and its group mean) of 1.645 if you calculate with a TI-83 calculator. Using the formula Z= (112.5-100) / (15/√30) = 4.56, you can reject the null hypothesis if 4.56 is greater than 1.645. If it's less than 1.645, you don't reject the null hypothesis. Because it is greater in this case, your mum is right, and you can reject the null hypothesis.