0% found this document useful (0 votes)
3 views

Lecture_04

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Lecture_04

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 104

LECTURE 4 – part 1

One-sample Hypothesis Tests

Lecturer: Nguyen Thi Thu Van


Email: van.nguyen@ueh.edu.vn
Data and many of the statistical tools are used to
find the best answer to questions like
• Has the average service time at a Noodles &
Company restaurant decreased since last year?
• Did the proportion of defective products decrease
after a new manufacturing process was
introduced?

In this lecture, we will learn one of the most


widely used statistical tools: Hypothesis Testing.
Content
 Basic principles of hypothesis testing

 Testing a Mean:

 with Known Population Variance

 with Unknown Population Variance

 Testing a Proportion

 Testing a Variance
Principles of Hypothesis Testing
What is a Hypothesis?
A hypothesis is a claim

(assertion) about a population parameter:


 population mean

Example: The mean monthly cell phone bill in


this city is μ = $42
 population proportion

Example: The proportion of adults in this city


with cell phones is π = 0.68
Null Hypothesis, H0 vs. Alternative Hypothesis, H1
Types of Hypothesis Tests
Test for a Population Left-tailed Test Two-tailed Test Right-tailed Test
Mean

Test for a Population


Proportion

Test for a Population


Variance
Hypothesis Testing Process
Claim: the population mean
age is 50 ( Null Hypothesis:
H0: μ = 50 )
Population
Now select a
random sample
Is X= 20 likely if μ = 50?
If not likely,
REJECT
Null Hypothesis Sample
When Rejecting H0
Sampling Distribution of X

X
20 μ = 50

If it is unlikely that
If H0 is true ... then we
reject the null
we would get a
... if in fact this were hypothesis that
sample mean of
the population mean… μ = 50.
this value ...
As a result, if the sample mean is

 close to the stated population mean, H0 is


not rejected.

 far from the stated population mean, H0 is


rejected.

But how far is “far enough” to reject H0?

 critical values creates a “line in the sand”


for decision making. What are these like?
Sampling Distribution of the test statistic

Region of Region of
Rejection Rejection
Region of
Non-Rejection

Critical Values

“Too Far Away” From Mean of Sampling Distribution


It is worth to mention right away that since our
ability to collect evidence can be limited by our
tools and by time and financial resources, it is
possible to make an incorrect decision regarding
the null hypothesis.

Much of statistical theory revolves around the


minimization of errors. So what kinds of errors are
there in hypothesis testing?
Errors in Hypothesis Test Decision Making

Type I Error
Reject a true null hypothesis

a serious type of error

Probability of Type I Error is 

  = level of significance of the


test Type II Error
  = set by the researcher in Fail to reject a false null
advance hypothesis

Probability of Type II Error is β


How to Increase Quality of Hypothesis Testing?
Level of Significance and Rejection Region
Level of significance =  Represents
critical value
H0: μ = 3  /2  /2
H1: μ ≠ 3 Rejection
Two-tailed test 0 region is
shaded
H0: μ ≤ 3 
H1: μ > 3
Right-tailed test 0

H0: μ ≥ 3
H1: μ < 3 

Left-tailed test 0
Procedure for Testing a Hypothesis

Step 3. Find
State the null Calculate a the test
hypothesis Collect data
test statistic statistic

State the Construct


Select a level
alternative acceptance/rejec
of significance tion regions
hypothesis

Step 1. State the Step 2. Specify the Step 4. Make conclusion


Hypotheses level of inconsistency
Test for a Mean
Hypothesis Tests for the Mean

Hypothesis
Tests for 

 Known  Unknown
(Z test) (t test)

Standard normal distribution Student’s t-distribution


Z - Test of Hypothesis for the Mean (σ Known)
Hypothesis
Tests for 

σKnown
Known σUnknown
Unknown
(Z test) (t test)
The test statistic is:

X μ
Z =
σ
n
X  μ 2.84  3  .16
Z = = = =  2.0
σ 0.8 .08
n 100
Is the test statistic in the rejection region?

/2 = 0.05/2 /2 = 0.05/2

Reject H0 Do not reject H0 Reject H0

-Z= -1.96 0 +Z= +1.96

Z = -2.0 < -1.96, so the test statistic


