Chapter Contents

Previous

Next
The FREQ Procedure

Example 3: Computing Binomial Proportions for One-Way Frequency Tables


Procedure features:
PROC FREQ statement option:
ORDER=
TABLES statement options:
ALPHA=
BINOMIAL
WEIGHT statement
Data set: COLOR

This example


Program

options nodate pageno=1 linesize=80 pagesize=40;
 



 Note about code
proc freq data=color order=freq;
   weight count;
 Note about code
   tables eyes/binomial alpha=.1;
 Note about code
   tables hair/binomial(p=.28);
 Note about code
   title 'Hair and Eye Color of European Children';
run;


Output
The frequency table lists the variable values in the order of the descending frequency count. PROC FREQ computes the binomial proportion for the first variable level. The report includes the asymptotic standard error (ASE), and asymptotic and exact confidence limits for the binomial proportion. The specified confidence level of .1 results in 90 percent confidence limits.

Because the value of Z is less than zero for eye color, PROC FREQ computes a left-sided p-value. The small p-value supports the alternative hypothesis that the true value of the proportion of children with brown eyes is less than 50 percent.

Because the value of Z is greater than zero for hair color, PROC FREQ computes a right-sided p-value. The large p-value provides insufficient evidence to reject the null hypothesis that the proportion of children with fair hair equals 28 percent.

[HTML Output]
 [Listing Output]


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.