z-Test and its types - Probability and Statistics

Hey there! Welcome to KnowledgeKnot! Don't forget to share this with your friends and revisit often. Your support motivates us to create more content in the future. Thanks for being awesome!

What is z-Test?

A z-test is a statistical test used to determine whether there is a significant difference between the means of two groups or between a sample mean and a known population mean when the sample size is large (typically n > 30) and/or the population variance is known. It is widely used in hypothesis testing, particularly when the data sets are approximately normally distributed.

Need for z-Test

The z-test is essential in various research scenarios:

Comparing Means: To compare the average values of two different groups when the sample size is large.

Hypothesis Testing: To determine whether the observed data significantly differ from what is expected under the null hypothesis.

Known Population Variance: To analyze data when the population variance is known or can be assumed based on large sample sizes.

Types of z-Tests

1. One-Sample z-Test: Compares the mean of a single sample to a known population mean.

2. Two-Sample z-Test: Compares the means of two independent samples.

3. z-Test for Proportions: Compares proportions to see if they are significantly different from each other or from a hypothesized proportion.

1. One-Sample z-Test: Compares the mean of a single sample to a known population mean.
z=Xβ€Ύβˆ’ΞΌΟƒ/nz = \frac{\overline{X} - \mu}{\sigma / \sqrt{n}}
Where:
Xβ€Ύ\overline{X} is the sample mean,
ΞΌ\mu is the known population mean,
Οƒ\sigma is the population standard deviation,
nn is the sample size.

For Example: A manufacturer claims that the mean lifetime of their light bulbs is 1,000 hours. A sample of 50 light bulbs is tested, and their lifetimes are recorded. The sample mean is found to be 990 hours with a known population standard deviation of 40 hours.

Solution:

1. Calculate the z-statistic:
z=990βˆ’100040/50z = \frac{990 - 1000}{40 / \sqrt{50}}
z=βˆ’1040/7.071z = \frac{-10}{40 / 7.071}
z=βˆ’105.656z = \frac{-10}{5.656}
z=βˆ’1.77z = -1.77

Therefore, the z-statistic is approximately -1.77. This value would be compared to the critical z-value from the z-distribution table at the desired significance level (e.g., 0.05) to determine if the difference is statistically significant.

2. Two-Sample z-Test: Compares the means of two independent samples.
z=Xβ€Ύ1βˆ’Xβ€Ύ2Οƒ12n1+Οƒ22n2z = \frac{\overline{X}_1 - \overline{X}_2}{\sqrt{\frac{\sigma_1^2}{n_1} + \frac{\sigma_2^2}{n_2}}}
Where:
Xβ€Ύ1\overline{X}_1 and Xβ€Ύ2\overline{X}_2 are the sample means,
Οƒ12\sigma_1^2 and Οƒ22\sigma_2^2 are the population variances,
n1n_1 and n2n_2 are the sample sizes.

For Example: A researcher wants to compare the average heights of men and women in a large city. Random samples of 100 men and 120 women are taken. The sample mean heights are 175 cm for men and 165 cm for women, with population standard deviations of 10 cm and 12 cm, respectively.

Solution:

1. Calculate the z-statistic:
z=175βˆ’165102100+122120z = \frac{175 - 165}{\sqrt{\frac{10^2}{100} + \frac{12^2}{120}}}
z=10100100+144120z = \frac{10}{\sqrt{\frac{100}{100} + \frac{144}{120}}}
z=101+1.2z = \frac{10}{\sqrt{1 + 1.2}}
z=102.2z = \frac{10}{\sqrt{2.2}}
z = \frac{10}{1.483}}
z=6.75z = 6.75

Therefore, the z-statistic is approximately 6.75. This value would be compared to the critical z-value from the z-distribution table at the desired significance level (e.g., 0.05) to determine if the difference in heights is statistically significant.

3. z-Test for Proportions: Compares proportions to see if they are significantly different from each other or from a hypothesized proportion.
z=pβˆ’p0p0(1βˆ’p0)nz = \frac{p - p_0}{\sqrt{\frac{p_0 (1 - p_0)}{n}}}
Where:
pp is the sample proportion,
p0p_0 is the hypothesized population proportion,
nn is the sample size.

For Example: A company claims that 60% of its customers are satisfied with their service. A survey of 200 customers finds that 130 are satisfied.

Solution:

1. Calculate the sample proportion:
p=130200=0.65p = \frac{130}{200} = 0.65

2. Calculate the z-statistic:
z=0.65βˆ’0.600.60(1βˆ’0.60)200z = \frac{0.65 - 0.60}{\sqrt{\frac{0.60 (1 - 0.60)}{200}}}
z=0.050.60Γ—0.40200z = \frac{0.05}{\sqrt{\frac{0.60 \times 0.40}{200}}}
z=0.050.24200z = \frac{0.05}{\sqrt{\frac{0.24}{200}}}
z=0.050.0012z = \frac{0.05}{\sqrt{0.0012}}
z = \frac{0.05}{0.0346}}
z=1.45z = 1.45

Therefore, the z-statistic is approximately 1.45. This value would be compared to the critical z-value from the z-distribution table at the desired significance level (e.g., 0.05) to determine if the difference in proportions is statistically significant.