Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 44

PROBABILITY THEORY

INFERENCE ON A POPULATION MEAN


WEEK 13

SUBJECT MATTER EXPERT


SUBTOPICS :

•Comparing the Means of Two Independent


Populations
•Comparing the Means of Two Related
Populations
•Comparing Two Population Proportions
•F Test for the Difference Between Two
Variances

2
Introduction

Two Sample Tests

Independent Means, Independent Independent


Population Related Population Population
Means Populations Proportions Variances

Group 1 vs. Same group Proportion Variance 1 vs.


Group 2 before vs. after 1vs. Variance 2
treatment Proportion 2
INTRODUCTION

Steps of Hypothesis Testing:


1. State the null hypothesis, H0 and state the alternative
hypotheses, H1

2. Choose the level of significance, α, and the sample size n.


3. Determine the appropriate test statistic and sampling
distribution
INTRODUCTION

Steps of Hypothesis Testing: (Cont.)


4. Determine the critical values that divided the value of the test
statistic
5. Collect data and compute the test statistic from the sample result
6. Compare the test statistic to the critical value to determine whether
the test statistic falls in the region of rejection. Make the statistical
decision: Reject H0 if the test statistic falls in the rejection region.
Express the decision in the context of the problem
Comparing the Means of Two
Independent Populations (σ1
and σ2 known)
Test hypothesis or form a confidence interval for the difference between
two population means, μ1 – μ2

The point estimate for the difference between sample means: X 1 – X2

• Independent: Sample selected from one population has


no effect on the sample selected from the other
population
• Use Z test, pooled variance t test, or separate-variance t
test
Comparing the Means of Two
Independent Populations (σ1
and σ2 known)

Hypothesis Test Statistic Critical value

The Test Statistic and Critical Values


H0: m1 –m2 ³ 0 z   z
H1: m1 –m2 < 0
( 𝑥¯ 1 − 𝑥¯ 2 ) −(𝜇 1 − 𝜇2 )
H0: m1 –m2 ≤ 0 𝑧=
H1: m1 –m2 > 0 √𝜎 2
1
2
/𝑛 1+ 𝜎 /𝑛 2
2 z  z

H0: m1 –m2 = 0
H1: m1 –m2 ¹ 0
𝑧>𝑧 𝛼 /2 𝑜𝑟
Comparing the Means of Two
Independent Populations (σ1
and σ2 known)

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


The Test Statistic and Critical Values
H0: μ1 – μ2  0
H0: μ1 – μ2 ≤ 0 H0: μ1 – μ2 = 0
H1: μ1 – μ2 < 0
H1: μ1 – μ2 > 0 H1: μ1 – μ2 ≠ 0
a a a/2 a/2

-za za -za/2 za/2


Reject H0 if Z < - Reject H0 if Z > Reject H0 if Z < -
Za Za Za/2
Za/2 or Z >
Comparing the Means of Two
Independent Populations (σ1
and σ2 known)

Confidence Interval Estimation :

 12  22  12  22
( x1  x2 )  z / 2   ( 1   2 )  ( x1  x2 )  z / 2 
n1 n2 n1 n2
Comparing the Means of Two
Independent Populations (σ1
and σ2 known)

Example 1 :
Assume that the population standard deviations are
known with σ1 = 10 and σ2 = 10. An α .05 level of
significance is specified for the study. Independent simple
random samples of n1 = 30 individuals from training
center A and n2 = 40 individuals from training center B are
taken. The respective sample means are x¯ 1 = 82 and x¯2 =
78. Do these data suggest a significant difference between
the population

10
Comparing the Means of Two
Independent Populations (σ1
and σ2 known)

Example 1 :
μ1 = the mean examination score for the population
of individuals trained at center A
μ2 = the mean examination score for the population
of individuals trained at center B
The null and alternative hypotheses for this two-
tailed test are written as follows.

11
Comparing the Means of Two
Independent Populations (σ1
and σ2 known)
Example 1 :
compute the test statistic :

With α = 0.05 and zα/2 z.025 1.96, the rejection rule


employing the critical value approach would be reject
H0 if z ≤ -1.96 or if
z ≥ 1.96. With z = 1.66, we reach do not reject H0
conclusion. 12
Comparing the Means of Two
Independent Populations (σ1 and
σ2 unknown, σ1=σ2 )

