Sample Size Calculation

*
SAMPLE SIZE CALCULATION
How many customer should we randomly select to get significant results?
- Customer Base: 10.000 customer
- Standard Deviation calculated by PROC MEANS
- Probability value: 5%
- Margin of Error: 1 Euro

Detailed Documentation:
 http://www.isixsigma.com/library/content/c000709a.asp

Simulation of Customer Base Table:
 acct_num = Accountnumber
 fee = monthly fee in Euro per customer
;

data customer_base(drop=i);
do i=1 to 10000 by 1;
 acct_num=i;
 fee=
100 + round(25*ranuni(1),1);
 output;
end;
run;

proc means data=customer_base;
 
var fee;
 
title ‘Descriptive Statistics using Proc Means’;
 
output out=customer_statistics;
run;

*store Standard Deviation in macro variable for later calculations: ;
proc sql noprint;
 select fee into :std
 from customer_statistics
 where _stat_=‘STD’
;
quit;

*
Calculation of the sample size:
sample_size = (critical value Z alpha/2 * Standard Deviation of the Population) / margin of the Error)**2
Z alpha/2 is calculated with the Table of Standard Normal Distribution
;
data sample_size;
 sample_size=round(((
1.96 * &std)/1)**2,1);
run;
* In this example a Minimum of 200 customers is needed to get significant results;
 

 

Antwort schreiben