A computer implemented method, computer program product, and data processing system for performing analysis on a plurality of data stored in a database. In an illustrative method, a first cohort is generated from the plurality of data. An optimal control cohort is generated from the plurality of data. Generating is performed based on the first cohort and at least one constraint, and a mathematical process is used to derive the optimal control cohort. A first inference is generated based on a comparison of the first cohort to the optimal control cohort, wherein the first inference is absent from the database. In an illustrative example, the first inference is stored.