HomeAnalyzeTwo Sample Z Hypothesis Tests

Two Sample Z Hypothesis Tests

Two Sample Z Hypothesis Tests is a parametric test is to compare the means of two independent groups of samples drawn from a normal population. In other words, it is the test to know the means of two populations are the same or different. For example, the mean salaries of male workers are greater than the female workers for the same job?

When to use Two sample Z hypothesis tests

Two sample Z test compares the means of samples of independent groups taken from a normal population. Also, in this test you will have only two groups with independent samples. To compare three groups, use One Way ANOVA instead of Z test.

Furthermore, Z test is similar to the student t-test. Z test is basically used for relatively large samples (say n>30) and the population standard deviation is known. Whereas, student t-test is for small sample size, and also t-test assumes the population standard deviation is unknown.

Difference between One and Two sample Z hypothesis test

The two-sample z test is to tests the difference between means of two groups, whereas a one-sample z test is to tests the difference between a single group and the hypothesized population value.

Assumptions of Two sample Z hypothesis tests

  • Population data is continuous
  • Population follows a standard normal distribution
  • Both sample ends must be higher than 30
  • The population standard deviation is known
  • Similar spread between the groups, in other words homogeneity of variance
  • Both the samples should be randomly selected from the population

Two sample Z-test Formula

Two Sample Z Hypothesis Tests
  • 1 = sample mean of first sample
  • 2 = sample mean of second sample
  • µ1= Mean of first population
  • µ2= Mean of second population
  • σ12= population variance in first population
  • σ22= population variance in second population
  • n1= sample size of first group
  • n2= sample size of second group

Hypothesis Testing

tailed hypothesis is an assumption about a population parameter. The assumption may or may not be true. A one-tailed hypothesis is a test of hypothesis where the area of rejection is only in one direction. Whereas two-tailed, the area of rejection is in two directions. The selection of one or two-tailed tests depends upon the problem.

Two Sample z test mostly performed in Analyze phase of DMAIC to check two sample means are significantly different when the population’s standard deviation is known.

Two Sample Z Hypothesis Tests

Steps to Calculate Two Sample Z hypothesis test

  • Select appropriate statistic- one-tailed or two-tailed?
  • Determine the null hypothesis and alternative hypothesis
  • Determine the level of significance
  • Find the critical value
  • Calculate the standardized test statistics
  • Then make a decision to reject or fail to reject the null hypothesis. Reject the null hypothesis, If the test statistic falls in the critical region.
  • Finally, interpret the decision in the context of the original claim.

Example of Right-tailed test

Example: Princeton school science teacher claims that students in his section will score higher marks than those in his colleague’s section. The mean science score for 60 students in his section is 22.1, and the standard deviation is 4.8. The mean science score for 40 of the colleagues’ sections is 18.8, and the standard deviation is 8.1. At α = 0.05, can the teacher’s claim be supported?

  • State the null and alternative hypothesis
    • Null hypothesis H0: µ1 ≤ µ2
    • Alternative hypothesis H1 : µ1 > µ2
  • Select appropriate statistic- Since the claim is student scores higher marks than the colleagues section; it is a right-tailed test.
  • Level of significance: α= 0.05
  • Find the critical value: 1-α= 1-0.05=0.95
  • Look at the 0.95 in z table= 1.645
  • Calculate the test statistics
  • 1 = 22.1
  • 2 = 18.8
  • σ1= 4.8
  • σ2= 8.1
  • n1= 60
  • n2= 40
Two Sample Z Hypothesis Tests

Interpret the results: Compare Z calc to Z critical . In hypothesis testing, a critical value is a point on the test distribution compares to the test statistic to determine whether to reject the null hypothesis. zcal value is in the rejection region. Hence, we have enough evidence to reject the null hypothesis. So, at 5%, we have enough evidence to support the teacher’s claim that his students score higher than his colleague students.

Example of left-tailed test

Example: A dietician claims that participants in the X program yield less weight reduction than the Y program. The mean weight reduction for 100 participants in the X program is 19.7lb, and the standard deviation is 6.2. Similarly, for program Y, for 120 participants, it is 21.2lb, and the standard deviation is 7.6. At 1% level of significance, can you support the dietician claim?

  • State the null and alternative hypothesis
    • Null hypothesis H0: µ1 ≥ µ2
    • Alternative hypothesis H1 : µ1 < µ2
  • Select appropriate statistic- Since the claim is participants in X program yields less weight reduction than Y program; it is a left-tailed test.
  • Level of significance: α= 0.01
  • Find the critical value: 1-α= 1-0.01=0.99
  • Look at the 0.99 in z table= 2.330
  • Calculate the test statistics
  • 1 = 19.7
  • 2 = 21.2
  • σ1= 6.2
  • σ2= 7.6
  • n1= 100
  • n2= 120
Two Sample Z Hypothesis Tests

Interpret the results: Compare Z calc to Z critical . In hypothesis testing, a critical value is a point on the test distribution compares to the test statistic to determine whether to reject the null hypothesis. zcal value is not in the rejection region. Hence, we failed to reject the null hypothesis. So, at 1% we don’t have enough evidence to support the dietician’s claim.

Example of Two-tailed test

Example: Glenbrook sports center is planning to compare the ages from a random sample of male and female swimmers in their coaching center. The swimming coordinator collected 62 female swimmers’ data, and the mean age is 23.1 with a standard deviation of 3.5. Similarly, collected 46 male swimmers data and the mean average is 19.2 with a standard deviation of 4.8. Assume the population follows a standard normal distribution. At 5% significance level, test whether there is a significant difference in age between the sexes?

  • State the null and alternative hypothesis
    • Null hypothesis H0: µ1 = µ2
    • Alternative hypothesis H1 : µ1 ≠ µ2
  • Select appropriate statistic- Since the Glenbrook sports center planning to test whether there is a significant difference in age between the sexes ; it is a two-tailed test.
  • Level of significance: α= 0.05
  • Since it is a two tailed test α/2= 0.05/2=0.025
  • Find the critical value: 1-α/2= 1-0.025=0.975
  • Then, look at the 0.975 in z table= ±1.96
  • Calculate the test statistics
  • 1 = 23.1
  • 2 = 19.2
  • σ1= 3.5
  • σ2= 4.8
  • n1= 62
  • n2= 46

Interpret the results: Compare Z calc to Z critical . In hypothesis testing, a critical value is a point on the test distribution compares to the test statistic to determine whether to reject the null hypothesis. zcal value is in the rejection region. Hence, we have enough evidence to reject the null hypothesis. So, at 5% we have enough evidence to support the significant difference in age between the sexes.

Helpful Videos

https://www.youtube.com/watch?v=5NcMFlrnYp8

Share: