marloneusa 发表于 2010-8-10 04:07 
data a;
r=7/347;
r_low = cinv(0.025, 2*7)/(2*347);
r_up = cinv(0.975, 2*(7+1))/(2*347);
run;
It is easy if you use R:
poisson.test(7,347)
The CINV function returns the pth quantile from the
chi-square distribution with degrees of freedom df and a noncentrality parameter nc. The probability that an observation from a chi-square distribution is less than or equal to the returned quantile is p. This function accepts a noninteger degrees of freedom parameter df.
If the optional parameter nc is not specified or has the value 0, the quantile from the central chi-square distribution is returned. The noncentrality parameter nc is defined such that if X is a normal random variable with mean

and variance 1, X2 has a noncentral chi-square distribution with df=1 and nc =

2.
CAUTION: For large values of nc, the algorithm could fail; in that case, a missing value is returned.
Note: CINV is the inverse of the PROBCHI function. 