is in the rejection region
Exercise. A 10 year old survey found that the
average net income for sole proprietor CPA was $7
4914. A researcher wants to determine whether this
figure has changed. He surveys a random sample of
112 sole proprietor accountants and determines that
their average net income is $78 695. Assume the
population standard deviation of net incomes for sole
proprietor CPAs is $14 530.

Conduct a hypothesis test at 5% level of significance.


An other Approach to Testing : p-Value
 p-value: Probability of obtaining a test statistic more
extreme ( ≤ or  ) than the observed sample value
given H0 is true.

 Also called observed level of significance.

 Smallest value of  for which H0 can be rejected.

 Compare the p-value with 


 If p-value <  , reject H0
 If p-value   , do not reject H0
p-Value Example
How likely is it to see a sample mean of 2.84 (or something
further from the mean, in either direction) if the true mean is
 = 3.0 (with σ = 0.8)?

P(Z  2.0) = 0.0228


P(Z  2.0) = 0.0228
/2 = 0.025 /2 = 0.025

0.0228 0.0228

p-value
= 0.0228 + 0.0228 = 0.0456
-1.96 0 1.96 Z
-2.0
Conclusion: Reject the null hypothesis. 2.0
Strength of p -Values

No evidence against the null hypothesis

Weak evidence against the null hypothesis

Moderate evidence against the null hypothesis

Strong evidence against the null hypothesis

p-value is not the probability of the null hypothesis being


true! If we get wrong on it, p-value approach by
themselves can cause misleading results.
One-Tail Tests
In many cases, the alternative hypothesis
focuses on a particular direction.
This is a lower-tail test since the
H0: μ ≥ 3
alternative hypothesis is focused on
H1: μ < 3
the lower tail below the mean of 3

H0: μ ≤ 3 This is an upper-tail test since the


H1: μ > 3 alternative hypothesis is focused on
the upper tail above the mean of 3
Left-Tailed Tests
H0: μ ≥ 3
 There is only one H1: μ < 3
critical value, since
the rejection area is

in only one tail

Reject H0 Do not reject H0


-Z Z
0

μ X

Critical value
Right-Tailed Tests

H0: μ ≤ 3
 There is only one
critical value, since H1: μ > 3
the rejection area is
in only one tail 

Do not reject H0 Reject H0


Z Zα
0
_
X μ

Critical value
Example: Upper-Tail Z Test for Mean ( Known)

A phone industry manager thinks that customer


monthly cell phone bills have increased, and
now average over $52 per month.

The company wishes to test this claim.


Assume  = 10 is known.
A phone industry manager thinks that customer
monthly cell phone bills have increased, and now
average over $52 per month. The company wishes
to test this claim. Assume  = 10.

Testing Hypotheses

H0: μ ≤ 52 = the average is not over $52 per month

H1: μ > 52 = the average is greater than $52 a month


First, suppose that  = 0.10 is chosen for this test and find the
rejection region.
Reject H0

 = 0.10

Do not reject H0 Reject H0


0 1.28

Reject H0 if Z > 1.28

Xμ 53.1  52
Z = = = 0.88
σ 10
n 64
Example: Decision Making using Decision Rule

Reject H0

 = 0.10

Do not reject H0 Reject H0


1.28
0
Z = 0.88

Conclusion: Do not reject H0 since Z = 0.88 ≤ 1.28. This means there


is not sufficient evidence that the mean bill is over $52
Example: Decision Making using p -Value
p-value = 0.1894

Reject H0 P( X  53.1)
 = 0.10
 53.1 52.0 
= P Z  
0  10/ 64 
= P(Z  0.88) = 1 0.8106
Do not reject H0 Reject H0
1.28
Z = 0.88
= 0.1894
Exercise. In an attempt to determine why customer
service is important to managers in the UK,
researchers surveyed managing directors of
manufacturing plants in Scotland. One of the
reasons proposed was that customer service is a
means of retaining customers. On a scale from 1 to
5, with 1 being low and 5 being high, the survey
respondents rated this reason more highly than any
of the others, with a mean of 4.30.
Exercise. [cont’d] Suppose researchers believe
New Zealand manufacturers would not rate this
reason as highly. Use the following data from NZ
and conduct a hypothesis test at 5% level of
significance to prove their theory. Assume from
previous studies that the population standard
deviation is 0.574.
3 4 5 5 4 5 5 4
4 4 4 4 4 4 4 5
4 4 4 5 4 4 4 3
5 4 4 5 4 4 4 5
t-Test of Hypothesis for the Mean (σ Unknown)