Hypothesis Test Statistic Critical value


The Test Statistic and Critical Values
H0: m1 –m2 ³ 0
H1: m1 –m2 < 0
𝑡<−𝑡𝛼 ; 𝑛1+𝑛2− 2

H0: m1 –m2 ≤ 0 ( 𝑥¯ 1 − 𝑥¯ 2 ) −𝑑𝑜 𝑡>𝑡


H1: m1 –m2 > 0 𝑡= 𝛼 ;𝑛1+𝑛2−2

H0: m1 –m2 = 0
𝑠 𝑝 √ 1/𝑛1 +1/𝑛2t  t  / 2;n1 n 2  2 or
H1: m1 –m2 ¹ 0
t  t / 2;n1 n 22
Comparing the Means of Two
Independent Populations (σ1 and
σ2 unknown, σ1=σ2 )

Confidence Interval Estimation :

1 1 1 1
( x1  x2 )  t / 2 s p   ( 1   2 )  ( x1  x2 )  t / 2 s p 
n1 n2 n1 n2

(n1  1) s12  (n2  1) s22


s 
2
p
n1  n2  2

tα/2 has degrees of freedom


(n1+n2-2)
Comparing the Means of Two
Independent Populations (σ1 and
σ2 unknown, σ1=σ2 )

Example 2 :
The BLK cola want to determine whether the mean
weekly sales are the same when using a normal self
location and when using an end-aisle display. There are
the set of all possible weekly sales in normal sales and
end-aisle display :

Normal End-Aisle
22 34 52 62 30 52 71 76 54 67
40 64 84 56 59 83 66 90 77 84

15
Comparing the Means of Two
Independent Populations (σ1 and
σ2 unknown, σ1=σ2 )

Example 2 :
Step 1 : Hypotheses :

Step 2 : level of significance  = .05 and sample size n = 10


Step 3 : Determine the appropriate technique
σ is unknown so this is a t test
Step 4 : Critical values :
Ho rejected𝑡>𝑡
if 0.025 ;18=2,1009𝑜𝑟𝑡<− 𝑡 0.025 ;18=−2,1009 16
Comparing the Means of Two
Independent Populations (σ1 and
σ2 unknown, σ1=σ2 )
Example 2 :
Step 5 : Statistical Test

( ¯𝑥1 − ¯𝑥 2 ) − 𝑑 𝑜
(50.3 − 72 ) − 0
𝑡= = =−3.0046
𝑠 𝑝 √ 1/𝑛1 +1/𝑛2 254.0056 √ 1/10+1 /10

Step 6 : Because t = -3.0046 < -2.1009, so reject H0 and conclude that


the mean weekly sales when using a normal self location and
when using an end-aisle display is different
Comparing the Means of Two
Independent Populations (σ1 and
σ2 unknown, σ1 ≠ σ2 )

Hypothesis Test Statistic Critical value


The Test Statistic and Critical Values :
H0: m1 –m2 ³ 0
𝑡<−𝑡𝛼 ; 𝑣
H1: m1 –m2 < 0
( 𝑥¯1− 𝑥¯2) −𝑑𝑜
H0: m1 –m2 ≤ 0
𝑡= 𝑡>𝑡𝛼 ;𝑣
√𝑠 /𝑛 +𝑠 /𝑛
2 2
H1: m1 –m2 > 0

H0: m1 –m2 = 0 1 1 2 2
H1: m1 –m2 ¹ 0
𝑡>𝑡𝛼/2;𝑣 𝑜𝑟
Comparing the Means of Two
Independent Populations (σ1 and
σ2 unknown, σ1 ≠ σ2 )

Confidence Interval Estimation :

s12 s22 s12 s22


( x1  x2 )  t / 2   ( 1   2 )  ( x1  x2 )  t / 2 
n1 n2 n1 n2

s12 / n1  s22 / n2
v
s
2
1 / n1

 
2
s / n2 2
2 
2

n1  1 n2  1

where tα/2 has degrees of


freedom v
Comparing the Means of Two
Related Populations

 Paired or matched samples


 Repeated measures (before/after)
 Use difference between paired values:

μD = μ 1 - μ 2
The point estimate for the population mean
paired difference is D :
n Di = X1i - X2i
D i
D i 1
n
Comparing the Means of Two
Related Populations

