Elementary Statistics and Inference Elementary Statistics and

Elementary Statistics and
Inference
22S:025 or 7P:025
Lecture 35
1
Elementary Statistics and
Inference
22S:025 or 7P:025
Chapter 26 (cont.)
2
Chapter 26 – Tests of Significance (cont.)
A)
Zero-One Boxes (Populations)
„
Recall we can use the Normal Curve table to study
questions associated with a Zero-One (dichotomus)
box.
„
Charles Tart – University of California, Davis – ran an
experiment to demonstrate ESP. He used 15 subjects
who each made 500 guesses to pick a proper target –
2006 correct guesses.
3
1
Chapter 26 – Tests of Significance (cont.)
n = 7,500
p (correct) =
1
0
0
0
1
4
SD(correct) =
⎛1⎞
E (correct)) = n ⋅ avg
g = 7500⎜ ⎟ = 1875
⎝ 4⎠
SE (correct) = n ⋅ SD = 7500 ⋅
H 0 : μ = 1875,
H 1 : μ > 1875
1 3
3
× =
4 4
4
3
= 37.5
4
observed correct guesses = 2006
4
Chapter 26 – Tests of Significance (cont.)
„
To what extent is the observed number of correct
guesses unusual if H0 is correct?
SE = 37.5
Correct guesses
1875
2006
Z=
2006 − 1875 131
Z=
=
= 3.50
37.5
37.5
correct - expected correct
SE (correct)
5
Chapter 26 – Tests of Significance (cont.)
„
The p-value is the percent of time that you would obtain
Z ≥ 3.50 if the true number correct were 1875.
99.953
-3.50
p − value = .0235
0235 or 2.35%
2 35%
3.50
Z
6
2
Chapter 26 – Tests of Significance (cont.)
„
Since the p-value is less than 5%, the observed correct
(2006) would be unusual (significant) if H0 were true –
the evidence suggests the machine is such that the
expected number of correct guesses should be greater
than 1875.
Note: When the SD of the box (σ) is known, use it to
compute the standard error. If the SD of the box is
unknown, you need to use sample SD (S) to
estimate the SE.
7
Chapter 26 – Tests of Significance (cont.)
Data
Quantitative
Sum
Average
Z=
SD of the box (σ)
Qualitative
(classifying & counting)
Number
sum - E (sum)
SE (sum)
Given
(σ)
Percent
Estimated
(S)
SE
Z=
count - E (count)
SE (count)
8
Chapter 26 – Tests of Significance (cont.)
Exercise Set E: (pp. 486-488) #2, 3, 4, 5, 7
#2.
As part of a statistics project, Mr. Frank Alpert
approached the first 100 students he saw one day
on Sproul Plaza at the University of California,
Berkeley, and found out the school or college in
which they enrolled. His sample included 53 men
and 47 women. From Registrar’s data, 25,000
students were registered at Berkeley that term, and
67% were male. Was his sampling procedure like
taking a simple random sample?
Fill in the blanks. That will lead you step by step to
the box model for the null hypothesis. (There is no
alternative hypothesis about the box.)
9
3
Chapter 26 – Tests of Significance (cont.)
Population
Men
67%
1
Sample
Women
0
53
33%
Men
1
47
a) There is one ticket in the box for each
person in the sample
0
Women
.
student registered at Berkeley that term
b) The ticket is marked one for the men and zero for the
women.
and the number
c) The number of tickets in the box is
of draws is
.
Options:
100,
25,000.
10
Chapter 26 – Tests of Significance (cont.)
d) The null hypothesis says that the sample is like 100
draws made at random from the box. (The first blank
must be filled in with a number; the second, with a
word.)
e) The percentage of 1’s in the box is
Options: 53%, 67%.
.
11
Chapter 26 – Tests of Significance (cont.)
#7.
A coin is tossed 10,000 times, and it lands heads
5,167 times. Is the chance of heads equal to 50%?
Or are there too many heads for that?
a)
H 0 : φ = 50%
(Pop Percent)
H 1 : φ > 50%
(P Percent
(Pop
P
> 50)
b)
Sample
n = 10,000
5167
p% =
= 51.67%
10,000
E ( Percent) = 50%
p = sample percent = 51.67%
12
4
Chapter 26 – Tests of Significance (cont.)
SE % =
99.919%
.04%
.50 × .50
× 100 = .50%
10,000
.04%
50%
-3.35
Z=
51.67 − 50
= 3.34
.50
51.67
3.35
p%
Z=
p% − φ0 %
φ 0 %(1 − φ )%
n
ƒ P-value = .04%, and since the p-value is less than
5%, the chance of obtaining a sample percent of
51.67 from 10,000 cases would be very rare if the
population percent is 50 – as a result, reject the
null hypothesis and accept the alternative.
13
Chapter 26 – Tests of Significance (cont.)
#10.
A colony of laboratory mice consisted of several
hundred animals. Their average weight was about
30 grams, and the SD was about 5 grams. As part
of an experiment, graduate students were instructed
to choose 25 animals haphazardly,
p
y, without any
y
definite method. The average weight of these
animals turned out to be around 33 grams, and the
SD was about 7 grams. Is choosing animals
haphazardly the same as drawing them at random?
Or is 33 grams too far above average for that?
14
Chapter 26 – Tests of Significance (cont.)
Population / Box
Sample
µ = 30 grams
σ = 5 grams
H 0 : μ = 30
H 1 : μ > 30
n = 25
X = 33
S =7
Could a haphazard sample of 25 lab
mice have a reasonable average that
is representative of the population?
15
5
Chapter 26 – Tests of Significance (cont.)
SE = σ
99.73%
n
=
5
=1
25
.135%
30
-3
ƒ
33
3
avg ( X )
Z=
X − μ0
σ
n
=
33 − 30
=3
1
P-value is .135% - much smaller than 5%, as a result we
conclude it would be unreasonable to conclude that the
haphazard sample would yield the same result as a
simple random sample from the colony of mice.
16
17
18
6
„
Summary
If the amount of current data is:
Large
SE (avg) =
Small
S
n
SE (avg) =
S
n −1
And the contents of the
population error box
Then use Normal
Approximation to
test H0
X − μ0
Z=
S
n
Known (σ)
X − μ0
Z=
σ
Unknown but not too
different from Normal
Curve
t=
n
X − μ0
S
n −1
Close to Normal
X −μ
Z=
σ
Different from
Normal – use non
parametric
procedures
n
19
Chapter 26 – Tests of Significance (cont.)
„
If Box SD known – σ, use Z =
X − μ0
σ
.
n
„
If Box SD unknown – and n < 25, use
X − μ0
t=
, df = n − 1
S
.
n −1
20
Chapter 26 – Tests of Significance (cont.)
Example:
a)
Six readings on span gas turn out to be 72,
79, 65, 84, 67, 77. Test H0 that the
measurements reflect the average of 70.
H 0 : μ = 70
H 1 : μ > 70
b)
Sample
n=6
X = 74
S = 6.88
21
7
Chapter 26 – Tests of Significance (cont.)
c)
df = 5
10%
1.34
0
1.48
t
Since 1.34 has a p-value greater than 10%, we
retain hypothesis that the sample of 6
measurements would not be unusual, when
average of the machine is 70.
22
Chapter 26 – Tests of Significance (cont.)
Exercise Set F – (pp. 494-495) #2, 6, 7
#6.
A long series of measurements on a checkweight
averages out to 253 micrograms above ten grams,
and the SD is 7 micrograms. The Gauss model is
believed to apply, with negligible bias. At this point,
the balance has to be rebuilt; this may introduce
bias, as well as changing the SD of the error box.
Ten measurements on the checkweight, using the
rebuilt scale, show an average of 245 micrograms
above ten grams, and the SD is 9 micrograms. Has
bias been introduced? Or is this chance variation?
(You may assume that the errors follow the normal
curve.)
23
Chapter 26 – Tests of Significance (cont.)
Checkweight Population (Box)
µ = 253 mg
σ=7
Rebuilt Machine
n = 10
H 0 : μ = 253
X = 245
S =9
H 1 : μ < 253
24
8
Chapter 26 – Tests of Significance (cont.)
df = 9
SE = 9
=3
X
H 0 = 253
245
-2.67
ƒ
9
t=
t
245 − 253
= −2.67
3
From the t-table, a value of -2.67 would occur less than
2.5% of the time, if machine weighs same as previous
machine. Bias introduced.
25
Chapter 26 – Tests of Significance (cont.)
Review Exercises: (pp.495 – 500) #2, 4, 8, 9
#9.
A computer is programmed to make 100 draws at
random with replacement from the box:
0
0
0
0
1
and take their sum. It does this 144 times; the
average of the 144 sums is 21.13. The program
is working fine. Or is it?
26
Chapter 26 – Tests of Significance (cont.)
Box (Population)
μ = avg = .2
σ = SD = .2 × .8 = .40
Sample
n = 100
E (sum) = n ⋅ avg = 100(.2) = 20 = μ 0
SE (sum) = n ⋅ SD = 100 (.4) = 4 = σ
Repeat 144 times
27
9
Chapter 26 – Tests of Significance (cont.)
SE(sum) = 4
99.933%
.03%
.03%
20
-3.40
21.13
3.40
sum
Z=
Z=
ƒ p-value = .03%
ƒ If program is working, it would be very rare
X − μ0
σ
=
21.13 − 20
4
144
n
1.13
= 3.42
.33
(i.e., p-value less than 5%), so the machine is
probably not working properly.
28
29
10