This super wonkish post will serve as convenient basket case for all the inglorious math that will be required for a series of more Evindence Based Medicine oriented posts. A result that will be repeatedly required in these posts is an expression for the probability that one random variable is smaller (or larger) than a Beta random variable. The necessity for this result is due to the ability of the Beta distribution to quantitate beliefs about the percentages or proportions of dichotomous outcomes , having observed “successes” and “failures”. So if one had just read about the *efficacy* () of an intervention in a Randomized Controlled Trial (RCT), the Beta distribution would be a readily available candidate to summarize the uncertainty about the efficacy as where is the proportion of responders and the number of study participants. In this context, a skeptic may not only adopt the justifiable position that the real world *effectiveness* of the intervention is less than the one reported in the RCT setting but also would even desire a numerical/probabilistic estimate of his scepticism. Similarly, the skeptic may want to use data about the adverse events in the aforementioned trial to give a lower bound on the adverse events that he or she will observe in everyday practice, arguing that the later rate should be larger than the one reported in the context of a controlled clinical experiment. In both cases the need to calculate the probability that a “real world” proportion is is smaller or larger than the corresponding one seen in a RCT arises.

Starting from the premise that the real world effectiveness is smaller than , and given the value of “true” efficacy , one could model one’s uncertainty about as . In other words, **when we are given the true value of efficacy we adopt the most agnostic skeptical position possible**: the real world effectiveness can be anywhere from zero (the intervention does not work at all!) up to the maximum possible effectiveness i.e. the trial efficacy. Since the true efficacy is not known (otherwise we would not have performed the RCT!), one needs to average over the uncertainty of efficacy using standard expressions for the conditional, joint and marginal probability:

In the aforementioned expression is the (complete) Beta function (not to be confused with the distribution of the same name) and we have substituted for . Carrying out the integration (and using a touch of special function magic), we arrive at the following expression:

, where is the Regularized Incomplete Beta function (isn’t this a mouthful?). Although this result is an interesting in its own right, as it can be used as the basis for evidence synthesis of data from effectiveness and efficacy studies, its utility is limited by the need to access special function libraries for numerical evaluations. At a more practical note, if one could collapse this probability distribution into a single number, then one could directly compare this figure to the percentage (or fraction of responders) in the RCT. In the case of the later, one would use the mean of the corresponding Beta distribution to summarize results, so that the average of the effectiveness distribution naturally suggests itself for the same purpose.

To arrive at this expression, we compute the mean of the effectiveness distribution by direct integration. By using two integration formulas of the Regularized incomplete Beta function (1, 2) and a transformation formula of the Beta function to arrive at the (remarkably) simple result: .

**Hence, the expected value of a random variable which is smaller than a Beta one is half the expected value of the beta.**

To compute the expected value of a random variable which is larger than a Beta one, we resort to a trick: we reverse the definition of success and failure, in which case the previous result can be directly applied.

Tags: Bayesian, statistics

August 14, 2013 at 12:56 pm |

[…] This blog is about probability and stats as applied to solve patient problems and other stuff! « The probability that one random variable is smaller or larger than a Beta random variable […]

September 2, 2013 at 5:51 pm |

[…] The sceptic, who takes the position that effectiveness is less than efficacy, but cannot (or will not) say by how much. This is similar to the position presented in previous posts in this blog (here, here while the mathematics can be found here) […]