0% found this document useful (0 votes)
60 views26 pages

Module 4A Two Sample Z-Test For Independent Groups - Updated

Uploaded by

queenbeeast
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views26 pages

Module 4A Two Sample Z-Test For Independent Groups - Updated

Uploaded by

queenbeeast
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

STATISTICAL ANALYSIS WITH

SOFTWARE APPLICATIONS
Learning Objective:
At the end of the lesson, the student should be
able to test the differences between two population
means using the z-test.
Two sample tests for the Mean: Independent
populations
Tests of difference between
population means

1 and 2 are unknown


1 and 2 are known
-use pooled variance t-test
-use z-test
-or use separate-variance t
-use normal distribution
test
-use Student’s t-distribution
ASSUMPTIONS FOR z-test
1. The samples are random samples;
2. The sample data are independent of one another and;
3. The standard deviations of both populations must be
known;
4. If the sample sizes are less than 30, the populations must
be normal or approximately normally distributed.

Statistical Analysis with Software Applications, Mc Graw Hill


Traditional Method
Steps:
1. State the null and alternative hypotheses. Identify the
claim. It is necessary to identify group 1 and group 2.
2. Test for normality if sample sizes are less than 30. If
satisfied, compute the test statistic, 𝑧.
3. Find the critical value.
4. Make the decision.
5. Summarize the results.
Two Population Means, Independent Samples

Lower tail test: Upper tail test: Two-tailed test:

H0: μ1 – μ2  𝑑0 H0: μ1 – μ2 ≤ 𝑑0 H0: μ1 – μ2 = 𝑑0


H1: μ1 – μ2 < 𝑑0 H1: μ1 – μ2 > 𝑑0 H1: μ1 – μ2 ≠ 𝑑0

Note: 𝑑0 is the hypothesized difference.


It is equal to zero if two population
means is conjectured to be equal.
Formula for the test statistic, z

𝑥ҧ1 − 𝑥ҧ2 − 𝜇ҧ1 − 𝜇ҧ2


𝑧=
2
𝜎1 𝜎22
+
𝑛1 𝑛2
Example 1
A survey found that the average hotel room rate in
Makati City is P4,420 while the average room rate in
Manila is P4,030. Assume that the data were obtained
from two sample of 50 hotels each and that the
standard deviations of the populations are P281 and
P241, respectively. At 𝛼 = 0.05, can it be concluded
that there is a significant difference in the rates?
Assign Groups
In order to conduct a test about the difference
between means, we will need to assign the samples
that are being studied.
Makati Manila
(Group 1) (Group 2)
𝑥ҧ 4420 4030
𝜎 281 241
𝑛 50 50
Step 1
State the hypotheses and identify the claim.
𝐻0 : 𝜇1 − 𝜇2 = 0
𝐻1 : 𝜇1 − 𝜇2 ≠ 0

The claim is that there is a difference in the rates.


A two-tailed test will be used since the alternative hypothesis
is non-directional (with “≠” symbol).
Step 2
Compute the test value or the test statistic.
Makati Manila
(Group 1) (Group 2) 𝑥ҧ 1 −𝑥ҧ2 − 𝜇
ഥ 1 −ഥ
𝜇2 4420−4030 − 0
𝑧= =
𝑥ҧ 4420 4030 2812 2412
𝜎2 2
1 +𝜎2 +
50 50
𝜎 281 241 𝑛1 𝑛2

𝑛 50 50 = 7.45
Step 3
Find the critical values.
Using the area under the normal curve, the critical values are ±1.96.

Zz = -1.96 Zz =1.96
computed z = 7.45
Step 4
The computed z value is 7.45. The interval between the
critical values defines the non-rejection region. Since the
computed value falls in the rejection region, the appropriate
decision is to reject the null hypothesis.

Zz = -1.96 Zz =1.96
computed z = 7.45
Step 5 Since the null hypothesis is
rejected, we conclude that there is
sufficient evidence to support the
claim that the mean hotel room
rates in the two cities are different.
Example 2 (using Excel)
Example 2: Step 1
State the hypotheses and identify the claim.
𝐻0 : 𝜇1 − 𝜇2 = 0
𝐻1 : 𝜇1 − 𝜇2 ≠ 0
The claim is that there is no difference in the average number
of miles of pleasure driving.
A two-tailed test will be used since the alternative hypothesis
is non-directional (with “≠” symbol).
In Excel:
In Excel:
In Excel:
In Excel, the output is as shown:
z-Test: Two Sample for Means

Male Female
Mean 117 119.7143
Known Variance 278.89 259.21
Observations 35 35

Hypothesized Mean Difference 0


z -0.6922422
P(Z<=z) one-tail 0.24439261
z Critical one-tail 2.32634787
P(Z<=z) two-tail 0.48878523
z Critical two-tail 2.5758293
Obtain results from Excel:
2. The computed value is -0.692 . z-Test: Two Sample for Means
3. From the two-tailed results, the
Male Female
critical value of z is ±2.576. Mean 117 119.7143
Moreover, the p-value associated Known Variance 278.89 259.21
with the computed value of -0.692 is Observations 35 35
Hypothesized Mean
p = 0.489. Difference 0
4. We do no reject the null z -0.6922422
P(Z<=z) one-tail 0.24439261
hypothesis since 𝑝 > 𝛼. z Critical one-tail 2.32634787
P(Z<=z) two-tail 0.48878523
5. There is no sufficient evidence z Critical two-tail 2.5758293
that the means are different.
Practice problems:
Some useful links:
• https://youtu.be/s-r0p2-Mpr4

• https://youtu.be/5NcMFlrnYp8

You might also like