Professional Documents
Culture Documents
Stat 2
Session 10
Statistical Hypothesis
Session 10 - 1
Session 10 Topics
Estimating the Variance
Estimating the Ratio of Two Variances
Statistical Hypothesis
Hypothesis Testing Methodology
Z Test for the Mean ( Known)
p-Value Approach to Hypothesis Testing
Connection to Confidence Interval Estimation
One Tail Test
t Test of Hypothesis for the Mean
Z Test of Hypothesis for the Proportion
Testing Hypothesis using SPSS
ST640 - Statistical Analysis
Session 10 - 2
(n 1) S
2
Session 10 - 3
(n 1) S
2
0
ST640 - Statistical Analysis
Session 10 - 4
(n 1) S
2
1
0
/2
/2
2
1 / 2
P(
ST640 - Statistical Analysis
2
1 / 2
2
/2
2
/2
) 1
Session 10 - 5
Chi-Square Statistic
2
(n 1) S 2
(
n
1
)
S
2
2
/ 2
12 / 2
Session 10 - 6
Estimating The
Variance
Chi-Square Statistic
(n 1) S
2
Session 10 - 7
Session 10 - 8
s2
10 x
2
i
i 1
10(10 1)
i 1
10
0.286222
95%
2.5%
2.7
2.5%
19.023
2
Session 10 - 9
( n 1) S 2
2 / 2
( n 1) S 2
12 / 2
9(0.286)
9(0.286)
2
19.023
2.700
95%
2.5%
2.7
0.135 2 0.953
2.5%
19.023
2
Session 10 - 10
statistic
F Statistic
S
F
S
2 2
2 1
2 2
1 2
Session 10 - 11
S
F
S
2 2
2 1
2 2
1 2
/ v1 s /
s
f
/ v2 s /
s
2
1
2
2
2
1
2
2
2
1
2
2
2
2
2
1
2
1
2
2
Session 10 - 12
S
F
S
2 2
2 1
2 2
1 2
0
ST640 - Statistical Analysis
f
Session 10 - 13
S
F
S
2 2
2 1
2 2
1 2
P( f1 / 2 ( v1,v 2 ) F f / 2 ( v1,v 2 ) ) 1
1
0
/2
/2
f1 / 2
f / 2
f
Session 10 - 14
f1 ( v1,v 2)
Example
f.95( 6,10 )
S
F
S
2 2
2 1
2 2
1 2
1
f ( v 2,v1)
1
f.05(10, 6 )
f.95( 6,10 )
0.246
4.06
Session 10 - 15
S
F
S
2 2
2 1
2 2
1 2
12
Confidence Interval for
22
2
2
s
1
1 s1
2 2 f / 2 (v2 , v1 )
s f / 2 (v1 , v2 ) 2 s2
2
1
2
2
Session 10 - 16
Session 10 - 17
n1 25
n2 16
s1 8
s2 7
12
98% Confidence Interval for
22
12 64
64
1
f.01 (15,24)
2
49 f.01 (24,15) 2 49
64 1 12 64
2
(2.89)
49 3.29 2 49
12
0.397 2 3.775
2
ST640 - Statistical Analysis
98% Confidence
1
Interval for
2
1
0.630
1.943
2
Session 10 - 18
What is a Hypothesis?
A hypothesis is an
assumption about the
population parameter.
A parameter is a
Population mean or
proportion
Session 10 - 19
Session 10 - 20
Session 10 - 21
exhaustive
Sometimes it is easier to form the
alternative hypothesis first.
ST640 - Statistical Analysis
Session 10 - 22
Is X 16 30?
No, not likely!
Population
The Sample
Mean Is 16
REJECT
Null Hypothesis
ST640 - Statistical Analysis
Sample
Session 10 - 23
16
ST640 - Statistical Analysis
= 30
... Therefore,
we reject the
null
hypothesis
that = 30.
Sample Mean
H0
Session 10 - 24
Level of Significance,
Designated (alpha)
Session 10 - 25
Critical
Value(s)
Rejection
Regions
H0: 3
H1: 3
/2
0
ST640 - Statistical Analysis
Session 10 - 26
Type I Error
Reject True Null Hypothesis
Has Serious Consequences
Probability of Type I Error Is
Called
Level of Significance
Type II Error
Do Not Reject False Null Hypothesis
Probability of Type II Error Is (Beta)
Session 10 - 27
Result Possibilities
Jury Trial
H0: Innocent
Hypothesis Test
Actual
Verdict Situation
Innocent
Guilty
Innocent
Correct
Guilty
Error
Error
Correct
Decision
Actual Situation
H0True H 0 False
Do Not
Reject
H0
1-
Type II
Error ( )
Reject
H0
Type I
Error
( )
Power
(1 - )
Session 10 - 28
& Have an
Inverse Relationship
Reduce probability of one error
and the other one goes up.
Session 10 - 29
Factors Affecting
Type II Error,
Significance Level
Sample Size n
Session 10 - 30
X X X
Z
X
n
)X
to
Test Statistic
Session 10 - 31
p Value Test
Session 10 - 32
State H0
H0 : 3
2.
State H1
H1 :
3.
Choose
= .05
4.
Choose n
n = 100
5.
Choose Test:
Session 10 - 33
Z = -1.645
7. Collect Data
is less
Session 10 - 34
(Known)
Assumptions
Population Is Normally Distributed
If Not Normal, use large samples
Null Hypothesis Has or Sign Only
Z Test Statistic:
x x x
z
x
n
Session 10 - 35
Rejection Region
H0:
H1: < 0
H0: 0
H1: > 0
Reject H0
Reject H 0
Must Be Significantly
Below = 0
ST640 - Statistical Analysis
368 gm.
H0: 368
H1: > 368
Session 10 - 37
Finding Critical
Values: One Tail
What Is Z Given = 0.05?
1.00
-.05
.95
Z = 1
= .05
0 1.645 Z
Critical Value
= 1.645
ST640 - Statistical Analysis
Standardized Normal
Probability Table (Portion)
.04
.05
.06
0 1.645 Z
ST640 - Statistical Analysis
Test Statistic:
Z
1.50
Decision:
Conclusion:
p Value Solution
p Value is P(Z 1.50) = 0.0668
Use the
alternative
hypothesis
to find the
direction of
the test.
p Value
.0668
.9332
0 1.50
From Z Table:
Lookup 1.50
ST640 - Statistical Analysis
1.0000
- .9332
.0668
Z
Z Value of Sample
Statistic
Session 10 - 40
p Value Solution
(p Value = 0.0668) ( = 0.05).
Do Not Reject.
p Value = 0.0668
Reject
= 0.05
1.50
Session 10 - 41
368 gm.
H0: 368
H1: 368
Session 10 - 42
Test Statistic:
= 0.05
n = 25
Critical Value: 1.96
Reject
.025
.025
-1.96
ST640 - Statistical Analysis
0 1.96
X 372.5 368
1.50
15
n
25
Decision:
Do Not Reject at = .05
Conclusion:
No Evidence that True
Mean Is Not 368
Session 10 - 43
Connection to
Confidence Intervals
_
For X = 372.5oz, = 15 and n = 25,
The 95% Confidence Interval is:
372.5 - (1.96) 15/ 25 to 372.5 + (1.96) 15/ 25
or
366.62 378.38
If this interval contains the Hypothesized mean
(368), we do not reject the null hypothesis.
It does. Do not reject.
ST640 - Statistical Analysis
Session 10 - 44
(Known)
Example
A manufacturer of sports equipment has developed a new
synthetic fishing line that he claims has a mean breaking
strength of 8 kilograms with a standard deviation of 0.5
kilogram. Test the hypothesis thatkilograms 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. Use .01 level of significance.
Session 10 - 45
(Known)
Solution
H0: 8 kilograms
H1: 8
kilograms
= 0.01
n = 50
Critical Value: 2.575
Test Statistic:
X 7.8 8
2.83
0 .5
n
50
Decision:
Reject H0 at = .01
Conclusion:
.005
-2.575
ST640 - Statistical Analysis
.005
0 2.575 Z
(Known)
Example
A random sample of 100 recorded deaths in the Philippines
during the past year showed an average life span of 71.8
years, with a standard deviation of 8.9 years. Does this
seem to indicate that the average life span today is greater
than 70 years? Use a 0.05 level of significance.
Session 10 - 47
(Known)
Solution
H0: years
H1: years
= 0.05
n = 100
Critical Value: 1.645
Test Statistic:
X 71.8 70
2.02
8.9
n
100
Decision:
Reject H0 at = .05
Conclusion:
.05
0 1.645 Z
t-Test: Unknown
Assumptions
Population is normally distributed
If not normal, only slightly skewed & a
large sample taken
X
t
S
n
Session 10 - 49
is not
given,
ST640 - Statistical Analysis
368 gm.
H0: 368
H1: 368
Session 10 - 50
0 2.326
ST640 - Statistical Analysis
Test Statistic:
X 372.5 368
t
1.80
S
15
n
36
Decision:
Do Not Reject at = .01
Conclusion:
No Evidence that True
Mean Is More than 368
Session 10 - 51
t-Test: Unknown
Example
A new registration procedure using modern computing
machines is being tried. If a random sample of 12 students
had an average registration time of 42 minutes with a
standard deviation of 11.9 minutes under the new system,
test the hypothesis that the population mean is now less
than 50, using a level of significance of (a) 0.05 and (b)
0.01. Assume the population of times to be normal
Session 10 - 52
t-Test: Unknown
Solution
Test Statistic:
H0: min
H1: min
= 0.05 , = 0.01
n = 12
df=11
Critical Value: -1.796, -2.718
.05
.01
-2.718
ST640 - Statistical Analysis
-1.796
X 42 50
2.33
s
11.9
n
12
Decision:
Reject H0 at = .05
Do not reject H0 at = .01
Conclusion:
0
0
Value of Test
Statistic
H1
X
Z
n
known or n 30
0
0
0
X
t
, v n 1
s
n
0
0
0
unknown and n 30
Critical Region
z z
z z
z z / 2 and z z / 2
t t
t t
t t / 2 and
t t / 2
Session 10 - 54
Ho
1 2 d 0
1 2 d 0
Value of Test
Statistic
H1
Critical Region
( x1 x2 ) d 0
1 2 d 0
z
2
2
( 1 / n1 ) ( 2 / n2 ) 1 2 d 0
z z
1 and 2 known
1 2 d 0 z z and z z
/2
/2
( x1 x2 ) d 0
t
s p (1 / n1 ) (1 / n2 )
v n1 n2 2
1 2 but unknown
t t
1 2 d 0
t t
1 2 d 0
1 2 d 0 t t / 2 and t t / 2
Session 10 - 55
Ho
1 2 d 0
Value of Test
Statistic
t'
H1
1 2 d 0
t t
1 2 d 0
t t
1 2 d 0 t t
and t t / 2
/2
( x1 x2 ) d 0
( s12 / n1 ) ( s22 / n2 )
( s12 / n1 s22 / n2 ) 2
2
1
/ n1
s22 / n2
n1 1
n2 1
Critical Region
1 2 and unknown
Session 10 - 56
Value of Test
Statistic
H1
Critical Region
D d0
d d0
t
, v n 1
sd n
D d0
D d0
D d0
t t
t t
paired observation
t t / 2 and t t / 2
Session 10 - 57
t-Test: Unknown
Example
A course in Mathematics is taught to 12 students by the
conventional classroom procedure. A second group of 10
students was given the same course by means of
programmed materials. At the end of the semester the
same examination was given to each group. The 12
students meeting in the classroom made an average of 81
with standard deviation of 4, while the 10 students using
programmed materials made an average of 81 with a
standard deviation of 5. Test the hypothesis that the two
methods of learning are equal using 0.10 level of
significance. Assume the population to be approximately
normal with equal variances.
ST640 - Statistical Analysis
Session 10 - 58
t-Test: Unknown
Solution
Test Statistic:
H0:
2
=: 0.10
,
H
1
n1 = 12 n2=10
df=20
( x1 x2 ) d 0
t
s p (1 / n1 ) (1 / n2 )
s
2
p
-1.725
ST640 - Statistical Analysis
20.05
(85 81) 0
2.07
4.478 (1 / 12) (1 / 10)
Decision:
Reject H0 at = .10
Conclusion:
.05
1.725
20
s p 4.478
.05
Proportions
Involves categorical variables
Fraction or % of population in a category
If two categorical outcomes, binomial
distribution
n
sample size
ST640 - Statistical Analysis
Session 10 - 60
Session 10 - 61
Test Statistic:
ps - p
Z
p (1 - p)
n
= .05
n = 500
Reject
.025
.025
0
ST640 - Statistical Analysis
.05 -.04
=
= 1.14
.04 (1 - .04)
500
Decision:
Conclusion:
Analyze
Nonparametric Tests
Binomial
ST640 - Statistical Analysis
Session 10 - 63
Test Variable
Test Proportion
H0: p .05
H1: p .05
Session 10 - 64
BINOM10 Group 1
BINOM10 Group 1
Group 2
Group 2
Total
Total
Category
Category
1.00
1.00
.00
.00
N
N
7
7
3
3
10
10
H0: p .05
H1: p .05
Observed
Exact Sig.
Observed
Exact Sig.
Prop.
Test Prop.
(2-tailed)
Prop.
Test Prop.
(2-tailed)
.70
.50
.344
.70
.50
.344
.30
.30
1.00
1.00
Session 10 - 65
BINOM40 Group 1
BINOM40 Group 1
Group 2
Group 2
Total
Total
a. Based on Z Approximation.
a. Based on Z Approximation.
N
N
28
28
12
12
40
40
H0: p .05
H1: p .05
Observed
Asymp. Sig.
Observed
Asymp. Sig.
Prop.
Test Prop.
(2-tailed)
Prop.
Test Prop.
(2-tailed) a
.70
.50
.018 a
.70
.50
.018
.30
.30
1.00
1.00
Session 10 - 66
Analyze
Compare Means
One-Sample T test
ST640 - Statistical Analysis
Session 10 - 67
Test Variable
H0:
H1: 40
Test Value
ST640 - Statistical Analysis
Session 10 - 68
H0:
H1: 40
One-Sample Statistics
N
Number of Hours
Worked Last Week
Mean
900
Std. Deviation
Std. Error
Mean
14.631
.488
41.76
P-value
One-Sample Test
Test Value = 40
t
Number of Hours
Worked Last Week
Decision:
3.616
df
899
Sig. (2-tailed)
Mean
Difference
.000
1.76
95% Confidence
Interval of the
Difference
Lower
Upper
.81
2.72
Session 10 Summary
Estimating the Variance
Statistical Hypothesis
Hypothesis Testing Methodology
Z Test for the Mean ( Known)
p-Value Approach to Hypothesis Testing
Connection to Confidence Interval Estimation
One Tail Test
t Test of Hypothesis for the Mean
Z Test of Hypothesis for the Proportion
Testing Hypothesis Using SPSS
ST640 - Statistical Analysis
Session 10 - 70