0% found this document useful (0 votes)
66 views38 pages

Hypothesis Testing for Two Samples

A random sample of 24 couples provided data on husbands' and wives' ages at marriage. A 90% confidence interval was computed for the mean difference between husbands' and wives' ages. The interval was (-1.28, 2.28), indicating that with 90% confidence, the true mean difference between husbands' and wives' ages at marriage is between -1.28 and 2.28 years. Since the interval contains 0, we cannot say with 90% confidence that the mean ages differ.

Uploaded by

Amit Kumar Arora
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
0% found this document useful (0 votes)
66 views38 pages

Hypothesis Testing for Two Samples

A random sample of 24 couples provided data on husbands' and wives' ages at marriage. A 90% confidence interval was computed for the mean difference between husbands' and wives' ages. The interval was (-1.28, 2.28), indicating that with 90% confidence, the true mean difference between husbands' and wives' ages at marriage is between -1.28 and 2.28 years. Since the interval contains 0, we cannot say with 90% confidence that the mean ages differ.

Uploaded by

Amit Kumar Arora
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
  • Introduction to Hypothesis Testing
  • Ideas in Chapter 10
  • Confidence Intervals in Hypothesis Testing
  • Paired Difference Examples
  • Review and Applications
  • Steps in Hypothesis Testing
  • Interpretation and Example Applications
  • Independent vs Dependent Comparisons
  • Confidence Intervals with Independent Samples
  • Example Case Studies
  • Proportions and Hypothesis Testing

STAT 206:

Chapter 10

Fundamentals of Hypothesis Testing:


Two-Sample Tests

1
Ideas in Chapter 10
• How to use hypothesis testing for comparing the difference
between
• The means of two related populations
• The means of two independent populations
• The proportions of two independent populations

2
10.2 Comparing Means of Two Related (Dependent) Populations

What we know about one (1) sample confidence


intervals for population mean…
• CI = point estimate ± margin of error
• Central Limit Theorem says that the sampling distribution
for a mean or proportion is bell-shaped if the sample size
is big enough
• We know how to calculate the confidence interval (CI) for
population mean:
• “t-score” is based on the t-distribution
s
• Determined from xt( ) Margin
level of confidence and n of Error
• Degrees of freedom (df = n-1)
• To use this method, you need:
• Data obtained by randomization Standard
• Approximately normal data Error
population distribution
Confidence Interval for
Mean Difference in Two Populations (DEPENDENT
Samples)
• Want to compare two groups that are related to one another,
for example:
• Has “customer service” training made a difference in the number of
customer complaints?
• Ages of husbands and wives
(i.e., couples  ages probably NOT independent)
• Before and after treatment of measurements of some medical test
(i.e., same subjects/patients with before/after measurements
 “pair” is the same subject  not independent)
• Effectiveness of sunscreen in a left-arm / right-arm experiment
(i.e., same subjects/individuals  “pair” is the same subject
 not independent)
• Braking distance for cars in wet / dry conditions
(i.e., same cars, but conditions change  not independent)
• Braking distance for cars tire brand 1/ tire brand 2
(i.e., same cars, but tires change  not independent)
Confidence Interval for Population Mean Difference
(DEPENDENT)

• Confidence
  Interval for dependent pairs is derived in same
manner as for one sample mean – except that you’re using the
difference in your pairs (value1 – value2),
ALWAYS in the same order,
to find the DIFFERENCES to calculate the sample statistic, d

• d is the point estimate (statistic) for µd (parameter)

• Confidence Interval for µd is given by CIµd d ± t()

• n is the number of pairs and degrees of freedom = n - 1


Interpretation of confidence intervals for two
samples mean differences (i.e., DEPENDENT)
Let LL = lower limit and UL = upper limit of a confidence
interval for (group A – group B).
That is, CI (μd) = CI(μA – μB) = (LL , UL)
• If LL and UL are both greater than 0, this suggests that
group A has the greater mean
• Interpretation: We are x%* confident that the population
mean for group A is at least LL and at most UL units
greater than the population mean for group B.
Interpretation of confidence intervals for two
samples mean differences (i.e., DEPENDENT)
Let LL = lower limit and UL = upper limit of a confidence
interval for (group A – group B).
That is, CI (μd) = CI(μA – μB) = (LL , UL)
• If LL and UL are both less than 0, this suggests that group
B has the greater mean
• Interpretation: We are x%* confident that the population
mean for group B is at least |LL| and at most |UL| units
greater than the population mean for group A.
Interpretation of confidence intervals for two
samples mean differences (i.e., DEPENDENT)

