[SciPy-User] Integration from x1 to x2 of normal distribution

Johannes Radinger JRadinger at gmx.at
Fri Apr 8 10:58:26 EDT 2011


-------- Original-Nachricht --------
> Datum: Fri, 8 Apr 2011 09:42:44 -0400
> Von: josef.pktd at gmail.com
> An: SciPy Users List <scipy-user at scipy.org>
> Betreff: Re: [SciPy-User] Integration from x1 to x2 of normal distribution

> On Fri, Apr 8, 2011 at 9:41 AM,  <josef.pktd at gmail.com> wrote:
> > On Fri, Apr 8, 2011 at 9:32 AM, Johannes Radinger <JRadinger at gmx.at>
> wrote:
> >> Hej Scipy-users,
> >>
> >>
> >> it some time ago when I asked you about normal distributions and
> integrations...
> >> ...it's so long ago that I forgot how it worked, so maybe you can help
> me again:
> >>
> >> I have roughly following function of two superimposed
> normaldistributions:
> >>
> >> function = p * Normaldistribution1 + (1-p) * Normaldistribution2
> >>
> >> for each normaldistribution I've got the scale (standard deviation) and
> the mean as a variable (s1, s2, m1, m2).
> >>
> >> Now I want the integral of this function from x1 to x2. How can I do
> that? Can that be solved
> >> with the scipy.stats package?
> >
> > If your two distributions are independent, then it should be (mixture
> > of two normal distributions):
> >
> > cdf(x)  = p*stats.norm.cdf(x, **args1) + (1-p)*stats.norm.cdf(x,
> **args2)
> >
> > prob(x1, x2) = cdf(x2) - cdf(x1)
> >
> > where args are loc and scale for the two distributions
> 
> assuming univariate distributions, multivariate normal would also be
> possible with scipy

Thank you very much for that quick response..

/johannes

> 
> >
> > Josef
> >
> >>
> >>
> >> thank you
> >> /johannes
> >>
> >> --
> >> GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit
> >> gratis Handy-Flat! http://portal.gmx.net/de/go/dsl
> >> _______________________________________________
> >> SciPy-User mailing list
> >> SciPy-User at scipy.org
> >> http://mail.scipy.org/mailman/listinfo/scipy-user
> >>
> >
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user

-- 
GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit 
gratis Handy-Flat! http://portal.gmx.net/de/go/dsl



More information about the SciPy-User mailing list