1
$\begingroup$

I have two PDFs given by:

fS1[x_?NumericQ] := PDF[NormalDistribution[1, 0.05], x];
FS1[x_?NumericQ] := CDF[NormalDistribution[1, 0.05], x];

fS2[x_?NumericQ] := 
  PDF[GumbelDistribution[1 - EulerGamma*0.25*6^0.5/Pi, 0.25*6^0.5/Pi],
    x];
FS2[x_?NumericQ] := 
  CDF[GumbelDistribution[1 - EulerGamma*0.25*6^0.5/Pi, 0.25*6^0.5/Pi],
    x];

And I want to compute the combined CDF:

FS12[x_?NumericQ] := NIntegrate[fS1[y]*FS2[x - y], {y, -Infinity, +Infinity}]
NIntegrate[FS12[x], {x, -Infinity, +Infinity}]

But the output I get is:

 NIntegrate::inumr: The integrand FS[x] has evaluated to non-numerical values for all sampling points in the region with boundaries {{0.,3.67005*10^28}}.

So I'm still struggling with FS12. Any additional ideas?

$\endgroup$
5
  • 1
    $\begingroup$ You'll need to change all of the instances of [x]= to [x_]:= and Integrate to NIntegrate. $\endgroup$
    – JimB
    Mar 2, 2020 at 4:55
  • 1
    $\begingroup$ FS12 appears to be a CDF rather than a PDF. $\endgroup$
    – JimB
    Mar 2, 2020 at 5:31
  • $\begingroup$ @JimB Thank you! I also used ?NumericQ but I still get an error... $\endgroup$
    – jpcgandre
    Mar 2, 2020 at 5:46
  • 1
    $\begingroup$ Quick experiment. Instead of your last NIntegrate do this Table[Print[{z,FS12[z]}],{z,-100,-50,5}]; and see what you get. Then think about why you would get that. $\endgroup$
    – Bill
    Mar 2, 2020 at 6:07
  • $\begingroup$ @Bill you are correct! When I constrained the ranges of integration the problem was solved! Thank you!! $\endgroup$
    – jpcgandre
    Mar 2, 2020 at 18:51

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.