def poissonMixtureIntegral(s, k, a, b, N, whichModel): pDensity = util.poissonDensity(N * s, k) if whichModel == 0: mixDensity = util.logNormalDensity(s, a, b) elif whichModel == 1: mixDensity = util.weibullDensity(s, a, b) f = pDensity * mixDensity return f
def poissonMixtureMoment(s, a, b, momentNumber, whichModel): v0 = 1 - np.exp(-s) if whichModel == 0: myDensity = util.logNormalDensity(s, a, b) else: myDensity = util.weibullDensity(s, a, b) f = np.power(v0, momentNumber) * myDensity return f
def poissonTransformedMixtureMoment(s, a, b, momentNumber, whichModel): vy = -np.log(1 - s) jacobian = np.divide(1, 1 - s) if whichModel == 0: psDensity = util.logNormalDensity(vy, a, b) * jacobian elif whichModel == 1: psDensity = util.weibullDensity(vy, a, b) * jacobian myMoment = (s**momentNumber) * psDensity return myMoment
def getYDensity(y, p1, p2, whichModel, v=0): if whichModel == 0: return util.gaussianDensity(y, 0, 1) elif whichModel == 1: return util.betaDensity(y, p1, p2) elif whichModel == 2: return util.gammaDensity(y, p2, p2) elif whichModel == 3: return util.gaussianDensity(y, 0, 1) elif whichModel == 4: return util.gaussianDensity(y, 0, 1) elif whichModel == 5: return util.weibullDensity(y, p1, p2) elif whichModel == 6: return util.gaussianDensity(y, 0, 1) * util.chi2Density(v, p2)