σD known σD unknown

 Use Z test  Use SD to estimate unknown


 population distributions σD, use a t test statistic
are normal  population distributions are
normal

21
Comparing the Means of Two
Related Populations

Hypothesis Test Statistic Critical value

The Test Statistic and Critical Values : σD


H0known
: μD ≥ 0
𝑧<− 𝑧𝛼
H1: μD < 0 D − μ𝐷
Z=
σD
H0: μD ≤ 0
H1: μD > 0
√n 𝑧>𝑧 𝛼

H0: μD = 0
H1: μD ≠ 0
𝑧>𝑧 𝛼/2 𝑜𝑟
Comparing the Means of Two
Related Populations

The Test Statistic and Critical Values : σD unknown


Hypothesis Test Statistic Critical value

H0: μD ≥ 0
t=
D − μ𝐷 𝑡<−𝑡𝛼 ; 𝑛−1
H1: μD < 0 SD
√n
H0: μD ≤ 0 𝑡>𝑡𝛼 ;𝑛− 1
H1: μD > 0
√∑
n
SD= ¿¿ ¿¿
H0: μD = 0 i=1 t  t / 2,n 1 or
t  t / 2,n 1
H1: μD ≠ 0
Comparing the Means of Two
Related Populations

The Test Statistic and Critical Values : σD unknown

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


H0: μD  0 H0: μD ≤ 0 H0: μD = 0
H1: μD < 0 H1: μD > 0 H1: μD ≠ 0

a a a/2 a/2

-ta ta -ta/2 ta/2

Reject H0 if t < Reject H0 if t > Reject H0 if t < -t


-tα tα α/2
or t > t α/2
Comparing the Means of Two
Related Populations

Confidence Interval Estimation :

sd s
d  t / 2   D  d  t / 2 d
n n

d  x1  x2
 D  1   2

tα/2 has degrees of freedom n-1


COMPARING TWO POPULATION PROPORTIONS

Hypothesis Test Statistic Critical


value

H0: π1-π2 ≥ 0 Z 
 p1  p2    1   2 
z   z
H1: π1-π2 < 0 1 1
p (1  p )   
 n1 n2 
H0: π1-π2 ≤ 0 X  X2 X X
z  z
p 1 , p1  1 , p 2  2
H1: π1-π2 > 0 n1  n 2 n1 n2
z  z / 2 or
H0: π1-π2 = 0 where X1 and X2 are the number of
successes in samples 1 and 2 z   z / 2
H1: π1-π2 ≠ 0
Comparing Two Population
Proportions
Confidence Interval Estimation :

p1q1 p2 q2 pq p q
( p1  p2 )  z / 2    1   2  ( p1  p2 )  z / 2 1 1  2 2
n1 n2 n1 n2

where
qi=1-pi
COMPARING TWO POPULATION PROPORTIONS

Example :
A survey reported that 193 out of 459 men sampled and 250 out of
501 women sampled said that a major reason they use Facebook is
to share with many people at once. Is there any evidence that the
proportion of men who say that a major reason they use Facebook is
to share with many people at once is less than the proportion of
women?
The hypothesis : H0: π1 ≥π2, H1: π1<π2

X1 193 X 2 250
p1    0.4205 , p 2    0.499
n1 459 n 2 501
193  2500
p  0.4615
459  501
COMPARING TWO POPULATION PROPORTIONS

The test statistics :

Z 
 0.4205  0.4990   0  2.4379
 1 1 
0.4615(1  0.4615)   
 459 501 

Reject the null hypothesis because Z < - Z0.05 = -1.645. The


p-value is 0.0074
COMPARING TWO POPULATION PROPORTIONS

0.4205(0.5795) 0.499(0.501)
(0.4205  0.499)  1.96   1   2 
459 501
0.4205(0.5795) 0.499(0.501)
(0.4205  0.499)  1.96 
459 501

 0.1414   1   2  0.0156
HYPOTHESIS TESTING FOR THE RATIO OF TWO VARIANCES

Hypothesis Test Statistic Critical value

H0: σ12  σ22


S12 F < FL
H1: σ12 < σ22 F 2
S2
H0: σ12 ≤ σ22 F > FL
H1: σ12 > σ22 S12 = Variance of Sample 1
n1 - 1 = numerator degrees of freedom
S12
F  2  FU or
H0: σ = σ
1
2
2
2 S 22 = Variance of Sample 2 S2
H1: σ ≠ σ
1
2
2
2 n2 - 1 = denominator degrees of freedom S12
F  2  FL
S2
HYPOTHESIS TESTING FOR THE RATIO OF TWO VARIANCES

