The Z.TEST function in Google Sheets is a powerful statistical tool used to determine if a sample mean significantly differs from a known population mean. It is particularly useful in hypothesis testing, allowing users to evaluate the likelihood that an observed sample comes from a specific distribution.
Syntax
Z.TEST(data, x, [sigma])
- data: An array or range of observed values.
- x: The known population mean to compare against.
- sigma: (Optional) The known population standard deviation. If omitted, the function calculates it from the sample data.
Example #1
=Z.TEST(A1:A30, 100)
This function tests if the mean of the values in range A1:A30 significantly differs from 100. If the computed p-value is less than your alpha level (e.g., 0.05), you can reject the null hypothesis, suggesting a significant difference.
Example #2
=Z.TEST(A1:A30, 100, 15)
In this case, the function tests the mean of the values in A1:A30 against 100, assuming a population standard deviation of 15. The result will indicate the significance of the difference between the sample mean and the population mean with respect to the known standard deviation.
Example #3
=Z.TEST(A1:A30, A31)
This formula compares the sample mean from A1:A30 to a dynamic value present in cell A31. This offers flexibility in hypothesis testing as the population mean can be adjusted based on new information.
Error handling
- N/A: The function could not compute a result because the data set is empty or all data points are the same.
- DIV/0!: This error appears when the standard deviation is zero, which typically happens when the sample contains identical values.
- VALUE!: Indicates that the parameters provided cannot be evaluated, possibly due to incompatible data types.