Hypothesis
Tests for 

σKnown
Known σUnknown
Unknown
(Z test) (t test)
The test statistic is:

X μ
t n-1 =
S
n
Example: Two-Tail Test ( Unknown)

H0: μ = 168
H1: μ  168
Example Solution: Two-Tail Test

H0: μ = 168
/2=.025 /2=.025
H1: μ  168

  = 0.05 Reject H0 Do not reject H0 Reject H0


t n-1,α/2
-t n-1,α/2 0
 n = 25 -2.0639 1.46
2.0639
  is unknown, so X μ 172.50  168
t n 1 = = = 1.46
use a t statistic S 15.40
 Critical Value: n 25

t24 = ± 2.0639 Do not reject H0: not sufficient evidence that


true mean cost is different than $168
Connection to Confidence Intervals
Exercise. Suppose an agribusiness researcher
believes the average size of farms increased from
the 2007 mean figure of 471 hectares. To test this
notion, she randomly sampled 23 farms and
recorded their size in the following table:

445 489 474 505 553 557 502 449


438 500 477 454 463 466 466 477
557 433 545 511 590 561 560
Assume that the data are normally distributed, use
a 5% level of significance to test her hypothesis.
Exercise. A machine that produces plates is set to yield plates
that average 25kg. However the supervisor is worried that the
machine is out of adjustment and is producing plates that do not
average 25kg. To test this concern, he randomly selects 20 of
the plates produced the day before and weighs them. The table
below shows the weights obtained, along with the computed
sample mean and the sample standard deviation.

22.6 22.2 23.2 24.7 24.5 27.0 26.6 28.1 26.9 24.9

26.2 25.3 23.1 24.2 26.1 25.8 30.4 28.6 23.5 23.6

Assuming that the weights are normally distributed, conduct a


hypothesis test at 5% level of significance to determine whether
the machine is out of adjustment.
Test for a Proportion
Hypothesis Tests for Proportions

 Involves categorical variables

 Two possible outcomes

 Possesses characteristic of interest

 Does not possess characteristic of interest

 Fraction or proportion of the population in the


category of interest is denoted by π
Hypothesis Tests for Proportions

 Sample proportion in the category of interest is


denoted by p
X number in category of interest in sample
p= =
n sample size
 When both X and n – X are at least 10, p can
be approximated by a normal distribution with
mean and standard deviation
 (1  )
μp =  σp =
n
Hypothesis Tests for Proportions
 The sampling  An equivalent form,
distribution of p is but in terms of the
approximately number in the
normal, so the test category of interest, X:
statistic is a ZSTAT:
pπ X  n
ZSTAT = ZSTAT =
π (1  π ) n (1   )
n
Example: Z Test for Proportion
A marketing company claims Check: 
X = 25
that it receives responses
n-X = 475
from 8% of those surveyed.
To test this claim, a random
sample of 500 were
surveyed with 25
responses. Test at the

 = 0.05 significance level.


Z Test for Proportion: Solution
Test Statistic:
H0: π = 0.08
H1: π  0.08 p π .05  .08
ZSTAT = = = 2.47
π (1  π ) .08(1  .08)
 = 0.05
n 500
n = 500, p = 0.05
Critical Values: ± 1.96 Decision:
Reject Reject Reject H0 at  = 0.05
Conclusion:
.025 .025
There is sufficient
-1.96 0 1.96 z evidence to reject the
-2.47 company’s claim of 8%
response rate.
p-Value Solution
Calculate the p-value and compare to 
(For a two-tail test the p-value is always two-tail)

Do not reject H0
Reject H0 Reject H0 p-value = 0.0136:
/2 = .025 /2 = .025
P(Z  2.47)  P(Z  2.47)
0.0068 0.0068
= 2(0.0068) = 0.0136

-1.96 0 1.96

Z = -2.47 Z = 2.47

Reject H0 since p-value = 0.0136 <  = 0.05


