Prev: Fueling your car with natural gas from home
Next: subseting inquiry data set CO to get matches and nomatches with reference data set EA
From: MCIPERF on 22 Jun 2010 08:41 I have 400,000 rows, each with two integer fields: total trials and total successes. For some probability p, I would like to calculate for each row the one- sided p value associated with its trials and successes, for the common value of p. E.g., if p = .1, trials = 10, successes = 11, what is the probability that a result of 11 of more success occurs by chance? The output data set set should look like "total trials" "total successes" "one-sided p-value" Thanks! Gerry
From: Reeza on 22 Jun 2010 17:24
On Jun 22, 5:41 am, MCIPERF <gerard.bl...(a)gmail.com> wrote: > I have 400,000 rows, each with two integer fields: total trials and > total successes. > > For some probability p, I would like to calculate for each row the one- > sided p value associated with its trials and successes, for the common > value of p. > > E.g., if p = .1, trials = 10, successes = 11, what is the probability > that a result of 11 of more success occurs by chance? > > The output data set set should look like > > "total trials" "total successes" "one-sided p-value" > > Thanks! > > Gerry Look at either cdf or pdf functions with the binomial selection. See: http://support.sas.com/documentation/cdl/en/lrdict/63026/HTML/default/viewer.htm#/documentation/cdl/en/lrdict/63026/HTML/default/a000208980.htm Also, can you have 11 successes with only 10 trials? SAS will return 1, but I'd question my data. |