BookmarkSubscribeRSS Feed
Demographer
Pyrite | Level 9

Hi,

I wonder under a data statement, there is a function equivalent to NORM.DIST from Excel (which returns the non-cumulative probability of x giving an average and a SD). 

For instance, for an average of 26 and a SD is 10, I want the variable prob the value 0.001752 if x=1, 0.002239 if x=2, etc.

1 REPLY 1
ballardw
Super User

It looks like you want the PDF function. Example:

data example;
   input x;
   p2 = pdf('normal',x,26,10);
datalines;
1
2
3
26
;

'normal' is the name of the distribution. SAS will work with a number of distributions. X is the value of interest and the next parameters are the mean and standard deviation. If you leave off the mean and standard deviation SAS will use 0 and 1.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1751 views
  • 0 likes
  • 2 in conversation