A Z-test assumes the data is normally distributed which according to the central limit theorem is when the sample size is large, usually when n > 30. You use the Z-test for two independent
sample means when you want to see if there is any different between the means of two normally distributed samples.
Example, Shear strength measurements derived from unconfined compression tests for two types of soils gave the results shown in the following table (measurements in tons per square foot). Do the soils appear to differ with respect to average shear strength, at the 1% significance level?
|Soil type 1||Soil type 2|
|n1 = 30||n2 = 35|
|mean1 = 1.65||mean2 = 1.43|
|s1 = 0.26||s2 = 0.22|
When performing a Z-test on two independent samples you want to sum the variances of the means and then take the square root to find the standard deviation of variance sum. In this example you are given the
standard deviations for each sample thus you need to take the square of the standar deviations to find the variances:
- Variance sample 1 = 0.26^2 = 0.0676
- Variance sample 2 = 0.22^2 = 0.0484
Now when you have the variances you use the formula for Z-test two independent samples or you can use the calculator provided.
The Z-value is 3.648 which is above the critical value of 2.5758 (two tailed test), thus there is a significant difference between the soils.