Hi everybody, I can calculate BINOM.DIST with the PDF function in SAS, but I'm looking for the equivalent of the BINOM.DIST.RANGE function. Let me give you an example; DATA Have;
Length Bucket 8 Obs 8 Defaults 8 Avg_PD 8 ;
Infile Datalines Missover Dlm=",";
Input Bucket Obs Defaults Avg_PD;
Format Avg_PD Percent8.2;
Datalines;
1,300,5,0.01
2,1000,20,0.02
3,2000,80,0.04
4,2000,100,0.05
5,2000,150,0.07
6,1000,80,0.08
7,800,100,0.12
8,200,20,0.14
;
DATA WANT;
SET HAVE;
DR=Defaults/Obs;
PValue=PDF('BINOMIAL',Defaults/*number of successes*/,DR /*probability of success*/,Obs/*number of trails*/);
Run; I'm trying to get the same results in SAS as in the Excel table below. Bucket Obs Defaults Avg PD DR P-Value 1 300 5 1,0% 1,7% 18,39% 2 1000 20 2,0% 2,0% 53,06% 3 2000 80 4,0% 4,0% 51,58% 4 2000 100 5,0% 5,0% 51,43% 5 2000 150 7,0% 7,5% 20,14% 6 1000 80 8,0% 8,0% 51,67% 7 800 100 12,0% 12,5% 34,73% 8 200 20 14,0% 10,0% 96,33% PValue = =BINOM.DIST.RANGE(Obs;AvgPd;Defaults;Obs) Your help is greatly appreciated; thanks in advance.
... View more