Chapter 7 Inference Concerning Populations (Numeric Responses)

advertisement
Chapter 7
Inference Concerning Populations
(Numeric Responses)
Inference for Population Mean
• Practical Problem: Sample mean has sampling
distribution that is Normal with mean m and standard
deviation s / n (when the data are normal, and
approximately so for large samples). s is unknown.
• Have an estimate of s , s obtained from sample data.
Estimated standard error of the sample mean is:
s
SE x 
n
xm
t
~ t (n  1)
s
n
When the sample is SRS from N(m , s)
then the t-statistic (same as z- with
estimated standard deviation) is
distributed t with n-1 degrees of
freedom
Family of t-distributions
• Symmetric, Mound-shaped, centered at 0 (like the
standard normal (z) distribution
• Indexed by degrees of freedom (n ), the number of
independent observations (deviations) comprising the
estimated standard deviation. For one sample
problems n = n-1
• Have heavier tails (more probability over extreme
ranges) than the z-distribution
• Converge to the z-distribution as n gets large
• Tables of critical values for certain upper tail
probabilities are available (inside back cover of text)
Probability
df
D
e
g
r
e
e
s
o
f
F
r
e
e
d
o
m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
40
50
60
80
100
1000
z*
0.25
1.000
0.816
0.765
0.741
0.727
0.718
0.711
0.706
0.703
0.700
0.697
0.695
0.694
0.692
0.691
0.690
0.689
0.688
0.688
0.687
0.686
0.686
0.685
0.685
0.684
0.684
0.684
0.683
0.683
0.683
0.681
0.679
0.679
0.678
0.677
0.675
0.674
0.2
1.376
1.061
0.978
0.941
0.920
0.906
0.896
0.889
0.883
0.879
0.876
0.873
0.870
0.868
0.866
0.865
0.863
0.862
0.861
0.860
0.859
0.858
0.858
0.857
0.856
0.856
0.855
0.855
0.854
0.854
0.851
0.849
0.848
0.846
0.845
0.842
0.842
0.15
1.963
1.386
1.250
1.190
1.156
1.134
1.119
1.108
1.100
1.093
1.088
1.083
1.079
1.076
1.074
1.071
1.069
1.067
1.066
1.064
1.063
1.061
1.060
1.059
1.058
1.058
1.057
1.056
1.055
1.055
1.050
1.047
1.045
1.043
1.042
1.037
1.036
0.1
3.078
1.886
1.638
1.533
1.476
1.440
1.415
1.397
1.383
1.372
1.363
1.356
1.350
1.345
1.341
1.337
1.333
1.330
1.328
1.325
1.323
1.321
1.319
1.318
1.316
1.315
1.314
1.313
1.311
1.310
1.303
1.299
1.296
1.292
1.290
1.282
1.282
0.05
6.314
2.920
2.353
2.132
2.015
1.943
1.895
1.860
1.833
1.812
1.796
1.782
1.771
1.761
1.753
1.746
1.740
1.734
1.729
1.725
1.721
1.717
1.714
1.711
1.708
1.706
1.703
1.701
1.699
1.697
1.684
1.676
1.671
1.664
1.660
1.646
1.645
0.025
12.71
4.303
3.182
2.776
2.571
2.447
2.365
2.306
2.262
2.228
2.201
2.179
2.160
2.145
2.131
2.120
2.110
2.101
2.093
2.086
2.080
2.074
2.069
2.064
2.060
2.056
2.052
2.048
2.045
2.042
2.021
2.009
2.000
1.990
1.984
1.962
1.960
0.02
15.89
4.849
3.482
2.999
2.757
2.612
2.517
2.449
2.398
2.359
2.328
2.303
2.282
2.264
2.249
2.235
2.224
2.214
2.205
2.197
2.189
2.183
2.177
2.172
2.167
2.162
2.158
2.154
2.150
2.147
2.123
2.109
2.099
2.088
2.081
2.056
2.054
Critical Values
0.01
31.82
6.965
4.541
3.747
3.365
3.143
2.998
2.896
2.821
2.764
2.718
2.681
2.650
2.624
2.602
2.583
2.567
2.552
2.539
2.528
2.518
2.508
2.500
2.492
2.485
2.479
2.473
2.467
2.462
2.457
2.423
2.403
2.390
2.374
2.364
2.330
2.326
0.005
63.66
9.925
5.841
4.604
4.032
3.707
3.499
3.355
3.250
3.169
3.106
3.055
3.012
2.977
2.947
2.921
2.898
2.878
2.861
2.845
2.831
2.819
2.807
2.797
2.787
2.779
2.771
2.763
2.756
2.750
2.704
2.678
2.660
2.639
2.626
2.581
2.576
0.0025
127.3
14.09
7.453
5.598
4.773
4.317
4.029
3.833
3.690
3.581
3.497
3.428
3.372
3.326
3.286
3.252
3.222
3.197
3.174
3.153
3.135
3.119
3.104
3.091
3.078
3.067
3.057
3.047
3.038
3.030
2.971
2.937
2.915
2.887
2.871
2.813
2.807
0.001
318.3
22.33
10.21
7.173
5.894
5.208
4.785
4.501
4.297
4.144
4.025
3.930
3.852
3.787
3.733
3.686
3.646
3.610
3.579
3.552
3.527
3.505
3.485
3.467
3.450
3.435
3.421
3.408
3.396
3.385
3.307
3.261
3.232
3.195
3.174
3.098
3.090
0.0005
636.6
31.60
12.92
8.610
6.869
5.959
5.408
5.041
4.781
4.587
4.437
4.318
4.221
4.140
4.073
4.015
3.965
3.922
3.883
3.850
3.819
3.792
3.768
3.745
3.725
3.707
3.689
3.674
3.660
3.646
3.551
3.496
3.460
3.416
3.390
3.300
3.290
C
r
i
t
i
c
a
l
V
a
l
u
e
s
t(5), t(15), t(25), z distributions
Density
t(5)
t(15)
t(25)
z
-4
-3
-2
-1
0
1
2
3
4
One-Sample Confidence Interval for m
• SRS from a population with mean m is obtained.
• Sample mean, sample standard deviation are obtained
• Degrees of freedom are n = n-1, and confidence level C
are selected
• Level C confidence interval of form:
s
xt
n
t * selected from t - table so that P(t *  t (n  1)  t * )  C
*
Procedure is theoretically derived based on normally distributed data,
but has been found to work well regardless for large n
1-Sample t-test (2-tailed alternative)
• 2-sided Test: H0: m = m0
Ha: m  m0
• Decision Rule (t* obtained such that P(t(n-1) t*)=a/2) :
– Conclude m > m0 if Test Statistic (tobs) is greater than t*
– Conclude m < m0 if Test Statistic (tobs) is less than -t*
– Do not conclude Conclude m  m0 otherwise
• P-value: 2P(t(n-1) |tobs|)
• Test Statistic:
tobs
x  m0

s/ n
P-value (2-tailed test)
t(n-1)
P -value
-4
-3
-2
-|tobs|
-1
0
1
|tobs| 2
3
4
1-Sample t-test (1-tailed (upper) alternative)
• 1-sided Test: H0: m = m0
Ha: m > m0
• Decision Rule (t* obtained such that P(t(n-1) t*)=a) :
– Conclude m > m0 if Test Statistic (tobs) is greater than t*
– Do not conclude m > m0 otherwise
• P-value: P(t(n-1) tobs)
• Test Statistic:
tobs
x  m0

s/ n
P-value (Upper Tail Test)
t(n-1)
P-value
-4
-3
-2
-1
0
1
tobs
2
3
4
1-Sample t-test (1-tailed (lower) alternative)
• 1-sided Test: H0: m = m0
Ha: m < m0
• Decision Rule (t* obtained such that P(t(n-1) t*)=a) :
– Conclude m < m0 if Test Statistic (tobs) is less than -t*
– Do not conclude m < m0 otherwise
• P-value: P(t(n-1) tobs)
• Test Statistic:
tobs
x  m0

s/ n
P-value (Lower Tail Test)
t(n-1)
P-value
-4
-3
-2
tobs
-1
0
1
tobs
2
3
4
Example: Mean Flight Time ATL/Honolulu
• Scheduled flight time: 580 minutes
• Sample: n=31 flights 10/2004 (treating as SRS from all
possible flights
• Test whether population mean flight time differs from
scheduled time
• H0: m = 580 Ha: m  580
• Critical value (2-sided test, a = 0.05, n-1=30 df): t*=2.042
• Sample data, Test Statistic, P-value:
x  574.1 s  19.7 n  31
574.1  580  5.9
tobs 

 1.67
3.54
19.7 / 31
P - value  2 P(t (30) | 1.67 |)  2 P(t (30)  1.697)  2(.05)  .10
Paired t-test for Matched Pairs
• Goal: Compare 2 Conditions on matched individuals
(based on similarities) or the same individual under
both conditions (e.g. before/after studies)
• Obtain the difference for each pair/individual
• Obtain the mean and standard deviation of the
differences
• Test whether the true population means differ (e.g.
H0:mD = 0)
• Test treats the differences as if they were the raw data
Test Concerning mD
• Null Hypothesis: H0:mD=D0
(almost always 0)
• Alternative Hypotheses:
– 1-Sided: HA: mD > D0
– 2-Sided: HA: mD  D0
• Test Statistic:
tobs 
d
sd
n
Test Concerning mD
Decision Rule: (Based on t-distribution with n=n-1 df)
1-sided alternative
If tobs  t* ==> Conclude mD  D0
If tobs < t* ==> Do not reject mD  D0
2-sided alternative
If tobs  t* ==> Conclude mD  D0
If tobs  -t* ==> Conclude mD < D0
If -t* < tobs < t* ==> Do not reject mD  D0
Confidence Interval for mD
 sd 
d t 

 n
*
Example Antiperspirant Formulations
• Subjects - 20 Volunteers’ armpits
• Treatments - Dry Powder vs Powder-in-Oil
• Measurements - Average Rating by Judges
– Higher scores imply more disagreeable odor
• Summary Statistics (Raw Data on next slide):
d  0.15 sd  0.248 n  20
Source: E. Jungermann (1974)
Example Antiperspirant Formulations
Subject
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Dry Powder
2
2.8
1.3
1.8
1.9
2.8
2
1.5
1.9
2.9
2.9
2.3
2.3
3.6
2.2
2.1
2.5
2.4
3.1
2
Powder-in-Oil Difference
1.9
0.1
2.4
0.4
1.5
-0.2
1.8
0
1.8
0.1
2.4
0.4
2.2
-0.2
1.5
0
1.7
0.2
2.8
0.1
2.7
0.2
1.5
0.8
2.5
-0.2
3.2
0.4
2.1
0.1
1.9
0.2
2.6
-0.1
2
0.4
2.9
0.2
1.9
0.1
0.15 Mean
0.248151058 Std Dev
Example Antiperspirant Formulations
H 0 : m D  0 (No difference in formulatio n effects)
H A : m D  0 (Formulati on effects differ)
TS : tobs 
d
0.15

0.248
sd
n
20
0.15

 2.70
.0555
RR : tobs  t.025, 201  t.025,19  2.093
P  value  2P(t  2.70)
sd
95% CI for m D : d  t.025,n 1
n
 0.15  2.093(.0555)  0.15  0.116  (0.034,0.266)
Evidence that scores are higher (more unpleasant) for the dry
powder (formulation 1)
Comparing 2 Means - Independent Samples
• Goal: Compare responses between 2 groups (populations,
treatments, conditions)
• Observed individuals from the 2 groups are samples from
distinct populations (identified by (m1,s1) and (m2,s2))
• Measurements across groups are independent (different
individuals in the 2 groups
• Summary statistics obtained from the 2 groups:
Group 1 : Mean : x1 Std. Dev. : s1 Sample Size : n1
Group 2 : Mean : x 2 Std. Dev. : s2 Sample Size : n2
Sampling Distribution of
X1  X 2
• Underlying distributions normal  sampling distribution
is normal
• Underlying distributions nonnormal, but large sample
sizes  sampling distribution approximately normal
• Mean, variance, standard deviation:
(
V (X
)
) s
E X 1  X 2  m X 1  X 2  m1  m 2
sX
1  X 2
1X 2

s 12
n1
2
X1X 2

s 22
n2

s 12
n1

s 22
n2
t-test when Variances are estimated
• Case 1: Population Variances not assumed to be equal (s12s22)
• Approximate degrees of freedom
– Calculated from a function of sample variances and sample sizes (see formula
below) - Satterthwaite’s approximation
– Smaller of n1-1 and n2-1
• Estimated standard error and test statistic for testing H0: m1=m2:
(
)
Estimated standard error : SE X 1  X 2 
Test Statistic : t obs 
s12
s22

n1
n2
X1  X 2
X1  X 2

SE X 1  X 2
s12
s22

n1
n2
Satterthwa ite' s df : n 
(
)
 s12
s22 



n
n
2 
 1
2
2
  s 2 2  s 2

 1

 2n 
n

1
2 

 n 1  n 1
1
2










t-test when Variances are estimated
• Case 2: Population Variances assumed to be equal (s12=s22)
• Degrees of freedom: n1+n2-2
• Estimated standard error and test statistic for testing H0: m1=m2:
(
)
Estimated standard error : SE X 1  X 2 
Test Statistic : t obs 
X1  X 2

SE X 1  X 2
(
2
2
(
n

1
)
s

(
n

1
)
s
1
2
2
s 2p  1
n1  n2  2
)
 1
1 

s 

 n1 n2 
2
p
X1  X 2
 1
1 

s 

 n1 n2 
2
p
Example - Maze Learning (Adults/Children)
• Groups: Adults (n1=14) / Children (n2=10)
• Outcome: Average # of Errors in Maze Learning Task
• Raw Data on next slide
Mean
Std Dev
Sample Size
Adults (i=1)
13.28
4.47
14
Children (i=2)
18.28
9.93
10
• Conduct a 2-sided test of whether mean scores differ
• Construct a 95% Confidence Interval for true difference
Source: Gould and Perrin (1916)
Example - Maze Learning (Adults/Children)
Name
H
W
Mac
McG
L
R
Hv
Hy
F
Wd
Rh
D
Hg
Hp
Hl
McS
Lin
B
N
T
J
Hz
Lev
K
Group
Trials
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2
2
2
2
2
2
2
2
2
2
41
25
33
31
41
48
24
32
46
47
35
69
27
27
42
89
38
20
49
40
50
40
54
58
Errors
Average
728
17.76
333
13.32
453
13.73
528
17.03
335
8.17
553
11.52
217
9.04
711
22.22
839
18.24
473
10.06
532
15.20
538
7.80
213
7.89
375
13.89
254
6.05
1559
17.52
1089
28.66
254
12.70
599
12.22
520
13.00
828
16.56
516
12.90
2171
40.20
1331
22.95
Group
n
1
2
Mean
Std Dev
14
13.28
4.47
10
18.28
9.93
Example - Maze Learning
Case 1 - Unequal Variances
H0: m1m2  0
S12
( 4.47) 2

 1.43
n1
14
HA: m1m2  0
(a = 0.05)
S 22
(9.93) 2

 9.86
n2
10
(1.43  9.86 )2
127.46
n 

 11.63
2
2
10.96
 (1.43)
(9.86) 



9
 13

13.28  18.28
 5.00
TS : t obs 

 1.49
2
2
3.36
( 4.47)
(9.93)

14
10
RR : | t obs |  t.025,11.63  2.19
*
95%CI :  5.00  2.19(3.36)   5.00  7.36  ( 12.36,2.36)
No significant difference between 2 age groups
Note: Alternative would be to use 9 df (10-1)
Example - Maze Learning
Case 2 - Equal Variances
H0: m1m2  0
HA: m1m2  0
(a = 0.05)
(14  1)( 4.47) 2  (10  1)(9.93) 2
s 
 52.15
14  10  2
13.28  18.28
 5.00
TS : tobs 

 1.67
2.99
1 
 1
52.15


 14 10 
RR : | tobs |  t.025, 22  2.074
2
p
95%CI :  5.00  2.074( 2.99)   5.00  6.20  ( 11.2,1.2)
No significant difference between 2 age groups
SPSS Output
S
t
E
e
N
e
e
G
A
A
4
1
4
8
C
0
9
9
2
S
s
u
f
a
V
o n
a l
e
r
.
e
E
a
e
e
o
2
F
d
p
i
t
r
r
w
g
f
p
e
e
A
E
0
7
2
2
9
8
7
1
5
a
E
8
1
3
8
4
7
1
n
C% Confidence Interval for m1-m2
) (x
(
Case 1 s 12  s 22 :
)
*

x

t
1
2
s12 s22

n1 n2
df  Satterthwa ite or smaller of n1  1, n2  1
Maze Data (df  11.63 or could use 9) :
95%CI :  5.00  2.19(3.36)   5.00  7.36  (12.36,2.36)
(
) (x
Case 2 s  s :
2
1
2
2
1
)
 x2  t
*
1 1
s   
 n1 n2 
2
p
df  n1  n2  2
Maze Data (df  22) :
95%CI :  5.00  2.074(2.99)   5.00  6.20  (11.2,1.2)
Download