/* newcomb.sas */ /* Newcomb's experiment: one sample t inference */ data newcomb; input time @@; cards; 28 22 36 26 28 28 26 24 32 30 27 24 33 21 36 32 31 25 24 25 28 36 27 32 34 30 25 26 26 25 23 21 30 33 29 27 29 28 22 26 27 16 31 29 36 32 28 40 19 37 23 32 29 24 25 27 24 16 29 20 28 27 39 23 ; /* get confidence interval and test */ proc ttest data=newcomb h0=33.02 ci=none plots (shownull); var time; title 'newcomb example: test H_0: mu = 33.02'; /* check for normality */ proc univariate data=newcomb normal nextrval=5; var time; ods select ExtremeValues BasicMeasures Quantiles TestsForNormality; ods show; title 'summary and Shapiro-Wilk test: Newcomb example';