Let LL = lower limit and UL = upper limit of a


confidence interval for (group A – group B).
That is, CI (μd) = CI(μA – μB) = (LL , UL)
• If LL is less than 0 and UL is greater than 0, then
neither group clearly has a greater mean
• Interpretation: With x% confidence, it is unclear
whether group A or group B has the greater
population mean. If group A has the greater
population mean, it is by at most UL units and if
group B has the greater population mean, it is by at
most |LL| units.
Paired Difference: Example
• Assume you send your salespeople to a “customer service”
training workshop. Has the training made a difference in the
number of complaints? You collect the following data:
# complaints # complaints AFTER - BEFORE  Di
Salesperson BEFORE AFTER Difference Xd = n = -4.2
C.B 6 4 -2
T.F
M.H.
20
3
6
2
-14
-1 SD 
 i
(D  Xd ) 2

R.K. 0 0 0 n 1
M.O. 4 0 -4
-21 sum
 5.67
SD 5.67  α = 0.01  = 0.005
99%CI  Xd  t / 2   4.2  4.604( )
n 5 df = n – 1 = 5 – 1 = 4
 (-15.87, 7.47)
t = 4.604
We are 99% confident that the difference in customer complaints, AFTER and BEFORE
training is at least -15.87 and at most 7.47. Because the CI covers 0, we cannot be 99%
confident that µD is not equal to 0 (i.e., no difference).
couple husband wife husband-wife
 
11 25
25 22
22 3 
Example: We are interested in whether there is a 22 25 32 -7
25 32  
difference in the mean age at which men marry 3
3
51
51
50
50
1
 
4 25 25 0
and the age at which women marry. The 54 25
38 25
33 5 
following data was collected from a random 65 38
30 33
27 3 
sample of 24 couples. Compute and interpret a 76 30
60 27
45  
15
87 60
54 45
47 7 
90% confidence interval on the mean difference 98 31
54 30
47 1 
between husbands’ and wives’ age at marriage. 109 54
31 44
30 10
 
Assume that ages at marriage follow a normal 11
10 23
54 23
44 0 
12
11 34
23 39
23 -5
 
distribution. 13 25 24 1
12 34 39  
90% confidence interval results: 14 23 22 1
13
15 25
19 24
16 3 
μ1 - μ2 : mean of the paired 14
16 23
71 22
73  
-2
15
17 19
26 16
27  
-1
difference between husband and wife 16
18 71
31 73
36  
-5
 𝑋´ 𝑑 =1.875 𝑆   𝐷=4.812  α = 0.10  = 0.05 19
17 26 24
27 2 
  𝑆𝐷 20
18 62
31 60
36 2 
´
90 %  𝐶𝐼 = 𝑋 𝑑 ± 𝑡 df = n – 1 = 24 – 1 = 23 21
19 29
26 26
24 3 
√ 𝑛4.812 22
20 31
62 23
60 8 
 
¿ 1.875 ± 1.7139 ( ) t = 1.7139 23
21
29
29
28
26
1
 
√ 24 24
22
35
31
36
23
-1
 
23 29 28  
 
3.55852)
24 35 36  
Interpretation: We are 90% confident that the mean age at which men marry is at
least 0.19 and at most 3.5 years greater than the mean age at which women
marry. That is, we are 90% confident that the average age at which men marry is
higher than the average age at which women marry.
Question:
Nine experts rated two brand of Colombian coffee   Brand
Expert A B
in a taste-testing experiment. A rating on a 7- C.C. 24 26
point scale (1 = extremely unpleasing  7 = S.E. 27 27
extremely pleasing) is given for each of four E.G. 19 22
characteristics: taste, aroma, richness and acidity. B.L. 24 27
The table at the right contains the rating C.M. 22 25
C.N. 26 27
accumulated over all four characteristics: G.N. 27 26
• Is the assumption that the populations are R.M. 25 27
P.V. 22 23
dependent or independent?
A. Dependent / related
B. Independent / not related
 • What is your next step?
