I have tried to Normalize the below Code PDF with a such Constant K But I didn't succeed , I have used this instruction: mv\[ScriptCapitalD]=ProbabilityDistribution[f[x,\[Mu]], {x, 0, \[Infinity]},Method->"Normalize"]
, But no result .
MY cODE for PDF Here:(The integrand over sigma is about 0.99..), Any help ?
f[z_?NumericQ, \[Mu]_?NumericQ] :=
NIntegrate[
K* Sqrt[Sqrt [ 2]*Pi]/2*Exp[-Sqrt[Sqrt[2]*Pi](z+\[Sigma])^2/\[Mu]*Sqrt[Pi*\[Sigma]]
* Erf[\[Mu](z-\[Sigma])^2/(Sqrt[Pi*\[Sigma]])]], {\[Sigma],1, \[Infinity]}]
pdfF[\[Mu]_?NumericQ] := PDF[ProbabilityDistribution[f[x,\[Mu] ], {x, 0, \[Infinity]}]]
With[{n = 5},
Show[
Plot[
Labeled[pdfF[#1][z], Row[{"\[Mu] = ", Rationalize[#1]}], Above], {z, 0, 5},
PlotRange -> All,
PlotStyle -> #2] &
@@@
Rest[{#, Hue[#]} & /@ Subdivide[0., 1., n]],
ImageSize -> Large]]
With[{n = 5}, NIntegrate[pdfF[#][z], {z, 0, 5}] & /@ (Range[n]/n)]
Plot[Evaluate[f[z_?NumericQ, \[Mu]_?NumericQ] ], {x, 0, 10},{\[Mu],0,1}, AxesOrigin \[RightArrow] {0, 0},
Epilog \[RightArrow] {Dashed, Line[{{0, f[z_?NumericQ, \[Mu]_?NumericQ]}, {10, f[z_?NumericQ, \[Mu]_?NumericQ]}}]}, PlotRange \[RightArrow] {{0, 10}, {0, 1}}]
K
and trim the unnecessary code. Why doesz
only go from 0 to 5? Just executingPlot[f[x, 4], {x, 0, 20}]
(withK=1
) shows some oddities. $\endgroup$NIntegrate
. Using 1 through $\infty$ doesn't allowNintegrate
to work well. I'll add an example as an extended comment. $\endgroup$