2
$\begingroup$

I would like to integrate the function so that I know the probability between values between 0 and 90000

MixtureDistribution[{0.43999526215889906`, 
   0.5600047378411006`}, {NormalDistribution[58745.18201580311`, 
    15134.735419294597`], 
   NormalDistribution[78262.1217564796`, 2797.225012305396`]}];
$\endgroup$

2 Answers 2

10
$\begingroup$

So given distribution:

dis=MixtureDistribution[
{0.43999526215889906`,0.5600047378411006`},
{NormalDistribution[58745.18201580311`,15134.735419294597`],
NormalDistribution[78262.1217564796`,2797.225012305396`]}];

with the PDF:

Plot[PDF[dis, x], {x, 0, 10^5}, PlotRange -> All,PlotTheme -> "Detailed"]

enter image description here

You can compute probability via built in function:

In[]:= Probability[0<=x<=90000,x\[Distributed]dis]
Out[]= 0.991409

which is the same as:

In[]:= NIntegrate[PDF[dis,x],{x,0,90000}]
Out[]= 0.991409
$\endgroup$
1
  • $\begingroup$ Thank you for answer. $\endgroup$ Commented Jan 12, 2020 at 15:49
5
$\begingroup$

This is a quite standard way.

a[t_?NumericQ] :=  CDF[MixtureDistribution[{0.43999526215889906`, 
0.5600047378411006`}, {NormalDistribution[58745.18201580311`, 
 15134.735419294597`], NormalDistribution[78262.1217564796`, 2797.225012305396`]}], t]
a[90000] - a[0]

0.991409

$\endgroup$
1
  • $\begingroup$ Thank you for answer. $\endgroup$ Commented Jan 12, 2020 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.