A. Calculate means and standard deviations for Brand A and Brand B
B. Calculate differences for each pair always in the direction that
will provide a positive difference. Then determine d (that is, ) and sd for
the sample of differences
C. Calculate differences for each pair always in the same direction. Then
determine d (that is, ) and sd for the sample of differences
11
Review:
• Statistical
  significance versus Practical significance
• Is “significance” used in the usual sense or the statistical sense
• Very large sample sizes can lead to statistical significance for
very small differences  determine sample size for evaluation
• If possible, look at confidence intervals to interpret
• Confidence Interval for dependent pairs is derived in same manner
as for one sample mean – except that you’re using the difference in
your pairs (value1 – value2),
ALWAYS in the same order,
to find the DIFFERENCES to calculate the sample statistic, d
• d is the point estimate (statistic) for µd (parameter)
• Confidence Interval for µd is given by CIµd d ± t()
• n is the number of pairs and degrees of freedom = n - 1
Hypothesis Tests for Population Mean Difference
(DEPENDENT)
Steps for a Hypothesis Test:
1. Check assumptions
• Sample of difference scores is a random sample from a population of such
difference scores
• Difference scores have a population distribution that is approximately
normal. This is important for small samples (less than about 30). If the
sample size is small, make a graphical display and check for extreme
outliers or skew
2. Set up hypotheses:
• Ho: μd = μ1– μ2 ≥, ≤, or = 0
• Ha: μd = μ1– μ2 <, > or ≠ 0
xd  0
3. Calculate test statistic. t
(Use software, sd / n
and/or it will be given in output.)
Hypothesis Tests for Population Mean Difference
(DEPENDENT)
Steps for a Hypothesis Test:
4. Calculate p-value
(Use software. It will be given in output)
• If using the > alternative, p-value = P(T > t)
• If using the < alternative, p-value = P(T < t)
• If using the ≠ alternative, p-value = 2 * P(T < -|t|) if using E.3
5. Draw conclusion and interpret the results
• If p-value ≤ α (or if p-value is less than .01 when no α is
given),  reject H0 (With p-value = _______, we have
sufficient evidence that (state HA in problem context)
• If p-value > α (or if p-value is greater than .10 when no α is
given),  do not reject H0 (With p-value = _______, we do
not have sufficient evidence that (state HA in problem context)

RECALL: Smaller p-values give stronger evidence against the null, H0


Paired Difference Test: Solution
• Has the training made a difference in the number of complaints
(at the 0.01 level)?
H0: μD = μafter-μbefore= 0 Reject Reject
H1: μD = μafter-μbefore  0
/2 /2
 = .01 Xd =- - 4.2 - 4.604 4.604
- 1.66
t0.005 = ± 4.604
d.f. = n - 1 = 4
Decision: Do not reject H0
(tstat is not in the reject region)
Test Statistic:
Conclusion: There is not a
Xd  μ D  4.2  0
t STAT    1.66 significant change in the
SD / n 5.67/ 5 number of complaints.
Back to our Previous Example: couple
1
husband
25
wife
22
husband-wife
3
We are interested in whether there is a 2 25 32 -7
3 51 50 1
difference in the mean age at which 4 25 25 0
men marry and the age at which women 5
6
38
30
33
27
5
3
marry. The following data was collected 7 60 45 15
8 54 47 7
from a random sample of 24 couples. 9 31 30 1
Assume that ages at marriage follow a 10
11
54
23
44
23
10
0
normal distribution. Test whether there 12 34 39 -5
13 25 24 1
is a difference in ages at which men and 14 23 22 1
women marry using α = .10. 15
16
19
71
16
73
3
-2
Hypothesis test results: 17
18
26
31
27
36
-1
-5
μH - μW : mean of the paired difference 19 26 24 2
20 62 60 2
between husband and wife 21 29 26 3
22 31 23 8
H0 : μD = μH - μ W = 0 23 29 28 1
24 35 36 -1
H A : μ D = μ H - μW ≠ 0
Difference Sample Diff. Std. Err. DF T-Stat P-value
husband - wife 1.875 0.9822934 23 1.9087983 0.0688

With P-value = 0.0688 and α = 0.10, there is sufficient evidence that the mean
age at which men marry differs from the mean age at which women marry.
Example: (Salt Free Diet) Salt-free diets are often prescribed for people
with high blood pressure. The following data are from an experiment
designed to estimate the reduction in diastolic blood pressure (in units
called millimeters of mercury (mm Hg)) as a result of following such a
diet for 2 weeks. Assume diastolic readings follow a normal distribution.
Before 93 106 87 92 102 95 88 110
After 92 102 89 92 101 96 88 105
Difference: (After – Before) -1 -4 2 0 -1 1 0 -5

a) Find and interpret a 99% confidence interval for the true mean
reduction in blood pressure.
99% confidence interval results:
μAfter - μBefore : mean of the paired difference between After and Before
Difference Sample Diff. Std. Err. DF L. Limit U. Limit
After – Before -1 0.8451542 7 -3.9576032 1.9576032

With 99% confidence it is unclear whether mean diastolic blood


pressure is reduced (or increased) by a salt free diet. If it is
reduced, it by at most 3.957 mm Hg. If it is increased it is by at
most 1.957 mm Hg.
Example: (Salt Free Diet) Salt-free diets are often prescribed for people
with high blood pressure. The following data are from an experiment
designed to estimate the reduction in diastolic blood pressure (in units
called millimeters of mercury (mm Hg)) as a result of following such a
diet for 2 weeks. Assume diastolic readings follow a normal distribution.
Before 93 106 87 92 102 95 88 110
After 92 102 89 92 101 96 88 105
Difference: (After – Before) -1 -4 2 0 -1 1 0 -5

b) Test whether there is a reduction in diastolic blood pressure as a