Exercise. A survey of the morning beverage market
shows that the primary breakfast beverage for 17%
of people is milk. A milk producer believes the figure
is higher for Victorians. To test this idea, she
contacts a random sample of 550 Victorians and
asks which primary beverage they consumed for
breakfast that day. Suppose 115 replied that milk
was the primary beverage.

Using a level of significance of .05, test the idea that


the milk figure is higher for Victoria.
Test for a Variance
Tests for Variance
 Not all business hypothesis tests involve proportions
or means.

 In quality control, for example, it is important to


compare the variance of a process with a historical
benchmark to see

• whether variance reduction has been achieved,

• or to compare a process standard deviation

with an engineering specification.


Hypothesis Tests for Proportions
3.49 3.54 3.58 3.57 3.54 3.34 3.48 3.60

3.48 3.27 3.46 3.32 3.51 3.43 3.56 3.39


-- The End of Topic --
Thank You!
LECTURE 4 – part 2

Two-sample Hypothesis Tests

Lecturer: Nguyen Thi Thu Van


Email: van.nguyen@ueh.edu.vn
As we have studied, one-sample tests are used to
compare a sample estimate with a non sample
benchmark or target (a claim or prior belief about a
population parameter).

To compare two samples estimates with each


other, in this lecture we will learn to use two-sample
tests.
Example: a new bumper is installed on selected
vehicles in a corporate fleet.
• During a 1-year test period, 12 vehicles with the new
bumper were involved in accidents, incurring mean
damage of $1,101 with a standard deviation of $696.
• During the same year, 9 vehicles with the old
bumpers were involved in accidents, incurring mean
damage of $1,766 with a standard deviation of $838.

Did the new bumper significantly reduce damage?


Example: In a certain college class, 20 randomly chosen
students were given a tutorial, while 20 others used a
self-study computer simulation.
On the same 20-point quiz, the tutorial students’
mean score was 16.7 with a standard deviation of
2.5, compared with a mean of 14.5 and a standard
deviation of 3.2 for the simulation students.
Did the tutorial students do better, or is it just due to
chance? Is there any significant difference in the degree
of variation in the two groups?
Content
 Comparing Two Means

 Confidence Interval for the Difference of Two Means

 Comparing Two Means: Independent Samples

 Comparing Two Means: Paired Samples

 Comparing Two Proportions

 Confidence Interval for the Difference of Two


Proportions

 Comparing Two Variances


Two-sample Tests
 A test performed on the data of two random samples,
each independently obtained from a different given
population.
 Aim to determine whether the difference between these
two populations is statistically significant. 𝜇1 ≠ 𝜇2

𝑋ത1
𝜇1 𝑋ത2

𝜇2
Two-Sample Tests

Two-Sample Tests

Population Population
Means, Means, Population Population
Independent Related Proportions Variances
Samples Samples
Comparing Two Means
Comparing Two Means
Independent samples
Difference Between Two Means & Independent Samples
Test hypothesis or form a confidence interval for the
difference between two population means, μ1 – μ2
where the point estimate for the difference is 𝑋1 − 𝑋2

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

H0: μ1 – μ2  D H0: μ1 – μ2 ≤ D H0: μ1 – μ2 = D


H1: μ1 – μ2 < D H1: μ1 – μ2 > D H1: μ1 – μ2 ≠ D

a a a/2
Hypothesis Tests for µ1 - µ2 with σ1 and σ2 known

Population means, Assumptions


independent
samples  Samples are randomly and
independently drawn.
σ1 and σ2 known  Populations are normally
distributed or both sample
σ1 and σ2 unknown,
assumed equal sizes are at least 30.

σ1 and σ2 unknown,
not assumed equal
Hypothesis tests for µ1 - µ2 with σ1 and σ2 known
 The test statistic:

ZSTAT 
 X  X   μ  μ 
1 2 1 2

  12  22 
  
 n1 n2 

 The confidence interval for μ1 – μ2:

X  X   Z
1 2 a/2
  12  22 
  
 n1 n2 
Hypothesis tests for µ1 - µ2 with σ1 and σ2 unknown assumed equal

Population means, Assumptions


independent
samples  Samples are randomly and
independently drawn
σ1 and σ2 known  Populations are normally
distributed or both sample
σ1 and σ2 unknown,
assumed equal sizes are at least 30

