New answers tagged

3

Following @kglr the sum of squares $A^2+B^2+C^2+D^2$ divided by $\sigma^2$ has a noncentral chisquare distribution with 4 degrees of freedom and noncentrality parameter $\lambda=(\mu_A^2+\mu_B^2+\mu_C^2+\mu_D^2)/\sigma^2$. So the variance of the square root of the sum of squares can be obtained by finding the first and second raw moments: m1 = ...


2

Update: Standard deviation of $(a^2 + b^2 + c^2 + d^2)^{1/2}$ With $ \lambda =( \mu _1^2+\mu _2^2+\mu _3^2+\mu _4^2 ) / \sigma^2$, td = TransformedDistribution[Sqrt@t, Distributed[t, NoncentralChiSquareDistribution[4,λ]]]; FullSimplify[StandardDeviation[td]] FullSimplify[Variance[td]] Original post: Standard deviation of $a^2 + b^2 + c^2 + ...


4

My question, is there a way of determining how close my datatest to a 'pure' Poisson distribution? @JimBaldwin provided an answer for considering the whole dataset (as requested in the question.) Here is proposed a method to evaluate the closeness to Poisson distribution locally using goodness of fit tests. Let us generate the data as shown in the ...


2

Not really an answer ... more like an extended comment that is too long for the comment box. But I found the question interesting, for a number of reasons: I did not know that Mma had a FisherInformation function hidden away where you found it - how DID you find it? Your question actually highlights one of my pet dislikes - which is the naming of ...


1

$Version (* "10.4.1 for Mac OS X x86 (64-bit) (April 11, 2016)" *) dist[m_, s_] = ProbabilityDistribution[ 1/(E^((m - x)^2/(2*s^2))*(Sqrt[2*Pi]*s)), {x, -Infinity, Infinity}, Assumptions -> {s > 0, Element[m, Reals]}]; AppendTo[$ContextPath, "Statistics`Library`"]; (fi1 = FisherInformation[NormalDistribution[m, s]]) // MatrixForm ...


1

I'm going to argue that parameter information and paradise are not lost (until there's a specific counter-example). (* Define some function *) someFun[x_, μ_, σ_, a_, b_, c_] := (a/σ) Exp[-(x - μ)^b/(c σ^2)] (* Define a probability density function that depends on someFun and some yet to be given constants *) myDistribution[μ_, σ_] := ...


12

One possibility is to use a generalized linear model for which Mathematica has the function GeneralizedLinearModelFit. For your potentially Poisson data the observed count $y_i$ given a predictor variable $x_i$ will have a Poisson distribution with mean $\lambda_i$ with $\lambda_i$ being a function of $x_i$. $$y_i|x_i \sim Poisson(\lambda_i) $$ with maybe ...


1

Most recent edit This seems to work (tested exactly what is posted here in a fresh kernel), however it does complain a little. α = 4; μ = 10; k = 1; τ = 1; δ = 1/2; s[r_] := (μ r^α)/Pm f[h_] = FullSimplify[ Exp[2 k] (k + 1)/τ Exp[-k - (k + 1) h/τ] BesselJ[0, Sqrt[4 k (k + 1) h/τ]] ]; int[r_, h_] = Integrate[(1 - Exp[-s[r] Pm h ...


4

Following up on @Karsten 7.'s approach, with a more convenient parameterization of PearsonDistribution (using pieces from PearsonDistribution >> Applications): ClearAll[pearsonD, dis, tdisn, tdisp] pearsonD[μ_, σ_, γ_, κ_] := PearsonDistribution[2 (9 + 6 γ^2 - 5 κ), -12 μ γ^2 - σ γ (3 + κ) + 2 μ (-9 + 5 κ), 6 + 3 γ^2 - 2 κ, -6 μ γ^2 + 4 μ ...


4

TL;DR: There is no PearsonDistribution that matches all characteristics exactly, but there is an infinite number of PearsonDistributions that resemble the given characteristics quite well. The difference between them is their standard deviation. In my personal opinion the information given in the question and its foundation are insufficient to make any ...


3

Variant 1 define distribution_1 (losses) NSolve[Kurtosis[LogNormalDistribution[0, x]] == 12.2, x, Reals] {{x -> -0.579872}, {x -> 0.579872}} LogNormalDistribution[0, 0.5798723392706395`] // Kurtosis 12.2 LogNormalDistribution[0, 0.5798723392706395`] // Skewness 2.14932 dist1 = TruncatedDistribution[ {-\[Infinity], 0}, ...


8

Dirichelet random variates are constructed from gamma random variates. Let $$ v_j \stackrel{\text{iid}}{\sim} \textsf{Gamma}(\alpha_j,1) $$ for $j = 1, \ldots, n$ and set $$ x_j = \frac{v_j}{\sum_{j=1}^n v_j}. $$ Then $x \sim \textsf{Dirichlet}(\alpha)$, where $x = (x_1,\ldots,x_n)$ and $\alpha = (\alpha_1,\ldots,\alpha_n)$. Gamma random variates ...


3

It is certainly not required but usually one writes a weighted sum of probability density functions where the sum of the weights equals 1. In your example the sum of the weights is $\sqrt{\pi}$. One can rewrite the pdf of $X$ as $$f_X(x)={{2m^m x^{2m-1}}\over{\Gamma(m)}}\sum_{i=1}^n w_i h(t_i)$$ with $\sum_{i=1}^n w_i=1$. This makes it more explicit ...


5

After looking at each of the 5 data sets, it does not appear at all that they might have residuals resulting from a single distribution (based on the estimates of mean square error). Why did you think they all had a common error distribution? Is there some theoretical or historical reason? As @AntonAntonov states, quantile regression can be more useful ...


5

This is a naive approach, so I wonder if I am overlooking some complication here; I would have thought that, given the description of your distribution, you could consider the "solid of revolution" generated by rotating the PDF of a normal distribution with the required parameters around the vertical $z$ axis, so something like the following: ...


10

An alternative, and faster, way to generate samples with the desired distribution using TransformedDistribution: ClearAll[distF] distF[r_, σ_] := TransformedDistribution[{(r + d ) Sin[θ], (r + d ) Cos[θ]}, {Distributed[d, NormalDistribution[0, σ]], Distributed[θ, UniformDistribution[{0, 2 Pi}]]}] ListPlot[RandomVariate[distF[5, .5] , ...


7

Sorry for the trouble - I have found a way: data = Table[fTorusRand[5, 0.5], {i, 1, 100000}]; empD1 = SmoothKernelDistribution[data]; ContourPlot[PDF[empD1, {x, y}], {x, -8, 8}, {y, -8, 8}] Gives me what I want: Edit: So using the Jacobian here, I can get an exact PDF. Still messing around with the algebra though: $x = (r+d) \sin(\theta)$ and $y = ...


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) ...


3

@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]



Top 50 recent answers are included