result of following a salt-free diet for 2 weeks.
Hypothesis test results:
μ1 - μ2 : mean of the paired difference between After and Before
H0 : μ1 - μ2 ≥ 0
HA : μ1 - μ2 < 0
Difference Sample Diff. Std. Err. DF T-Stat P-value
After - Before -1 0.8451542 7 -1.183216 0.1377

With P-value = 0.1377, there is not sufficient evidence that mean


diastolic blood pressure is reduced by following a salt-free diet for 2
weeks.
REVIEW Population Mean Difference
(DEPENDENT):
•• Confidence
  Interval for µd (population difference in pairs (value1 – value2) is
given by d ± t()

• Steps for a Hypothesis Test for Population Mean Difference (DEPENDENT) :


1. Check assumptions
2. Set up hypotheses:
• Ho: μd = μ1– μ2 = 0
• Ha: μd = μ1– μ2 <, >, or ≠ 0
xd  0
3. Calculate test statistic. t
(Use software, and/or given in output) sd / n
4. Calculate p-value and/or critical values for comparisons
(Use software. It will be given in output)
• If using the > alternative, p-value = P(T > t)
• If using the < alternative, p-value = P(T < t)
• If using the ≠ alternative, p-value = 2 * P(T < -|t|)
5. Draw conclusion and interpret the results
RECALL: Smaller p-values give stronger evidence against the null, H0
Question:
A recent study found that 51 children who watched a
commercial for Walker Crisps (potato chips) featuring a
well-known celebrity endorser ate a mean of 36 grams of
Walker Crisps, but 41 children who watched a commercial
for an alternative food snack ate a mean of 25 grams of
Walker Crisps.
• Is the assumption that the populations are dependent or
independent?
A. Dependent
B. Independent

20
10.4 F-Test for the Ratio of Two Variances (sort of…)

But what if your populations are NOT dependent?


• Two populations  Two means and two variances…
• We must have a method to combine the variances in
order to calculate our test statistics

21
Two populations  Two variances
•• Methods
  to combine the variances:
• If those variances are UNEQUAL  UNPOOLED
• If variances are EQUAL  POOLED

• UNPOOLED Std err =


• Degrees of Freedom estimated by Welch-Satterthwaite equation
(AWFUL! That’s why the d.f. in the output looks so “strange”)
• POOLED Std err =
• Degrees of Freedom =

• Some sources point to the following Rule of Thumb:


If the larger sample standard deviation is MORE THAN twice the
smaller sample standard deviation then perform the t-test using
the UNPOOLED method.
10.1 Comparing Means of Two Related Independent Populations

Comparing Two Means: INDEPENDENT


• Two INDEPENDENT samples
(unlike our paired sample experiments)
• Examples:
• Randomized experiments that randomly allocate subjects to two
treatments
• Single blind (subject doesn’t know treatment but administrator does)
• Double blind (neither subject nor administrator know treatment)
• Observational study separates subjects into groups according to their
value for an explanatory variable
• Same steps as previous hypothesis tests:
1. Check assumptions
2. Set up hypotheses
3. Calculate test statistic
4. Calculate p-value
5. Draw conclusion and interpret results
Steps of a Hypothesis Test for Comparing Means
of Two INDEPENDENT Samples
Step 5: Draw Conclusion and Interpret Results
• We summarize the test by reporting and interpreting the P-value
• Smaller p-values give stronger evidence against the null hypothesis
If p-value ≤ α  REJECT H0
If p-value > α  FAIL to reject H0

With p-value = _______, we <have / do not have> sufficient


evidence that <state Ha in the context of the problem>
Confidence Intervals for comparing two means
using independent samples
• Formula
  for 95% confidence interval:


where

• (unpooled for assumed unequal variances)

(t-score and/or Confidence Interval LL/UL


given on output if using software)
Interpretation of Confidence Intervals for
comparing two means using independent samples
• Let LL = lower limit and UL = upper limit of a confidence interval for
(group A – group B). That is, μA – μB= (LL , UL)
If LL and UL are both greater than 0, this suggests that group A has the greater
mean.
• Interpretation: We can be 95 %* confident that the population mean for group A
is at least LL and at most UL units greater than the population mean for group B.

If LL and UL are both less than 0, this suggests that group B has the greater mean.
• Interpretation: We can be 95 %* confident that the population mean for group B
is at least |UL| and at most |LL| units greater than the population mean for
group A.

If LL is less than 0, and UL is greater than 0, neither group clearly has the greater
mean.
• Interpretation: With 95 %* confidence, it is unclear whether group A or group B
has the greater population mean. If group A has the greater population mean, it
is by at most UL units and if group B has the greater population mean, it is by at
most |LL| units. *Use correct Level of Confidence
Example: (variances assumed equal)
•   and some friends have decided to test
You Local
16.8
Chain
22.0
the validity of an advertisement by a local 11.7
15.6
15.2
18.7
pizza restaurant, which says it delivers to 16.7
17.5
15.6
20.8
the dormitories faster than a local brand of 18.1 19.5
14.1 17.0
a national chain. Both the local pizza 21.8 19.5
13.9 16.5
restaurant and national chain are located 20.8 24.0
across the street from your college campus. n1=
10
n2=
10
You define the variable of interest as the
delivery time, in minutes, from the time the
pizza is ordered to when it is delivered. You
collect the data by ordering 10 pizzas from
Are the populations of delivery
the local pizza restaurant and 10 pizzas times for local and national
from the national chain at different times. pizzerias independent or
You organize and store the data in the excel
spreadsheet shown. At the α=0.05 level, is dependent?
there evidence that the mean delivery time A. Independent
for the local pizza restaurant is less than the B. Dependent
mean delivery time for the national pizza
chain?
H0: (local delivery time longer than chain)
HA: (local delivery time less than chain)
Example: (variances assumed equal)
•   and some friends have decided to test
You Local
16.8
Chain
22.0
the validity of an advertisement by a local 11.7 15.2
pizza restaurant, which says it delivers to 15.6 18.7
16.7 15.6
the dormitories faster than a local brand of 17.5 20.8
a national chain. Both the local pizza 18.1 19.5
restaurant and national chain are located 14.1
21.8
17.0
19.5
across the street from your college campus. 13.9 16.5
You define the variable of interest as the n1=
20.8
n2=
24.0

delivery time, in minutes, from the time the 10 10


pizza is ordered to when it is delivered. You means:
16.7 18.88 =AVERAGE(data_string)
collect the data by ordering 10 pizzas from variances:
the local pizza restaurant and 10 pizzas 9.58222 8.21511 =VAR.S(data_string)
std deviations:
from the national chain at different times. 3.09552 2.8662 =SQRT(variance)
You organize and store the data in the excel degrees of freedom:
9 9 18 =SUM((n1-1)+(n2-1))
spreadsheet shown. At the α=0.05 level, is pooled variance:
there evidence that the mean delivery time 8.89867 =(variance1*df1+variance2*df2))/(df1+df2)
pooled standard error:
for the local pizza restaurant is less than the 1.33407 =SQRT(pooled_variance*(1/n1 + 1/n2))
mean delivery time for the national pizza
chain? mean diff:
-2.18 =mean1 - mean2
t-stat:
H0: (local delivery time longer than chain) -1.6341 =(mean_diff - hypothesis_diff)/(pooled_std_err)
P-value:
HA: (local delivery time less than chain) 0.0598 =[Link](t-stat,df_pooled,TRUE)
Example: (variances assumed equal)
•   and some friends have decided to test
You •• Conclusion:
 
