You are on page 1of 18

Hypothesis Testing:

2 samples

Dr. Kuldeep Lamba


IMI, New Delhi
Test of Hypothesis
Difference of Two Population Means
• Mean score of Business Statistics of Section A and Section
B of PGDM 2022-24 is not different.

• Average salary of female employees is less than male


employees

• Proportion of promotable employees at one office is


lower than other office of the same organization.
Test of Hypothesis
Difference of Two Population Means
• Stock Return of Cognizant has been showing a different
trend from WIPRO or INFOSYS or TCS for the past few
months. How should you test this belief/statement?

- Test of hypothesis should test the characteristics of Cognizant


Stock Return is different or no different from WIPRO Stock Return
- Two populations are: Cognizant’s Stock Return and WIPRO’s
Stock Return
- Characteristics of these two populations could be its mean or
variance or proportions
- Let’s start with the means of two populations
Test of Hypothesis
Difference of Two Population Means

Population 1
Population 2
Cognizant Stock Return
WIPRO Stock Return
m1 = mean return
of Cognizant m2 = mean return of WIPRO

μ1 – m2 = difference between
the mean returns of two populations

Simple random sample Simple random sample


of n1 stock return from Cognizant of n2 stock return from WIPRO
x1 = Its sample mean x2 = Its sample mean

x1 - x2 = Point Estimate of m1 – m2
Steps of Hypothesis Testing
Step 1: Develop the null and alternative hypotheses.

Step 2: Specify the margin of error or level of significance α


and hence confidence level of the test

Step 3: Collect evidence or sample data, compute the


sample statistic, and then test statistic like Z (standard
normal variate) or t (Student’s t) etc.

Step 4: Decide to reject or accept null hypothesis based on


decision rule
• p-value approach or
• critical value approach
Hypothesis Tests
About μ 1 - μ 2
Possible Situations
• I: Difference between two population means is 0
 1= 2
• H0: 1 -2 = 0
• H1: 1 -2  0
• II: Difference between two population means is less than 0
 1 2
• H0: 1 -2  0
• H1: 1 -2  0
• III: Difference between two population means is less than D
 1  2+D
• H0: 1 -2  D
Hypothesis Tests
About μ 1 - μ 2
Possible Forms of Null Hypothesis

Left-tailed Right-tailed Two-tailed


1 is the mean of population 1 and 2 is the mean of
population 2.
The difference D0 between the two population means is
1 - 2 .
D0 can be positive or negative or zero. D0 = 0 is the most
common form of the test.
Test Statistic About μ 1 - μ 2

Case I: Test Statistic is Z (Standard Normal)


When Population standard deviations σ1 and σ2 are known.

μ1 – μ2

Standard Error or Standard


Deviation of (x1 – x2 )
Confidence Intervals for the
Difference between Two Population
Means: μ 1 - μ 2
Case I: Test Statistic is Z (Standard Normal)
When Population standard deviations σ1 and σ2 are known.

A large-sample (1-)100% confidence interval for the difference


between two population means, 1- 2 , using independent random
samples:
Test Statistic About μ 1 - μ 2
Case II: Test Statistic is t (Student’s t-Statistic)
When Population standard deviations σ1 and σ2 are unknown and
have to be estimated from two samples
(x  x )  (   )
t= 1 2 1 20
 
2  1 1
sp   
n n 
 1 2

Assuming that the population variances σ12 and σ22 are equal (even though
unknown), the statistic follows student’s t distribution with (n1 + n2 – 2) degrees
of freedom.
Under this assumption, the two sample variances, s12 and s22, provide two
separate estimators of the common population variance.
Combining the two separate estimates into a pooled estimate sp2 should give us
Pooled Estimate of the Population
Variance
A pooled estimate of the common population variance,
based on a sample variance s12 from a sample of size n1 and a
sample variance s22 from a sample of size n2 is given by:

The degrees of freedom associated with this estimator is:


df = (n1+ n2-2)

That is, larger weight is given to the variance from the larger
sample.
Confidence Intervals for the
Difference between Two Population
Means: μ 1 - μ 2
Case II: Test Statistic is t (Student’s t-Statistic)
When Population standard deviations σ1 and σ2 are unknown and
have to be estimated from two samples; using the pooled
variance Sp2

A (1-) 100% confidence interval for the difference between two


population means, 1- 2 , using independent random samples and
assuming equal population variances:
Class Exercise
9-7
A credit-insurance organization has developed a new high-tech method of training new sales personnel.
The company sampled 16 employees who were trained the original way and found average daily sales to
be $688 and the sample standard deviation was $32.63. They also sampled 11 employees who were
trained using the new method and found average daily sales to be $706 and the sample standard
deviation was $24.84. At α = 0.05, can the company conclude that average daily sales have increased
under the new plan? (t-test = -1.54425, t critical = -1.708 , so can not reject H0. Average daily sales have
not increased significantly)

9-8
A large stock-brokerage firm wants to determine how successful its new account executives have been
at recruiting clients. After completing their training, new account execs spend several weeks calling
prospective clients, trying to get the prospects to open accounts with the firm. The following data give
the numbers of new accounts opened in their first 2 weeks by 10 randomly chosen female account execs
and by 8 randomly chosen male account execs. At a = 0.05, does it appear that the women are more
effective at generating new accounts than the mean are? (t-test = 2.245266, t critical = 1.746, p-value =
0.019617, so reject H0. The women are significantly more effective than the men in generating new
accounts)
Number of New Accounts
Female account execs 12 11 14 13 13 14 13 12 14 12
Male account execs 13 10 11 12 13 12 10 12    

01/08/2023
Hypothesis Tests
About μ1 – μ2: Matched Samples
Possible Situations
• I: Difference between two population means is 0
 1 - 2 =  d
• H0: d = 0
• H1: d  0
• II: Difference between two population means is less than 0
 d 0
• H0: d  0
• H1: d  0
Test Statistic
Confidence Intervals for Paired Observations
Hypothesis Tests:
Difference between two Population
Proportions p1 - p2
Possible Hypotheses
H0: p1 - p2 < 0
Ha: p1 - p2 > 0

Left-tailed Right-tailed Two-tailed


Hypothesis Tests:
Difference between two Population
Proportions p1 - p2
Test Statistic

Where is the sample proportion for sample 1

and is the sample proportion for sample 2

You might also like