Sie sind auf Seite 1von 5

Chapter11HWKey

11.45:
(a)Paired
(b)E
0
: p

= u;E
A
: p

= u,wherep

isthemeandifferencebetweencornflakesLDLandoatbranLDL.
(c)
> oat =scan( )
1: 3. 84 5. 57 5. 85 4. 80 3. 68 2. 96 4. 41 3. 72 3. 49 3. 84 5. 26 3. 73 1. 84 4. 14
15:
Read 14 i t ems
> cor n=scan( )
1: 4. 61 6. 42 5. 40 4. 54 3. 98 3. 82 5. 01 4. 34 3. 80 4. 56 5. 35 3. 89 2. 25 4. 24
15:
Read 14 i t ems
> t . t est ( cor n- oat )

One Sampl e t - t est

dat a: cor n - oat
t = 3. 3444, df = 13, p- val ue = 0. 005278
al t er nat i ve hypot hesi s: t r ue mean i s not equal t o 0
95 per cent conf i dence i nt er val :
0. 1284606 0. 5972537
sampl e est i mat es:
mean of x
0. 3628571

> wi l cox. t est ( cor n- oat , conf . i nt =T)

Wi l coxon si gned r ank t est

dat a: cor n - oat
V = 93, p- val ue = 0. 008545
al t er nat i ve hypot hesi s: t r ue l ocat i on i s not equal t o 0
95 per cent conf i dence i nt er val :
0. 13 0. 61
sampl e est i mat es:
( pseudo) medi an
0. 39

(d)Concludethatthemeandifferenceisnotzero.IntheWilcoxontest,concludethatthedistributionof
differencesisnotsymmetricabout0.

11.47:
(a)
> cot . 12=scan( )
1: 73 58 67 93 33 18 147
8:
Read 7 i t ems
> cot . 24=scan( )
1: 24 27 49 59 0 11 43
8:
Read 7 i t ems
> t . t est ( cot . 12- cot . 24, al t er nat i ve=" g" )

One Sampl e t - t est

dat a: cot . 12 - cot . 24
t = 3. 3228, df = 6, p- val ue = 0. 007974
al t er nat i ve hypot hesi s: t r ue mean i s gr eat er t han 0
95 per cent conf i dence i nt er val :
16. 37073 I nf
sampl e est i mat es:
mean of x
39. 42857

> wi l cox. t est ( cot . 12- cot . 24, al t er nat i ve=" g" , conf . i nt =T)

Wi l coxon si gned r ank t est

dat a: cot . 12 - cot . 24
V = 28, p- val ue = 0. 007813
al t er nat i ve hypot hesi s: t r ue l ocat i on i s gr eat er t han 0
95 per cent conf i dence i nt er val :
19 I nf
sampl e est i mat es:
( pseudo) medi an
33. 25

(b)Concludethatthemeandifferenceisgreaterthan0.IntheWilcoxontest,concludethatthe
distributionofdifferencesisnotsymmetricabout0.Ifitissymmetric,itissymmetricaboutsome
numbergreaterthan0.

11.48:
(a)Independentsamples
(b)E
0
: p
s
= p
ns
;E
A
: p
s
= p
ns
,wherep
s
isthemeanbonemineralcontentforchildrenofsmokers
andp
ns
isthemeanmineralcontentforchildrenofnonsmokers.

(c)
> var . pool ed=( ( 77- 1) *0. 026^2+( 161- 1) *0. 025^2) / ( 77+161- 2)
> var . pool ed
[ 1] 0. 0006414237
> sd. pool ed=sqr t ( var . pool ed)
> sd. pool ed
[ 1] 0. 02532634
> zcr i t =qnor m( . 975)
> zcr i t
[ 1] 1. 959964
> x1bar =0. 098; x2bar =0. 095
> n1=77; n2=161
> abs( x1bar - x2bar ) >zcr i t *sd. pool ed*sqr t ( 1/ n1+1/ n2)
[ 1] FALSE

DonotrejectE
0
.

11.413:
(a)
> at t ach( bed)
> summar y( bed80)
Mi n. 1st Qu. Medi an Mean 3r d Qu. Max.
2. 700 3. 750 4. 500 4. 557 5. 100 7. 400
> summar y( bed86)
Mi n. 1st Qu. Medi an Mean 3r d Qu. Max.
2. 400 3. 400 4. 200 4. 233 4. 850 7. 700
> boxpl ot ( bed80, bed86)

(b)
> t . t est ( bed80, bed86, var . equal =T)

Two Sampl e t - t est

dat a: bed80 and bed86
t = 1. 5396, df = 100, p- val ue = 0. 1268
al t er nat i ve hypot hesi s: t r ue di f f er ence i n means i s not equal t o 0
95 per cent conf i dence i nt er val :
- 0. 09337022 0. 74042905
sampl e est i mat es:
mean of x mean of y
4. 556863 4. 233333

> wi l cox. t est ( bed80, bed86, conf . i nt =T)

Wi l coxon r ank sumt est wi t h cont i nui t y cor r ect i on

dat a: bed80 and bed86
W= 1576, p- val ue = 0. 06544
al t er nat i ve hypot hesi s: t r ue l ocat i on shi f t i s not equal t o 0
95 per cent conf i dence i nt er val :
- 3. 647345e- 05 7. 000504e- 01
sampl e est i mat es:
di f f er ence i n l ocat i on
0. 3999839

(c)
> t . t est ( bed80- bed86)

One Sampl e t - t est

dat a: bed80 - bed86
t = 6. 8721, df = 50, p- val ue = 9. 513e- 09
al t er nat i ve hypot hesi s: t r ue mean i s not equal t o 0
95 per cent conf i dence i nt er val :
0. 2289696 0. 4180892
sampl e est i mat es:
mean of x
0. 3235294

> wi l cox. t est ( bed80- bed86)

Wi l coxon si gned r ank t est wi t h cont i nui t y cor r ect i on

dat a: bed80 - bed86
V = 1196. 5, p- val ue = 5. 683e- 07
al t er nat i ve hypot hesi s: t r ue l ocat i on i s not equal t o 0

(d)Notthesameconclusion.Pairedsampletestresultishighlysignificant,independentsampletest
resultisnotsignificant.
(e)Inyellowabove.

11.414:
(a)

Seemsapproximatelynormal.
(b)
> t . t est ( sbp~sex, var . equal =T)

Two Sampl e t - t est

dat a: sbp by sex
t = - 0. 6072, df = 98, p- val ue = 0. 5451
al t er nat i ve hypot hesi s: t r ue di f f er ence i n means i s not equal t o 0
95 per cent conf i dence i nt er val :
- 5. 972771 3. 174070
sampl e est i mat es:
mean i n gr oup M mean i n gr oup F
46. 46429 47. 86364

> wi l cox. t est ( sbp~sex, conf . i nt =T)

Wi l coxon r ank sumt est wi t h cont i nui t y cor r ect i on

dat a: sbp by sex
W= 1207. 5, p- val ue = 0. 8675
al t er nat i ve hypot hesi s: t r ue l ocat i on shi f t i s not equal t o 0
95 per cent conf i dence i nt er val :
- 4. 999954 4. 000017
sampl e est i mat es:
di f f er ence i n l ocat i on
- 6. 763696e- 06

Noevidenceofanydifference.

Das könnte Ihnen auch gefallen