Calcite | Level 5

## How can I normalize percentages based off number of records?

Hi, my friend asked me the below question but I do not know the answer, could you help me ?

"

I'm doing a basic graph to show the percent of students who graduated within each major. Something like:

etc.

I want to show the majors that have the highest graduation percentages at the top of my graph. However, I want to figure out if there is a way to normalize the percents. What I mean is, some majors are so small they only have 3 students total. So, some majors may have a graduation rate of 66.6%, but really that just means 2 of the 3 students graduated. I want to somehow standardize the percents based off the number of students that make up each percent so that these smaller majors are weighted less. "

6 REPLIES 6
Diamond | Level 26

## Re: How can I normalize percentages based off number of records?

In your example, what is the math that you want to use to do this standardizing?

--
Paige Miller
Calcite | Level 5

## Re: How can I normalize percentages based off number of records?

Hi Paige, to be honest, I do not know the method to do this standardization.......
Diamond | Level 26

## Re: How can I normalize percentages based off number of records?

And to be honest, I don't know either.

--
Paige Miller
Diamond | Level 26

SAS Super FREQ

## Re: How can I normalize percentages based off number of records?

As you and your friend have observed, the uncertainty in an observed proportion depends on the sample size. Majors with few students have bigger uncertainty around their point estimate than majors with many students.

There are two ways to proceed.

The simplest is to add confidence intervals (CIs) to the empirical proportion. You would sort the majors by the empirical proportion of graduates, but the CIs would indicate how confident you are in your computation. A DATA step approach would look like this:

``````data Graduates;
datalines;
A 10 22
B 10 32
C 17 25
D  4  7
E  8 14
F 16 28
G 16 19
;

data Binom;
p = Grads / Total; /* empirical proportion */
StdErr = sqrt(p*(1-p)/Total);
/* use Wald 95% CIs */
z = quantile("normal", 1-0.05/2);
Lower = max(0,  p - z*StdErr);
Upper = min(1,  p + z*StdErr);
label p = "Proportion" Lower="Lower 95% CL" Upper="Upper 95% CL";
run;

proc sort data=Binom;
by p Lower;
run;

proc sgplot data=Binom;
scatter y=Major x=p /
xerrorlower=Lower xerrorupper=Upper;
yaxis discreteorder=data;
xaxis grid;
run;``````

A more sophisticated method is to use funnel plots for proportions or to incorporate the uncertainty into the ranking.

SAS Super FREQ