How to define new likelihood by myself using pymc3

I’m using pymc3 to process some experimental data.I need to define a likelihood by myself to remove background signal.But I don’t know how. I want to define a new likelihood, The expression of likelihood is,which is a sum of a series of normal likelihood, they have different mu and their sigma are same.
The expression of the posterior is
I don’t know how to define a likelihood like that.If I use CustomDist to define it, which kind of Generator Function should I choose?If there are other ways to achieve this?I’m a new user of pymc3, so any advice is helpful.

Can you generate simulated data that mirrors the sum of a series of normals? That’s sometimes a good place to begin.

1 Like