the validity of an advertisement by a local • P-value=0.0598>0.05=α
pizza restaurant, which says it delivers to
the dormitories faster than a local brand of • Also,
a national chain. Both the local pizza T-stat=-1.6341>crit value=-1.7341
restaurant and national chain are located
•  FAIL to reject H0
across the street from your college campus.
You define the variable of interest as the • That is, we do not have sufficient
delivery time, in minutes, from the time the evidence to conclude that the local
pizza is ordered to when it is delivered. You pizza delivery time is less than the
collect the data by ordering 10 pizzas from national chain delivery time. Thus, the
the local pizza restaurant and 10 pizzas local pizzeria’s claim that it has a faster
from the national chain at different times. delivery time is, at best, questionable.
You organize and store the data in the excel
spreadsheet shown. At the α=0.05 level, is • 95% CI = (std_errorpool)
there evidence that the mean delivery time = -2.18 ± 2.1009(1.3341)
for the local pizza restaurant is less than the =(-4.98 , 0.62)
mean delivery time for the national pizza • We are 95% confident that the true
chain? mean difference in pizza delivery times
H0: (local delivery time longer than chain) is between -4.98 minutes and 0.62
minutes.
HA: (local delivery time less than chain)
Example 1 – Ebay Sales: Recall Example 7 from Chapter 7 which compared
the Ebay selling prices of the Palm M515 PDA. Some were sold using the
Buy it Now option and some were sold using through the bidding option.
The table shows data for both options. (The data was obtained from May 2003.)
a. Is there evidence, at the .05 level of significance, that there Buy-It-Now Bidding
is a difference in the mean selling price of the two methods? 235 250  
b. Find and interpret a 95% confidence interval for the 225 249  
difference in the mean selling price of the two methods. 225 255  
Summary statistics: 240 200  
250 199  
Column n Mean Variance Std. Dev. Std. Err. Median Range Min Max Q1 Q3
250 240  
Buy-It-Now 7 233.57143 214.28572 14.638501 5.5328336 235 40 210 250 225 250
210 228  
Bidding 18 231.61111 481.1928 21.936108 5.17039 240 77 178 255 225 246
  255  
  232  
  246  
  210  
  178  
  246  
  240  
  245  
  225  
  246  
  225  
