I have 400,000 rows, each with an id, number of trials, and number of successes.
I have (one) value for p, a hypothesized probability of success.
I'd like to calculate an exact, binomial, one-sided p-value for each row, using its trials successes, and the global p.
E.g.,
1001 10 2
should give me
1001 10 2 2.639011e-01 for the probability of 2 successes or more.
I'd prefer a solution in SAS, but SPSS is also useful.
Thanks!