0
$\begingroup$

enter image description here I want to plot density function graphs of Ailamujia distribution pdf and acd on mathematica software .

$\endgroup$
2
  • 1
    $\begingroup$ Why does n appear in (1) but not in (2)? And why is it a free variable in (1)? $\endgroup$ – m_goldberg Jan 18 '20 at 14:08
  • 5
    $\begingroup$ Please post your attempts at Mathematica code. $\endgroup$ – JimB Jan 18 '20 at 14:09
3
$\begingroup$
Clear["Global`*"]

Define the distribution using ProbabilityDistribution

AilamujiaDistribution[θ_] = ProbabilityDistribution[
   4*x*θ^2*E^(-2*θ*x), {x, 0, Infinity},
   Assumptions -> {θ > 0}];

Then the distribution can be used like the built-in distributions.

dist = AilamujiaDistribution[θ];

PDF[dist, x]

(* Piecewise[{{(4*x*θ^2)/E^(2*x*θ), 
       x > 0}}, 0] *)

Plot3D[PDF[dist, x], {x, 0, 5}, {θ, 0, 2},
 PlotRange -> All,
 PlotPoints -> 25,
 MaxRecursion -> 5,
 AxesLabel -> (Style[#, 14, Bold] & /@ {x, θ, PDF})]

enter image description here

CDF[dist, x]

(* Piecewise[
   {{(-1 + E^(2*x*θ) - 2*x*θ)/
         E^(2*x*θ), x > 0}}, 0] *)

Plot3D[CDF[dist, x], {x, 0, 5}, {θ, 0, 2},
 PlotRange -> All,
 PlotPoints -> 25,
 MaxRecursion -> 5,
 AxesLabel -> (Style[#, 14, Bold] & /@ {x, θ, CDF})]

enter image description here

Mean[dist]

(* 1/θ *)

Variance[dist]

(* 1/(2 θ^2) *)

StandardDeviation[dist] //
 Simplify[#, DistributionParameterAssumptions[dist]] &

(* 1/(Sqrt[2] θ) *)

EDIT: This distribution is equivalent to GammaDistribution[2, 1/(2θ)]

PDF[dist, x] === PDF[GammaDistribution[2, 1/(2 θ)], x]

(* True *)
$\endgroup$
1
$\begingroup$

Although I have the same question as @m_goldberg, you may try the following code to play with. You can play with different values of eta in f[x_]:

ClearAll[f, F, tet, eta];
Manipulate[
 f[x_] := 4 x tet^2 Exp[-2 tet eta];
 F[x_] := 1 - (1 + 2 tet x) Exp[-2 tet x];
Plot[{f[x], F[x]}, {x, 0, 1}],
{eta, 0, 10},
{tet, 0, 10}
]
$\endgroup$

Your Answer

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

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