Example 1 – Ebay Sales: Recall Example 7 from Chapter 7 which compared
the Ebay selling prices of the Palm M515 PDA. Some were sold using the
Buy it Now option and some were sold using through the bidding option.
The table shows data for both options. (The data was obtained from May 2003.)
Buy-It-Now Bidding
a. Is there evidence, at the .05 level of  
significance, that there is a difference in the 235 250
 
mean selling price of the two methods? 225 249
225 255  
Hypothesis test results: 240 200  
μ1 : mean of Buy-It-Now 250 199  
μ2 : mean of Bidding 250 240  
μ1 - μ2 : mean difference 210 228  
H0 : μ1 - μ2 = 0   255  
  232  
HA : μ1 - μ2 ≠ 0
  246  
(without pooled variances)  
Sample   210
Difference Mean Std. Err. DF T-Stat P-value  
  178
  246  
μ1 - μ2 1.9603175 7.57266 16.589735 0.25886774 0.7989
  240  
  245  
With p-value = 0.7989 > α = 0.05, we do not have sufficient evidence   225  
that there is a difference the average selling price of the two methods   246  
of purchase on Ebay.   225  
If we are testing for the difference between the means of 2
independent populations presuming equal variances with
samples of n1 = 20 and n2 = 20, the test and the number of
degrees of freedom are equal to:
A. t-distribution with 19 degrees of freedom
B. t-distribution with 38 degrees of freedom
C. t-distribution with 18 degrees of freedom
D. z-distribution with 40 degrees of freedom