σ1 and σ2 unknown,
not assumed equal
Hypothesis tests for µ1 - µ2 with σ1 and σ2 unknown and assumed equal
 The pooled variance
S 2

n1  1 S1  n 2  1 S2
2 2

(n1  1)  (n 2  1)
p

 The test statistic:


where tSTAT has t STAT 
 X  X   μ  μ 
1 2 1 2

1 1 
d.f. = (n1 + n2 – 2) S   
2
p
 n1 n 2 
 The confidence interval

where tα/2 has X  X   t


1 2 a/2
1 1 
S   
2
p
 n1 n 2 
d.f. = n1 + n2 – 2
Pooled-Variance t Test Example NYSE NASDAQ

Number 21 25

Sample 3.27 2.53


mean

Sample 1.3 1.16


SD

 You are a financial analyst for a brokerage firm. Is


there a difference in dividend yield between stocks
listed on the NYSE & NASDAQ?

 Assuming both populations are approximately normal


with equal variances, is there a difference in mean
yield (a = 0.05)? You collect the above data.
Pooled-Variance t Test Example: Calculating the Test Statistic
H0: μ1 - μ2 = 0
H1: μ1 - μ2 ≠ 0

The test statistic is:

t STAT 
X  X   μ
1 2 1  μ2 

3.27  2.53  0  2.040
1 1  1 1 
S   
2
1.5021  
p
 n1 n 2   21 25 

n
S2  1
 1S1
2
 n 2  1S 2
2

21  1 1.30 2
 25  1 1.16 2
 1.5021
(n1  1)  (n 2  1) (21 - 1)  (25  1)
P
Pooled-Variance t Test Example: Hypothesis Test Solution

Reject H0 Reject H0

a = 0.05
df = 21 + 25 - 2 = 44 .025 .025

Critical Values: t = ± 2.0154 -2.0154 0 2.0154 t


2.040
Test Statistic:

3.27  2.53
t STAT   2.040
 1 1 
1.5021   
 21 25 
Conclusion: Reject H0 at a = 0.05. There is evidence of a difference in means.
Pooled-Variance t Test Example: Confidence Interval for µ1 - µ2
Since we rejected H0 can we be 95% confident that
µNYSE > µNASDAQ?

95% Confidence Interval for µNYSE - µNASDAQ

X  X   t
1 2 a/2 p
1 1 
S     0.74  2.0154  0.3628  (0.009, 1.471)
2

 n1 n 2 

Since 0 is less than the entire interval, we can be 95%


confident that µNYSE > µNASDAQ
Hypothesis tests for µ1 - µ2 with σ1 and σ2 unknown, not assumed equal

Population means,
Assumptions
independent  Samples are randomly and
samples independently drawn.
 Populations are normally
σ1 and σ2 known
distributed or both sample

σ1 and σ2 unknown, sizes are at least 30.


assumed equal  Population variances are
σ1 and σ2 unknown, unknown and cannot be
not assumed equal assumed to be equal.
Hypothesis tests for µ1 - µ2 with σ1 and σ2 unknown and not assumed equal
 The test statistic:

 
2
 S1 2 S 2 2 
X  X 2   μ1  μ 2  
n  n 


1
  2
2 
t STAT
2 2
tSTAT has 1
2
S S  S1 2   S22 
1
 2
d.f. ν: 
n 
 
n 

n1 n 2  1   2 
n1  1 n2  1

Welch’s rule:
df = min(n1 – 1, n2 – 1)

 The confidence interval:

X 1 
 X 2  ta
2
S12 S22

n1 n 2
Example 1. In trials of an experimental Internet-based
method of learning statistics, pre-tests and post-tests were
given to two groups: traditional instruction (22 students)
and Internet-based (17 students). Pre-test scores were not
significantly different. On the post-test, the first group
(traditional instruction) had a mean score of 8.64 with a
standard deviation of 1.88, while the second group
(experimental instruction) had a mean score of 8.82 with a
standard deviation of 1.70.
Construct a 90 percent confidence interval for the true
difference of the means assuming equal variances.
Example 2. In trials of an experimental Internet-based method
of learning statistics, pre-tests and post-tests were given to two
groups: traditional instruction (22 students) and Internet-based
(17 students). Pre-test scores were not significantly different.
On the post-test, the first group (traditional instruction) had a
mean score of 8.64 with a standard deviation of 1.88, while the
second group (experimental instruction) had a mean score of
8.82 with a standard deviation of 1.70. Construct a 90 percent
confidence interval for the true difference of the means
assuming unequal variances with either Welch’s formula for d.f.
or the quick rule for degrees of freedom.
Comparing Two Means
Paired samples
Difference Between Two Means & Paired Samples
 The average score of subjects on the posttest is different
