# Tag Info

2

A PDF is not a distribution. To convert a PDF to its associated distribution use ProbabilityDistribution Clear[λ, pb, Ps, μ] f[h_] := 1/Gamma[m]*(m/P)^m*h^(m - 1)*Exp[-(m*h)/P]; m = 1; P = 1; α = 4; δ = 2/α; int = Assuming[{A > 0, r > 0, λ > 0}, Integrate[(1 - Exp[-x*h*r^(-1/δ)])*pb*λ*π, {r, A, Infinity}, GenerateConditions -> False]] ...

2

This is an extended comment. f[h] as defined while clearly a probability density function is not of the type of function that Expectation expects. Consider the difference between the two functions f and g below: f[h_] := 1/Gamma[m]*(m/P)^m*h^(m - 1)*Exp[-(m*h)/P] (* Head *) Head[f] (* Symbol *) (* PDF *) f[h] (* (E^(-((h m)/P)) h^(-1 + m) ...

2

@wolfies essentially gave you the answer in your original question where he wrote PDF[TransformedDistribution[x^2, x \[Distributed] RiceDistribution[v, Sqrt[α/2]]], y] Just change PDF to CDF (and avoid the use of I as @MarcoB recommended): CDF[TransformedDistribution[x^2, x \[Distributed] RiceDistribution[v, Sqrt[α/2]]], y]

1

If your distribution comes from some data, then the roughness of the distribution may cost you problems. For example data = RandomVariate[BinormalDistribution[.75], 10^5]; dist = HistogramDistribution[data] ContourPlot[ Evaluate@PDF[dist, {x, y}], {x, -4, 4}, {y, -4, 4}] You can change the bin size to make it smoother dist = ...

2

Your code does work as expected with e.g. a bivariate standard distribution: ContourPlot[ PDF[BinormalDistribution[0.5], {x, y}], {x, -3, 3}, {y, -3, 3}, PlotRange -> All, PlotPoints -> 50, PlotLegends -> Automatic ] Similarly, data = RandomReal[{-10, 10}, {20, 2}]; ContourPlot[ PDF[HistogramDistribution[data], {x, y}], {x, y} ∈ ...

2

It should be mentioned at this juncture that ExtremeValueDistribution[] is built-in; up to a normalizing factor, your distribution is equivalent to ExtremeValueDistribution[q, 1/η]. Thus, PDF[ExtremeValueDistribution[q, 1/η], x] // Simplify E^(-E^((q - x) η) + (q - x) η) η SurvivalFunction[ExtremeValueDistribution[q, 1/η], t] // Simplify 1 - E^-E^((q ...

1

Update: You can replace the vector of PDFValues (i.e., Part (2,1)) of the DataDistribution object returned by HistogramDistribution with a vector that has the same length and sum. data1 = RandomVariate[NormalDistribution[], 100]; D1 = HistogramDistribution[data1]; D2 = D1; D2[[2, 1]] = N@Total[D1["PDFValues"]] Normalize[RandomInteger[10, ...

6

I think because of your parameters it's having a hard time inferring convergence / continuity conditions. For instance, the integral diverges when $\eta < 0$. You can specify assumptions and get the result: Integrate[E^(-η(x - q) - E^(-η(x - q))), {x, t, ∞}, Assumptions -> η > 0] (1 - E^-E^((q - t)η))/η Side note, Mathematica has no problem ...

6

This question was largely dealt with in the comments. I post this for illustrative purposes (but mainly fun): The following shows use of PoissonProcess and its use with RandomFunction, Expectation, Probability. The last line is probability at t=6 that there had been only 1 customer for rate 5/hour: pp = PoissonProcess[5]; rf = RandomFunction[pp, {0, 6}, ...

2

Thanks for the solution, J.M. (* create an example pdf *) f[x_] := Exp[-x^4 + x^2]; normf = NIntegrate[f[x], {x, -Infinity, Infinity}]; p[x_] = f[x]/normf; Plot[p[x], {x, -2, 2}] (* How to generate samples from p[x] *) pd = ProbabilityDistribution[p[x], {x, -Infinity, Infinity}]; d = RandomVariate[pd, 100000]; Histogram[d, 100]

3

Mathematica makes distinction between $X$ and $\{X\}$ by design: dist = MultivariateHypergeometricDistribution[k, Range@5]; {MarginalDistribution[dist, {1}], MarginalDistribution[dist, 1]} { TransformedDistribution[{[FormalX]}, [FormalX] [Distributed] HypergeometricDistribution[k, 1, 15]], HypergeometricDistribution[k, 1, 15]} ...

3

d1 as defined does not evaluate as the distribution is univariate and you are asking it to be bivariate. You could use TransformedDistribution[ x + y, {x, y} \[Distributed] DiscreteUniformDistribution[{{1, 6}, {1, 6}}]]

4

This is an unusual and interesting question. This is a bit obscured by the many parameters that make it difficult to see the wood for the trees. Short Answer Your first pdf, which has the DiracDelta function, is a mixed discrete / continuous random variable. To make this clear, if say $r = 1$, $t = 1$ and $T = 2$, then your mixed pmf/pdf f1 is: f1 = ...

6

Per my comment. Assume things not defined here were as in your example: myDist = TruncatedDistribution[truncate, MultinormalDistribution[{a, b, c, d, e, f, g, h}, covariancematrix]]; myPDF[{a_, b_, c_, d_, e_, f_, g_, h_}, {i_, j_, k_, l_, m_, n_, o_, p_}] = N@PDF[myDist, {i, j, k, l, m, n, o, p}]; Just call myPDF with the lists of current ...

3

If your real covariance matrix is the identity matrix, then all 8 of the random variables are independent and there's no need for the overhead of dealing with a general structure for a multivariate normal. You can construct the truncated distributions separately, generate a random sample from each, and then multiply the 8 probability densities together. ...

2

I agree with the comments. I am uncertain what the aim is, so I apologize if this is unhelpful. I only post to motivate clarification. If the aim is a marginal of mixture of binormals: m1 = MultinormalDistribution[{3, 3}, {{0.5, 0}, {0, 0.5}}]; m2 = MultinormalDistribution[{6, 6}, {{0.6, -0.5}, {-0.5, 0.6}}]; m3 = MultinormalDistribution[{6, 6}, {{1, 0.5}, ...

Top 50 recent answers are included