[SciPy-User] Integration from x1 to x2 of normal distribution
josef.pktd at gmail.com
josef.pktd at gmail.com
Fri Apr 8 09:42:44 EDT 2011
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
>
> 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
>>
>
More information about the SciPy-User
mailing list