View Full Version : what is the sas command for


umf
05-08-2009, 02:45 PM
what is the sas command for P(1<Z<2) ?
I tried to do it this way:
data z;
normprob=probnorm(z<2);
normprob=probnorm(z>1);
x=probnorm(z<2) - probnorm(z>1);
output;
run; quit;
proc print data=z;
var x normprob;
run;quit;

and this is the result I got:
Obs x normprob

1 0.34134 0.5

Mean Joe
05-14-2009, 03:08 PM
Try this:
data z;
upper=probnorm(2); *P(Z<2);
lower=probnorm(1); *P(Z<1);
x = upper - lower; *P(1<Z<2);
output;
run;quit;

proc print data=z;
var x;
run;quit;

umf
05-19-2009, 02:15 PM
thank you so much