1Each participant contributes a pretest and a posttest: participants and time of
measurement are crossed and therefore time is a within-subjects factor
DATA;
INPUT PRE 1-3 POST 5-7;
D = POST - PRE;CARDS;
2.6 2.5
4.6 5.7
8.9 9.3
5.5 6.7
1.9 1.5
6.2 7.8
4.6 4.7
5.6 5.9
6.9 7.3
6.6 7.0
proc print double;
proc means maxdec=3;
var pre post;proc means n mean std t prt maxdec=3 lclm uclm;
var D;
proc corr;
proc corr calculates r, which isvar pre post;
required for the CI on the effectrun;quitsize2The MEANS Procedure
VariableNMean
Std Dev
MinimumMaximumƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
PRE
105.340
2.054
1.900
8.900
POST
105.840
2.388
1.500
9.300
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
The MEANS Procedure
Analysis Variable : D
Lower 95%
Upper 95%
NMean
Std Dev t Value Pr > |t|
CL for Mean
CL for Meanƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
100.500
0.620
2.55
0.03120.056
0.944ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
Note that the standard deviation of D is equal toS12  S22  2 S1S 2 r  2.0542  2.3882  2  2.054  2.388 .972  ,where .972 is the correlation between the pre and post variables.

3The SAS System
809:06 Wednesday, January 18, 2012
The CORR Procedure
2

Variables:PREPOST

Simple Statistics
Variable

NMean

Std Dev

SumMinimum

Maximum

PRE
POST

1010

5.34000
5.84000

2.05383
2.38849

53.40000
58.40000

1.90000
1.50000

8.90000
9.30000

Pearson Correlation Coefficients, N = 10
Prob > |r| under H0: Rho=0PRE

POSTPRE

1.00000

0.97223<.0001POST

0.97223<.00011.00000

4This program computes an approximate CI for the effect size in a within-subjects designwith two groups.
m2 and m1 are the means for the two groups
s1 and s2 are the standard deviations for the two groups
n1 and n2 are the sample sizes for the two groups
r is the correlationprob is the confidence level;data;
m1=5.84;m2=5.34 ;s1=2.388 ;
s2=2.054 ;r= .97223 ;n=10;
prob=.95 ;v1=s1**2;
v2=s2**2;s12=s1*s2*r;
se=sqrt((v1+v2-2*s12)/n);pvar=(v1+v2)/2;
nchat=(m1-m2)/se;
es=(m1-m2)/(sqrt(pvar));df=n-1;
ncu=TNONCT(nchat,df,(1-prob)/2);
ncl=TNONCT(nchat,df,1-(1-prob)/2);
ul=se*ncu/(sqrt(pvar));ll=se*ncl/(sqrt(pvar));output;proc print;
title1 'll is the lower limit and ul is the upper limit';
title2 'of a confidence interval for the effect size';var es ll ul ;run;

5quit;ll is the lower limit and ul is the upper limit of a confidence interval for the effect
size
Obs
1

es
0.22449ll
0.019549

ul0.42040

6
1.
2.

1=Post2=PreH 0 : 1  2  0D  Y1  Y2  Post  Pre

H1 : 1  2  0

H1 :  D  0

H 0 : D  0t , n 1  t.05,101  1.833
t distribution: n-1=90.3

0.2

0.1-3

3.

t



-2-1

critical value=1.833

1Y1  Y2S  S  2S1 S2 rn
5.84  5.34
21222.0542  2.3882  2  2.054  2.388 .972 n 2.55alpha=.05

23t

t

DS D2n.5.6202
10 2.55

7Prob  t  .0312

4.

Sign of Y1  Y2 and hypothesized sign of 1  2 are the same, sop

11Prob  t   .0312   .0156
22t distribution: n-1=90.3
t=2.550.2

p=.0156

0.1-3

5.

-2-1

1

2

3

Reject H 0
We can conclude that the population posttest mean is larger than thepopulation pretest mean

6.

7.

Y  Y    t12

 5.84  5.34  / 2, n 1  S  S n 2S S r 

212212

 S2 D   t / 2, n 1   D  n  .6202 D   2.262   10 


 2.0542  2.3882  2  2.054  2.388 .972  2.262
10

.057, .944
We are 95% confident that the population mean difference between the posttest and pretest
mean is between 1 tenth of a point and 9 tenths of a point.
This seems like a narrow range.

88.
S12  S 22
22.0542  2.3882
 4.960
2Y Yd 1 2SPS P2 



5.84  5.34
4.960

 .224

.02,.42 We are 95% confident that Cohen’s effect size is between .02 (an almost non-existenteffect and .42 (an almost medium effect). The interval for the effect size seems
somewhat wide.