than the average of those same subjects on the pretest.

 People will listen longer to a female telephone marketer


than the very same people will listen to a male telephone
marketer.
 On average, soldiers weighed less
after they completed basic training
than they weighed before they
started.
 and so forth.
Difference Between Two Means & Paired Samples
 Tests means of 2 related populations
 Paired samples

 Repeated measures (before/after)

 Use difference between paired values:

Di = X1i - X2i
 Assumptions:
 Both Populations Are Normally Distributed

 Or, if not Normal, use large samples


Related Populations - Paired Difference Test
 The ith paired difference: Di = X1i - X2i
 The point estimate for the paired n

difference population mean μD:


D i
D i 1
n
 The sample standard deviation:
n
 n is the number of pairs in the  i
(D  D ) 2

SD  i 1

paired sample n 1

D  μD
 The test statistic for μD where t STAT 
SD
tSTAT has n - 1 d.f. n
Paired Difference Test: Possible Hypotheses & CI
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 tSTAT < -ta Reject H0 if tSTAT > ta Reject H0 if tSTAT < -ta/2
or tSTAT > ta/2
Where tSTAT has n - 1 d.f.

SD
The confidence interval for μD is D  ta / 2
n
Paired Difference Test: 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:

 Di
Salesperson Number of complaints Difference
Before After D = n
A 6 4 -2
B 20 6 -14 = -4.2
 (D  D)
C 3 2 -1 2
D 0 0 0 SD  i

F 4 0 -4
n 1
-21  5.67
Has the training made a difference in the
number of complaints (at the 0.01 level)?

H0: μD = 0
H1: μD  0 Reject Reject

a/2 a/2
a = .01 D = - 4.2 - 4.604 4.604
- 1.66
t0.005 = ± 4.604
d.f. = n - 1 = 4
Conclusion: Do not reject 𝐻0 . There
is insufficient evidence there is
D  μ D  4.2  0
t STAT    1.66 significant change in the number of
SD / n 5.67/ 5
complaints.
Example. At 𝛼 = 0.05, does the following sample show
that daughters are taller than their mothers? Is the
decision close? Why might daughters tend to be taller
than their mothers? Why might they not?

Family Daughter’s height (cm) Mother’s height (cm)


1 167 172
2 166 162
3 176 157
4 171 159
5 165 157
6 181 177
7 173 174
Comparing Two Proportions
Two Population Proportions
 Time magazine reported the result of a telephone poll of 800
adult Americans. The question posed of the Americans who
were surveyed was: "Should the federal tax on cigarettes be
raised to pay for health care reform?” Is there sufficient
evidence at the 𝛼 = 0.05, say, to conclude that the true
populations – smokers and non-smokers – differ significantly?
Assumptions about Normality

 We have assumed a normal distribution for the


statistic p1  p2
 For a test of two proportions, the criterion for
normality is np ≥ 10 and n(1 − p) ≥ 10 for each
sample.

 If either sample proportion is not normal, their


difference cannot safely be assumed normal.
Two Population Proportions Test for Difference
Lower-tail test Upper-tail test Two-tail test
H0: π1 – π2  D H0: π1 – π2 ≤ D H0: π1 – π2 = D
H1: π1 – π2 < D H1: π1 – π2 > D H1: π1 – π2 ≠ D

a a a/2 a/2

-za za -za/2 za/2


Reject H0 if ZSTAT < -Za Reject H0 if ZSTAT > Za Reject H0 if ZSTAT < -Za/2
or ZSTAT > Za/2

The point estimate for the difference is p1  p2


Two Population Proportions Test for Difference
 The pooled estimate for the overall X1  X 2
p
n1  n 2
proportion, where X1 and X2 are the number of
items of interest in samples 1 and 2

Z STAT 
 p1  p2    π1  π2 
 The test statistic
 1 1 
p (1  p )   
 n1 n2 

