(Total Views: 578)
Posted On: 06/12/2020 8:29:49 AM
Post# of 148908
CDF[BetaBinomialDistribution[7.5, 19.5 , 13], 0]
havasu78, the problem with your p-value calculation is that it assumes that 7/26 is the probability of survival for "placebo patients" in general instead of just being an estimate of the survival based on a (small) sample of patients.
But your idea can be simply turned into a good test if you treat the 7/26 as a sample statistic rather than a population parameter. This sounds technical and hard but it is actually straightforward and easy to calculate in Wolfram Alpha. The theory: If you assume a Jeffreys prior for the binomial p, the posterior is distributed as beta(x + 0.5, n - x + 0.5), where x is the mortality for placebo patients and n is total placebo patients. Then, the p-value would be the probability that mortality in the treated patients would be less than or equal to what was observed give that the binomial p is distributed as beta(x + 0.5, n - x + 0.5).
The practice: Translating that into an easy Wolfram Alpha language, copy and paste the following expression:
CDF[BetaBinomialDistribution[x + 0.5, n - x + 0.5 , m], y]
into Wolfram Alpha after plugging in x = the number of placebo fatalities, n = total placebo patients, m = number of treatment patients, and y = number of treatment fatalities. For non-small values of x and y, this will give you p-values that should match pretty well p-values from the difference of proportions test you were looking at before and from logistic regression or the Mantel Haenszel test, BUT it doesn't fall apart as x gets small, working just fine even when x = 0.
havasu78, the problem with your p-value calculation is that it assumes that 7/26 is the probability of survival for "placebo patients" in general instead of just being an estimate of the survival based on a (small) sample of patients.
But your idea can be simply turned into a good test if you treat the 7/26 as a sample statistic rather than a population parameter. This sounds technical and hard but it is actually straightforward and easy to calculate in Wolfram Alpha. The theory: If you assume a Jeffreys prior for the binomial p, the posterior is distributed as beta(x + 0.5, n - x + 0.5), where x is the mortality for placebo patients and n is total placebo patients. Then, the p-value would be the probability that mortality in the treated patients would be less than or equal to what was observed give that the binomial p is distributed as beta(x + 0.5, n - x + 0.5).
The practice: Translating that into an easy Wolfram Alpha language, copy and paste the following expression:
CDF[BetaBinomialDistribution[x + 0.5, n - x + 0.5 , m], y]
into Wolfram Alpha after plugging in x = the number of placebo fatalities, n = total placebo patients, m = number of treatment patients, and y = number of treatment fatalities. For non-small values of x and y, this will give you p-values that should match pretty well p-values from the difference of proportions test you were looking at before and from logistic regression or the Mantel Haenszel test, BUT it doesn't fall apart as x gets small, working just fine even when x = 0.
(1)
(0)
Scroll down for more posts ▼