BookmarkSubscribeRSS Feed
Maury_Hull
Calcite | Level 5

I am trying to compute the percentage of a normal population with unknown mean and unknown variance which lies outside of specified limits at a specified level of confidence. The SAS software computes the tolerance interval which gives the limits of a speficied percentage of the population at a specified level of confidence but does not seem to do the reverse as best as I can tell. Also in my case, the limits are an input and the percentage of the population is an output. Can anyone provide guidance on making this computation correctly. 

4 REPLIES 4
Rick_SAS
SAS Super FREQ

I haven't computerd tolerance intervals myself, but it looks like if you have SAS/QC software, you can use the INTERVALS statement in PROC CAPABILITY to obtain tolerance intervals. Looks like METHOD=3 is what you want?

 

If you don't have SAS/QC, the documentation gives the formula in terms of the sample mean (xbar), sample standard deviation (s), sample size (n), the proportion (p), and the significance level (alpha).You can use the DATA step to implement the formula by using the QUANTILE function, which computes percentiles (=quantiles) of standard distribution.  For example, the quantity

z = quantile("normal", (1+p)/2);

gives the quantile for the standard normal distribution with parameter (1+p)/2.  Similarly,

chi2 = quantile("chisq", alpha, n-1);

gives the quantile for the chi-square distribution with df=n-1.

 

Thus if you know the sample statistics, then I think the following DATA step gives you what you want, or at least will point you in the right direction:

 

data limits;
/* input sample statistics and parameters */
xbar = 0;
s = 1;
n = 50;
p = 0.95;
alpha = 0.05;
/* compute Lower & Upper tolerance limits using QC formula */
z = quantile("normal", (1+p)/2);
chi2 = quantile("chisq", alpha, n-1);
delta = s*z*(1 + 1/(2*n))*sqrt( (n-1)/chi2 ); 
Lower = xbar - delta;
Upper = xbar + delta;
run;

proc print;run;

Maury_Hull
Calcite | Level 5
Many thanks for your reply. However I am not interested in computing a tolerance interval but rather the percentage of the population that exceeds a specified limit to a specified level of confidence.
Rick_SAS
SAS Super FREQ

Please provide data and expected output. Also a reference or example would be nice.

ScottNLong
Fluorite | Level 6

Presumably the limits were computed based on n samples: something like xbar +/- k(n,1-alpha,p)*s, where k-is a 2-sided tolerance factor (or 2-sided equal tailed tolerance factor) based on n samples, 1-alpha confidence, and p is minimum proportion of population captured by the interval.  Then no more than 1-p is outside the interval with 1-alpha confidence.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 3294 views
  • 2 likes
  • 3 in conversation