chapter 9 tests of hypothesis single sample tests the middle game – applications to the real world...
TRANSCRIPT
Chapter 9 Tests of Hypothesis
Single Sample TestsThe Middle Game –
applications to the real world
Chapter 9B
Recall?
If Z1, Z2, ..., Zn are independent standard normal random variables, then
2 2 2 2 21 2 ... ( )nZ Z Z n chi-square distribution
with n degrees freedom
2( )
/
ZT t n
n
t-distribution with n degrees freedom
2
2
( ) /( , )
( ) /
n nF F n m
m m
F-distribution with n degrees freedom inthe numerator and m degreesof freedom in the denominator
9-3.1 Hypothesis Tests on the Mean
Figure 9-9 The reference distribution for H0: = 0 with critical region for (a) H1: 0 , (b) H1: > 0, and (c) H1: < 0.
Tests on the mean - variance unknown
Peter Perk is concerned about the amount of caffeine in his pop (soft drink). It appears that his midday soda is keeping him awake during the boring statistics lectures. The label on the can states that it contains only 20 mg of caffeine. Peter Perk doesn’t believe this.
A random sample and testing of 25 cans of soda resulted in the following caffeine levels:
Test at a 2 percent level of significance.
H0: = 20
H1: > 20
22mg, 5mgX s
The t-test
One can of soda contains:• About 10 teaspoons of sugar • 150 calories • 30-55 mg of caffeine • Artificial food colors and sulphites
00
, 1 .02,24
0
22 202
/ 5 / 252.1715
2 2.1715; cannot rejectn
XT
s nt t
T
0 .02,24 /
520 2.1715 22.1715
25
critX t s n
.05,24at 5% : 1.711;
520 1.711
25
21.711; reject
crit
t
X
The Prob-Value
22mg, 5mg; n=25X s H0: = 20
H1: > 20
conclusion: Peter should be able to sleep during the boring lectures.
24 24
22 2022 | 20 2 .0285
5 / 25P X P t P t
Non-Central t Distribution – a Small Complication
•If the alternative hypothesis is true, the statistic T0 does not have a mean of zero.
•It has what is called the non-central t distribution.
•Many of the operations performed for the central t must now be done using numerical techniques, e.g. integrating the non-central t distribution.
•No sweat for us. The results we need are tabulated – we need the O.C. curves!
0
000
if
/ /
XX nT
ss n s n
estimatednoncentralityparameter
Non-Central t Distribution – a Small Complication
•O.C. curves relate , n, and d, where d=|0|/. and is the Type II error probability.
•Since variance is unknown, estimate – either from previous experiments where we measured s, or after the current measurement set is collected.
•Alternatively we can think of d as a certain number of standard deviations (if a relative measure is satisfactory).
More on Peter Perk’s Pop
If the actual caffeine level is 22 mg per can, what is the probability of not rejecting at the 5 percent level (i.e. the probability of a Type II error)?
d = |22-20|/5 = .4n = 25
Pr{do not reject| = 22} .5
A Variance Test Example Professor Vera Vance asserts that the variability of the
IQ’s among the Engineering Management (ENM) students is significantly less than for the population at large.
It is well know that the distribution of IQ’s is normal with a mean of 100 and a standard deviation of 15.
Thirty ENM students were forced to take an exhaustive IQ test in which the sample standard deviation was computed to be 12.78.
Professor Vance is willing to test her assertion at the 10 percent level.
Add a little variance to your lifeH0: 2 = 152
H1: 2 < 152
2220 2 2
0
2 21 , 1 .90,29
1 29 12.7821.05
15
19.7677; cannot rejectn
n s
Professor Vera Vance lecturingthe students on their excessive variability.
Prob-value and so much more…
Prob-Value 229 21.05 .1427P
9-4.2 Type II Error and Choice of Sample Size:
Operating characteristic curves are provided in Charts VIIi through VIIn
0
Problem 9-75
1) The parameter of interest is the true variance of sugar content, 2.
2) H0 : 2 = 18 3) H1 : 2 18 4) = 0.05
5) 02 = ( )n s 1 2
2
6) Reject H0 if 02
1 2 12 / ,n where 70.22
9,975.0 or 02
2 12 , ,n where
02.1929,025.0
7) n = 10, s = 4.8
02 = 52.11
18
)8.4(9)1( 2
2
2
sn
8) Since 2.70 < 11.52 < 19.02 do not reject H0 and conclude there is insuffi cient evidence to indicate the true variance of sugar content is significantly diff erent f rom 18 at = 0.05.
More sugar?
milligrams2
Problem 9-75 Assume 2 = 40what sample size to detect difference with prob = .9?
Using the chart in the Appendix, with 49.118
40 and = 0.10, we fi nd
n = 50 at .01 alpha level
This is the O.C. graphic for alpha = .01
9-5.1 Large-Sample Tests on a Proportion
Many engineering decision problems include hypothesis testing about p.
An appropriate test statistic is
9-5 Tests on a Population Proportion
Another form of the test statistic Z0 is
or
ˆ XP
n the sample proportion
Test on a Proportion - Example
A cable news commentator has asserted that more than half the population believe that the United States should not have taken military action against Iraq. Test this assertion at the 5 percent level.
"Looking back, do you think the United States did the right thing in taking military action against Iraq, or should the U.S. have stayed out?"
Right Thing
Stayed Out Unsure
% % %
9/14-16/07 39 53 8
CBS News Poll. Sept. 14-16, 2007. N=706 adults nationwide. MoE ± 4 (for all adults).
An Example Continued
0
0 .05 0
.53 .501.594
.50 1 .50 / 706
1.594 1.6449; cannot reject
z
z z H
H0: p .5H1: p > .5 = .05
p-Value Pr 1.594 .0555z
ˆ .53, 706p n
9-5.2 Type II Error and Choice of Sample Size
For a two-sided alternative where p is the true value
If the alternative is p < p0
If the alternative is p > p0
Type II Error
H0: p .5H1: p > .5 = .05
assume .55, 706p n
.5 .55 1.645 .5 1 .5 / 706
1.017 .1546.55 1 .55 / 706
9-5.3 Type II Error and Choice of Sample SizeFor a two-sided alternative
For a one-sided alternative
Sample Size Calculations
H0: p .5H1: p > .5 = .01, =.05 when p = .55
2
2.33 .5 1 .5 1.645 .55 1 .551573.5 1574
.55 .50n
9-7 The Chi-Square GOF Test
• Assume there is a sample of size n from a population whose probability distribution is unknown.
• Let Oi be the observed frequency in the ith class interval.
• Let Ei be the expected frequency in the ith class interval.
The test statistic is chi-square with
df = k – p – 1 where p = number of estimated parameters