df = (n1-1) + (n2-1) = n1+n2 - 2 = 20+20 - 2 = 38

32
Review
•• Methods
  to combine the variances:
• If those variances are UNEQUAL  UNPOOLED
(df calculated via Welch-Satterthwaite)

• If variances are EQUAL  POOLED


(df = )

• Some sources point to the following Rule of Thumb:


If the larger sample standard deviation is MORE THAN twice the smaller sample
standard deviation then perform the t-test using the UNPOOLED method.
• Two INDEPENDENT samples hypothesis tests:
1. Check assumptions
2. Set up hypotheses
3. Calculate test statistic
4. Calculate p-value
5. Draw conclusion and interpret results
•  Two INDEPENDENT samples Confidence Intervals:
 
(unpooled for assumed unequal variances)
10.3 Comparing Proportions of Two Related Independent Populations

Comparing two proportions…


• Same steps as previous hypothesis tests:
1. Check assumptions
2. Set up hypotheses
3. Calculate test statistic
4. Calculate p-value
5. Draw conclusion and interpret results
If we wanted to do hypothesis testing…
 •
: p1 = p2 (that is, (1 - 2) = 0)
HA: p1 ≠ p2 (2-tailed test, > or < would be 1-tailed test)
• Test Statistic: z =

• Where , with se0=

• Confidence Interval for p1 – p2 is:



Questions for Example:
Is there a significant difference between the proportion of men and
the proportion of women who will vote Yes on Proposition A? In a
random sample, 36 of 72 men and 35 of 50 women indicated they
would vote “Yes.” Test at the .05 level of significance. Let p1 be the
proportion of men and p2 be the proportion of women.
• Is the underlying data categorical or quantitative?
A. Categorical
B. Quantitative
• Are the populations dependent or independent?
A. Dependent
B. Independent
• What sampling distribution is used?
A. t-distribution
B. Z-distribution

36
Hypothesis Example: 2 Population Proportions
•  there a significant difference between the proportion of men and
Is
the proportion of women who will vote Yes on Proposition A? In a
random sample, 36 of 72 men and 35 of 50 women indicated they
would vote “Yes.” Test at the .05 level of significance. Let p1 be the
proportion of men and p2 be the proportion of women.
• Hypotheses: H0: p1 – p2 = 0   and
HA: p1 – p2 ≠ 0


• Critical values = ±1.96 for α=0.05 Reject H0 Reject H0

• P-value = 0.0139<0.05=α .025 .025


• Decision: Reject H0
• Conclusion: With P-value = 0.0139 and -1.96 1.96
α =0.05, there is sufficient evidence to conclude -2.20
that the proportions of men and women who will
vote “yes” for Proportion A are different.

37
CI for Two Population Proportions
• Confidence
  Interval for p1 – p2 is:

• EXAMPLE: 95% CI for Men/Women voters on Proposition A
(previous)

• = (-0.37 , -0.03)
• Interpretation: We are 95% confident that the true difference in
proportions between men and women is at least -0.37 and at most
-0.03. That is, because the entire CI is below zero, we can be 95%
confident that the two proportions are different.

38

STAT 206:
Chapter 10
Fundamentals of Hypothesis Testing:
Two-Sample Tests
1
Ideas in Chapter 10
• How to use hypothesis testing for comparing the difference 
between
• The means of two related populati
What we know about one (1) sample confidence 
intervals for population mean…
• We know how to calculate the confidence interv
Confidence Interval for 
Mean Difference in Two Populations (DEPENDENT 
Samples)
• Want to compare two groups that are relate
Confidence Interval for Population Mean Difference
(DEPENDENT)
• Confidence Interval for dependent pairs is derived in same
Interpretation of confidence intervals for two 
samples mean differences (i.e., DEPENDENT)
Let LL = lower limit and UL = uppe
Interpretation of confidence intervals for two 
samples mean differences (i.e., DEPENDENT)
Let LL = lower limit and UL = uppe
Interpretation of confidence intervals for two 
samples mean differences (i.e., DEPENDENT)
Let LL = lower limit and UL = uppe
•
Assume you send your salespeople to a “customer service” 
training workshop.  Has the training made a difference in the 
nu
Example: We are interested in whether there is a 
difference in the mean age at which men marry 
and the age at which women m

You might also like