Get Started

Hypothesis Testing with the Z-test

1. Hypothesis Testing with the Z-test

T-Test's are done, let's explore Z-Tests in our hypothesis framework.

2. T-Tests

In the last lesson you performed t-tests. The t-test infers whether there is a difference between two mean averages.

3. Comparing T-Tests and Z-Tests

Similarly a Z-test will give you a probability that two dataset averages are different. Like before, you need to predetermine a cutoff value which guides your experiment results. More specifically, in both z and t-tests, you reject the null hypothesis if the value is less than the cutoff, usually 0 point 05.

4. Contrasting T-Tests and Z-Tests

Even though both t-tests and z-tests work with sample averages there are some differences. A t-test requires 2 sample arrays in the formula. In contrast the z-test only needs one. Instead of worrying about tails and types like in a t-test, the z-test accepts a known summary statistic from the population. For example, passing in the population mean is commonplace for z-test's second parameter. In the end, most often you would use a t-test if your sample is less than 30 and if not, then a z-test.

5. Don't sleep at the wheel with ZZZs

Remember how the z score measured how many standard deviations a value was from the mean? A Z-test is similar and measures a distance. Here we have the car averages. Recall the average sports car was $85k. The average Ferrari was $252k.

6. Going the distance

In this visual you can see the standard deviation is $83500. So moving from the blue line to the red, you are 2 standard deviations from the mean. Thus the z-score is 2.

7. Z-Tests calculate the probability

Instead of a z-score you will be calculating a z-test statistic. The result of a z-test is a probability not a distance like a z-score. As in the probability of getting a value that you provided. This visual zooms into the Ferrari price at $252k. Recall its 2 standard deviations from the mean. However a Z-test probability measures from the value to the right telling you, the statistician, how likely you are to get a value of $252k or greater. In the end, you interpret the p-value in the same way as the t-test. If the probability is less than a cutoff, usually 0 point 05 then you reject the NULL hypothesis.

8. Z-Tests in Google Sheets

In sheets you use the z-dot-test function to get probability results in this type of hypothesis tests. First pass in your data array. Next add the value called your "test statistics". In our previous example this would be $252000. Optionally you can pass in the standard deviation of your population if you know it. This parameter is optional because if you don't declare it, the formula will assume you want to use the standard deviation of the data you passed in first. As a review, Reject the NULL hypotheses if your p-value is less than 0 point 05!

9. Let's practice!

Soon enough you'll be an expert.