Lecture22 Stat104 V3 6up
Lecture22 Stat104 V3 6up
Guess
(1 - p
)
p
n
https://www.predictit.org/Browse/Group/67/National
Stata Examples
n use
http://people.fas.harvard.edu/~mparzen/stat104/stat111_survey
5
ci proportion glasses
-- Binomial Exact -Variable |
Obs Proportion
Std. Err.
[95% Conf. Interval]
-------------+--------------------------------------------------------------glasses |
92
.6304348
.0503236
.5234493
.7287734
. ci proportion glasses if female==0
What is a Hypothesis?
10
Caution
11
12
Parameter Identification
13
14
15
16
Setting up Ho and Ha
1.
2.
3.
17
18
19
Forming Hypotheses
n Set up Ho and Ha for the following situation
n In 2008, 62% of American adults regularly
volunteered their time for charity work. A
researcher believes that this percentage is
different today.
23
IF
Correct Decision
Type I error
Ho is false
Type II error
2.
Do not reject the null hypothesis when the null hypothesis is true.
This decision would be correct.
3.
Reject the null hypothesis when the null hypothesis is true. This
decision would be incorrect. This type of error is called a Type I
error.
4.
Ho is false
(no error)
Correct Decision
(no error)
20
21
Forming Hypotheses
Forming Hypotheses
22
24
25
26
= P(Type I Error)
= P(rejecting H0 when H0 is true)
= P(Type II Error)
= P(not rejecting H0 when H1 is true)
27
Example
28
29
30
31
33
a)
b)
32
35
34
36
37
38
Example
A machine being used for packaging seedless golden raisins
has been set so that on the average 15 ounces of raisins will
be packaged per box. The quality control engineer wishes to
test the machine setting and selects a sample of 30 raisin
boxes. He finds =15.11 and s=0.4058
He wants to know if the mean weight per box is different from
15 ounces.
H0 : m = 15
vs.
Ha : m 15
m0
38
39
Solution
. cii 30 15.11 .4058
Variable |
Obs
Mean
Std. Err.
[95% Conf. Interval]
-------------+--------------------------------------------------------------|
30
15.11
.0740886
14.95847
15.26153
Ha : m 15
40
H0 : m = 15
Logic
41
Example
n A manufacturer of sports equipment has developed a
new synthetic fishing line that the company claims has a
mean breaking strength of 8 kilograms.
n Test the hypothesis that =8 kilograms against the
alternative that 8 kilograms if a random sample of 50
lines is tested and found to have a mean breaking
strength of 7.8 kilograms with a standard deviation of 0.5
kilograms.
42
43
n Conclusion?
45
Example (cont)
n We want to test
H 0 : m = 1.325
vs.
44
Example
46
H a : m 1.325
n The 95% CI is
.0396
1.325 1.96
= (1.316,1.334)
80
214
214
1
300
300
= (0.662, 0.764)
300
47
H a : p 60%
48
49
51
50