Confidence Interval Estimation :


2
s1 1 1
2 2
s1
 2  2 f / 2 ( v 2,v1)
s2 f / 2 ( v1,v 2 )  2
2
s2

fα/2 is from table of distribution F


HYPOTHESIS TESTING FOR THE RATIO OF TWO VARIANCES

Example
One fast-food chain carried out a study to measure the variability
in the waiting time at lunch and breakfast at one of the chain’s
stores. The results were as follows:
Lunch : n1 = 26, S12= 4.4

Breakfast: n2 = 21, S22 = 1.9

At the 0.05 level of significance, is there evidence that there is more


variability in the service time at lunch than at breakfast? Assume
that the population service times are normally distributed.
HYPOTHESIS TESTING FOR THE RATIO OF TWO VARIANCES

Solution :
The hypotheses are H0: σ12 ≤ σ22 H1: σ12 > σ22

The F test statistic is F= S12 /S22=4.4/1.9= 2.3158

F α (db1=(n1-1),db2=(n2-1)) = F 0.05 (25, 20) = 2.07

Because F = 2.3158 > 2.07, then reject H0. Therefore at 0.05


level of significance, we conclude that there is evidence that
there is more variability in the service time at lunch than at
breakfast.
TABLE F

F0.05(24,20)
EXERCISE

1. Consider the following hypothesis test


H0: µ1- µ2 ≤0 and Ha: µ1- µ2 >0
The following results are for two independent samples taken
from the two populations

With α =0.05, what is the hypothesis testing conclusion


EXERCISE

2. Assume that you have a sample of n1 = 8, with the sample


mean x¯1 = 42, and a sample standard deviation S1 = 4, and
you have an independent sample of n2 = 15 from another
population with a sample mean of x¯2 = 34 and a sample
standard deviation S2 = 5.
a. What is the value of the pooled-variance for testing H0: µ1 =
µ2?
b. In finding the critical value, how many degrees of freedom
are there?
c. Using the level of significance α= 0.01, what is the critical
value for a one-tail test of the hypothesis H0: µ1 ≤ µ2
against the alternative, H1: µ1 > µ2
EXERCISE

3. Consider the following data for two independent random


samples taken from two normal populations (assume σ1≠ σ2)

a. Compute the two sample means.


b. Compute the two sample standard deviations.
c. What is the point estimate of the difference between the two
population means?
d. What is the 90% confidence interval estimate of the difference
between the two population means?
EXERCISE

4. Nine experts rated two brands of Colombian coffee in a taste-


testing experiment. A rating on a 7-point scale (1 = extremely
unpleasing, 7 = extremely pleasing) is given for each of four
characteristics: taste, aroma, richness, and acidity. The
following data contain the ratings accumulated over all four
characteristics:

a. At the 0.05 level of significance,


is there that brand B better than
brand A?
b. Construct and interpret a 95%
confidence interval estimate of
the difference in the mean
ratings between the two brands.
40
EXERCISE

5. Let n1 = 40, X¯1 = 30, n2 = 40, and X¯2 = 10.


a. At the 0.05 level of significance, is there
evidence of a significant difference
between the two population proportions?
b. Construct a 90% confidence interval
estimate for the difference between the
two population proportions.
EXERCISE

6. The following information is available for two samples


selected from independent populations:
Population A: n1 = 16, S12 = 47.3
Population B: n2 = 13 S22 = 36.4
Assume that two samples are selected from independent
normally distributed populations. At the 0.05 level of
significance, is there evidence of a difference between σ12
and σ22
EXERCISE

7.The following is the data amount of container demand in 2003


from an international shipping company (ocean going) A and B
Month A B
January 84 40
a) Test a hypothesis that
February 119 34 the proportions of the
March 133 114 container demand
April 112 89
May 133 88 more than 100 is the
June 238 150 same (α=5%)
July 112 35
Augusts 49 44
b) Find confidence
September 217 100 interval estimation for
October 182 111 this different
November 259 79
December 91 75 proportion (α=5%)
SUBJECT MATTER EXPERT

You might also like