TFG0152 Tölfræði

Download Report

Transcript TFG0152 Tölfræði

TFG0152 Tölfræði
Fyrirlestur 12
Kafli 9.1 Inference about the mean μ (σ unknown/óþekkt)
...forsenda... dreifing er normaldreifing
26/05/2016
Dr Andy Brooks
1
Fyrirlestur 11
Forsenda
σ known/þekkt.
95% öryggisbil (α=0,05) fyrir μ, þýðismeðaltal
x - 1,96

n
til x  1,96

n
99% öryggisbil (α=0,01) fyrir μ, þýðismeðaltal
x - 2,575
26/05/2016

n
til x  2,575
Dr Andy Brooks

n
2
estimate/spágildi
standard error/staðalvilla
point estimate/punktspá
En, oftast σ, þýðisstaðalfrávikið er óþekkt...
• Við notum s eins puntkspá fyrir σ:
 x 
x  n
2
2
s2 
n 1
s  s2
• Spátala fyrir staðalvillu er:
s
n
26/05/2016
Dr Andy Brooks
3
degrees of freedom/frígráður
t-distribution/t-dreifing
Student´s t-statistic
• Because s is an estimate, instead of the test
statistic z* and BOOKTABLE3, we use the
Student´s t statistic:
x
t
s
n
• The t-distribution is not normally distributed for
small sample sizes n.
• The t-distribution depends on the “degrees of
freedom” df = n-1 (for the examples in Chapter 9).
26/05/2016
Dr Andy Brooks
4
Student´s t-dreifingar
The t-distribution approaches the normal distribution as the
degrees of freedom increase (as the sample size increases).
26/05/2016
www.xycoon.com
Dr Andy Brooks
INTERACTIVITY 9A
5
Confidence Interval (CI)/Öryggisbil
• Við notum t frekar en z.
• Við notum s vegna σ er óþekkt.
• 1-α öryggisbil fyrir μ, þýðismeðaltal er:
x t
s
( df ,  / 2 )
n
df  n - 1
26/05/2016
til x  t
s
( df ,  / 2 )
n
The critical values of t can be read from tables
such as BOOKTABLE6 (bl. 581) or calculated
using statistical software (t.d. TINV in Excel).
Dr Andy Brooks
6
Women´s heights/Hæðir kvenna
n  22 x 1,68 s  0,06
• s er punktspá fyrir σ
• 95% öryggisbil er:
x - 2,08
Áður,
notuðum við 1,96
áður
1,655  x  1,705
0,06
0,06
to x  2,08
22
22
1,653  x  1,707
≈ 4mm meira
5
4
3
2
0
26/05/2016
1,55
1,56
1,57
1,58
1,59
1,6
1,61
1,62
1,63
1,64
1,65
1,66
1,67
1,68
1,69
1,7
1,71
1,72
1,73
1,74
1,75
1,76
1,77
1,78
1,79
1,8
1,81
1,82
1,83
1,84
More
1
Dr Andy Brooks
7
einhliða
tvíhliða
one tail
0,05
0,025
0,01
0,005
two tail
0,1
0,05
0,02
0,01
3
2,35
3,18
4,54
5,84
4
2,13
2,78
3,75
4,60
5
2,02
2,57
3,36
4,03
6
1,94
2,45
3,14
3,71
7
1,89
2,36
3,00
3,50
8
1,86
2,31
2,90
3,36
9
1,83
2,26
2,82
3,25
10
1,81
2,23
2,76
3,17
11
1,80
2,20
2,72
3,11
12
1,78
2,18
2,68
3,05
13
1,77
2,16
2,65
3,01
14
1,76
2,14
2,62
2,98
15
1,75
2,13
2,60
2,95
16
1,75
2,12
2,58
2,92
17
1,74
2,11
2,57
2,90
18
1,73
2,10
2,55
2,88
Critical Values of
Student´s t-Distribution
df
26/05/2016
BOOKTABLE6
8
one tail
0,05
0,025
0,01
0,005
two tail
0,1
0,05
0,02
0,01
19
1,73
2,09
2,54
2,86
20
1,72
2,09
2,53
2,85
21
1,72
2,08
2,52
2,83
22
1,72
2,07
2,51
2,82
23
1,71
2,07
2,50
2,81
24
1,71
2,06
2,49
2,80
25
1,71
2,06
2,49
2,79
26
1,71
2,06
2,48
2,78
27
1,70
2,05
2,47
2,77
28
1,70
2,05
2,47
2,76
29
1,70
2,05
2,46
2,76
30
1,70
2,04
2,46
2,75
35
1,69
2,03
2,44
2,72
40
1,68
2,02
2,42
2,70
50
1,68
2,01
2,40
2,68
100
1,66
1,98
2,36
2,63
Critical Values of
Student´s t-Distribution
df
26/05/2016
BOOKTABLE6
9
Dæmi - Öryggisbil
• A random sample of 17 people (n=17) found that it took
an average (meðaltal) of 7,8 hours to fill out a tax
return/skattskýrsla with a standard deviation
(staðalfrávik) of 2,3. What is the 95% confidence interval
for the population mean μ?
n=17 x-bar=7,8 s=2,3
t(df,α/2) = t (16 0,025) = 2,12 from BOOKTABLE6
2,3
2,3
x - 2,12
to x  2,12
17
17
7,8 – 1,18 to 7,8 + 1,18
95% öryggisbil er [6,62 til 8,98]
26/05/2016
Dr Andy Brooks
10
null hypothesis/núlltilgáta
alternative hypothesis/hin tilgáta
one-tailed test/einhliða próf
Dæmi - einhliða próf
• Is the mean level of carbon monoxide/kolmónoxíð
greater than 4,9 parts per million? A random
sample of 22 measurements has a mean of 5,1
and a standard deviation of 1,17.
• Use an α level/alfastig of 0,05.
n=22 x-bar=5,1 s=1,17
• H0 μ = 4,9 (<=, ekki meira en 4,9)
• Ha μ > 4,9 (meira en 4,9)
26/05/2016
Dr Andy Brooks
Illustration 9,5 bl. 420-
11
Dæmi - einhliða próf
• The test statistic is t*:
x   5,1  4,9
0,20
t* 


 0,80
s
1,17
0,2494
n
22
• The calculated value of t is the number of
estimated standard errors, x-bar is from the
hypothesized mean μ.
• t (21 0,05) = 1,72 (one-tailed) from BOOKTABLE6
• Since 0,8 < 1,72 we cannot reject the null
hypothesis.
26/05/2016
Dr Andy Brooks
12
two-tailed test/tvíhliða próf
Dæmi - tvíhliða próf
• In a test, the mean score is expected to be 65. In
a random sample of 28 employees the mean
was 62,1 with a standard deviation of 5,83. Are
these 28 employees different from expected?
Use an α of 0,02.
n=28 x-bar=62,1 s=5,83
• H0 μ = 65
• Ha μ ≠ 65 (mean is different from 65)
26/05/2016
Dr Andy Brooks
Illustration 9,6 bl. 422-
13
Dæmi - tvíhliða próf
• The test statistic is t*:
x   62,1  65  2,9
t* 


 2,63
s
5,83
1,1018
n
28
• t (27 0,01) = 2,47 (two-tailed) from BOOKTABLE6
• Since -2,63 < -2,47 we can reject the null
hypothesis and say the employees tested
differently from expected.
– núlltilgáta er ekki rétt, eitthvað er að
26/05/2016
Dr Andy Brooks
14