Skip to Main Content
Statistical Programming in SAS
book

Statistical Programming in SAS

by John Bailer
April 2015
Intermediate to advanced content levelIntermediate to advanced
460 pages
14h 45m
English
SAS Institute
Content preview from Statistical Programming in SAS
372 Statistical Programming in SAS
Display 10.15 (continued)
MPRINT(TRAP_AREA_Z): low = 0;
MPRINT(TRAP_AREA_Z): high = 1.96;
MPRINT(TRAP_AREA_Z): incr = (high-low)/( 10 -1);
MPRINT(TRAP_AREA_Z): pi = arcos(-1);
MPRINT(TRAP_AREA_Z): do i= 1 to 10;
MPRINT(TRAP_AREA_Z): x_value[i] = low + incr*(i-1);
MPRINT(TRAP_AREA_Z): f_value[i] = (1/sqrt(2*pi))*exp(-x_value[i]*x_value[i]/2);
MPRINT(TRAP_AREA_Z): if i=1 or i=10 then trapsum = trapsum + f_value[i]/2;
MPRINT(TRAP_AREA_Z): else trapsum = trapsum + f_value[i];
MPRINT(TRAP_AREA_Z): end;
MPRINT(TRAP_AREA_Z): area_est = trapsum*incr;
MPRINT(TRAP_AREA_Z): output;
MPRINT(TRAP_AREA_Z): put "est. P(0 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Elementary Statistics Using SAS

Elementary Statistics Using SAS

Sandra D. Schlotzhauer

Publisher Resources

ISBN: 9781607645047