X1  X 2 X1 X2
p , p1  , p2 
n1  n2 n1 n2
Hypothesis Test Example: Two population Proportions
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.


Hypothesis Test Example: Two population Proportions
 Hypotheses
H0: π1 – π2 = 0
H1: π1 – π2 ≠ 0
 The sample proportions
 Men: p1 = 36/72 = 0.50
 Women: p2 = 35/50 = 0.70

 The pooled estimate for the overall proportion

X 1  X 2 36  35 71
p    0 .582
n1  n2 72  50 122
Reject H0
z STAT 
 p1  p2    π1  π2 
Reject H0
 1 1 .025

p ( 1  p)   
 n1 n2  .025


 .50  .70   0   2 .20
 1 1 
.582 ( 1  .582 )    -1.96 1.96
 72 50  -2.20

Critical Values = ±1.96


For a = .05

Conclusion: Reject 𝐻0 . There is evidence of a difference in


proportions who will vote yes between men and women.
Two Population Proportions Test for Difference
Lower-tail test Upper-tail test Two-tail test

H0: π1 – π2  D0 H0: π1 – π2 ≤ D0 H0: π1 – π2 = D0


H1: π1 – π2 < D0 H1: π1 – π2 > D0 H1: π1 – π2 ≠ D0

(p1  p 2 )  ( 1   2 )
Z STAT 
p1 (1  p1 ) p 2 (1  p 2 )

n1 n2
p1 (1  p1 ) p 2 (1  p 2 )
 p1  p 2   Za/2 
n1 n2
Example. The American Bankers Association
reported that, in a sample of 120 consumer
purchases in France, 60 were made with cash,
compared with 26 in a sample of 50 consumer
purchases in the United States.
Construct a 90 percent confidence interval for
the difference in proportions.
Comparing Two Variances
Comparing Two Variances

Hypothesis Test for


Variances

Test for a Single Test for Two


Population Population
Variance Variances

Chi – square F - Test


Test Statistic Statistic
F - Statistic
 For variance tests, we'll use the F-test to determine

𝜎12
whether two variances are different by considering 𝐹 =
𝜎22

 Test statistic is the ratio between two sample variances

𝑠12
𝐹𝑆𝑇𝐴𝑇 = with degrees of freedom for the top:𝑑𝑓1 = 𝑛1 − 1
𝑠22

and degrees of freedom for the bottom: 𝑑𝑓2 = 𝑛2 − 1


Example of Comparing Two Variances

 You are a financial NYSE NASDAQ

Number 21 25
analyst for a brokerage
Sample mean 3.27 2.53
firm. Is there a Sample SD 1.3 1.16

difference in the
variances between the
NYSE & NASDAQ at
the a = 0.05 level?
Solution.
 Form the hypothesis test:

H 0: σ 12  σ 22 = no difference between variances


H 1: σ 12  σ 22 = a difference between variances

 Significance level a = 0.05

 Numerator d.f. = n1 – 1 = 21 –1 = 20

 Denominator d.f. = n2 – 1 = 25 –1 = 24

 FR = F.025, 20, 24 = 2.33 (FINV(0.025, 20, 24)

 FL = 1/ F.025, 24, 20 = 0.41 (or FINV(0.975, 20, 24)


 The test statistic H0: σ12 = σ22
H1: σ12 ≠ σ22
S12 1.302
FSTAT  2  2
 1.256
S 2 1.16
a/2 = .025
F
Reject H0 Do not Reject H0
reject H0
FL = 0.41 1 FR = 2.33
 FSTAT = 1.256 is not in the rejection region, so we do not reject
H0

Conclusion: There is insufficient evidence of a difference in


variances at a = .05
Example. Researchers at the Mayo Clinic have studied the
effect of sound levels on patient healing and have found a
significant association (louder hospital ambient sound level is
associated with slower postsurgical healing). Based on the
Mayo Clinic’s experience, Ardmore Hospital installed a new
vinyl flooring that is supposed to reduce the mean sound
level (decibels) in the hospital corridors.

The sound level is measured at New flooring Old flooring


42 48
five randomly selected times in 41 51

the main corridor. At 𝛼 = 0.05, 40 44


37 48
has the variance changed? 44 52
-- The End of Topic --
Thank You!

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy