New answers tagged

2

This is an extended comment. Clear["Global`*"] Since you know that you are dealing with the GammaDistribution, you should make use of the built-in functions rather than doing multiple integrals. dist = GammaDistribution[a, 1/l]; To be a valid distribution requires $Assumptions = DistributionParameterAssumptions[dist] (* a > 0 && 1/l > 0 *)...


3

You are working with distributions. Instead of averaging, simply combine the data from multiple graphs before visualizing the distribution. This combines the degrees from 1000 graphs: degs = Join @@ VertexDegree /@ RandomGraph[BarabasiAlbertGraphDistribution[100, 2], 1000]; Visualizing the "CDF from the right" (survival function) only requires ...


8

This becomes quite straight forward if we note that y can be written as the product of x and an independent uniformly distributed random variable u d = Block[{y = x u}, TransformedDistribution[x + y, {x \[Distributed] UniformDistribution[{-1, 1}], u \[Distributed] UniformDistribution[{-1, 1}]}]]; PDF[d, t] // InputForm (* Piecewise[{{Log[2]/4, t =...


5

You can construct any distribution from pdfs of other distributions with ProbabilityDistribution, and Method -> "Normalize" will normalize it: dist = ProbabilityDistribution[ PDF[UniformDistribution[{-1, 1}], u] PDF[UniformDistribution[{-Abs[u], Abs[u]}], v] , {u, -1, 1}, {v, -1, 1}, Method -> "Normalize"]; pdf = PDF@...


8

This particular problem can be completely performed with Mathematica without resorting to paper and pencil. The joint density of $X$ and $Y$ is given by the product of the marginal density of $X$ (which is $1\over2$) and the conditional density of $Y\mid X$ (which is $1\over{2\mid X \mid}$): f[x_, y_] := Piecewise[{{(1/2)*(1/(2 Abs[x]), -1 <= x <= 1 &...


3

This is an extended comment rather than an answer. I think that there are two issues: (1) the amount of data available is inadequate to estimate all 6 parameters, and (2) there is a potential for a severe amount of numeric instability. A straightforward approach to estimate the parameters is to use FindDistributionParameters: mle = ...


3

st[dist_, l1_, l2_] := Module[{rl1 = RandomVariate[dist, l1], rl2, t}, t = Tr@rl1; While[Tr[rl2 = RandomVariate[dist, l2]] != t]; {rl1, rl2}]; Usage: Create two lists of length 10 and 15 respectively from a Poisson distribution, such that sums of lists are same. {list1, list2} = st[PoissonDistribution[3], 10, 15]; {list1, list2} Tr/@% {{4,7,...


Top 50 recent answers are included