Tag Info

New answers tagged

3

Since the PDF can be computed in closed form you might have some luck with ProbabilityDistribution and some half-way reasonable starting values. Generate the data... mix[p_, m1_, m2_, s_] := MixtureDistribution[{p, 1 - p}, {NormalDistribution[m1, s], NormalDistribution[m2, s]}]; mixdatSum = Plus @@ RandomVariate[mix[0.75, 0.5, -1.5, 0.2], {2, 100}]; ...


1

Tweak Solution Since Seth has provided 2 answers, I thought I might also put up another answer. My motivation for separating this from my original answer is that ... my original answer is a self-contained mathematical solution in transformations of random variables, essentially striving to side-step Mathematica's use of Boole which was not working, ...


1

Symbolically: Clear[s,a,b,c,d]; s={a,b,c,d}; uni@@s==Total[Map[-(-1)^Length[#]int@@#&,Rest[Subsets[s]],1]]/.int[q_]->q; uni[a,b,c,d] == a + b + c + d - int[a, b] - int[a, c] - int[a, d] - int[b, c] - int[b, d]-int[c,d] + int[a, b, c] + int[a, b, d] + int[a, c, d] + int[b, c, d] - int[a, b, c, d] Now, fill in ...


0

I spent some additional time on this problem and believe I MAY have solved it in a pretty general way with Mathematica. But I'm not sure and I still think there's more help needed on the problem. I'm going to use wolfies' substitution of the conventional x and y for my earlier used f and k. Basically, what we are after is the expected value of x over a ...


2

This is a very nice problem. If I may dispense with the notation for random variables as $f$ and $k$, and refer to them instead as $X$ and $Y$ ... The Problem Let $X \sim Uniform(0,1)$ and $Y \sim Uniform(2,5)$ be independent random variables, with joint pdf $f(x,y) = \frac13$: f = 1/3; domain[f] = {{x, 0, 1}, {y, 2, 5}}; We seek a closed-form ...


2

I figured out a way to answer a related simpler question, which is Expectation[ f \[Conditioned] f + \[Alpha]*k > p], {f, k} \[Distributed] UniformDistribution[{{a, b}, {k1, k2}}] Mathematica has trouble with this computation, but if you realize that it is the centroid of a polygon, you can use a feature of Mathematica to get a (long) answer ...


4

Mathematica does not automatically calculate the quantile (or InverseCDF) for arbitrary distributions. You need to do it. xd = ExponentialDistribution[1]; (* use exact argument *) yd = ExponentialDistribution[5]; (* use exact argument *) td = TransformedDistribution[ x/(x + y), {x \[Distributed] xd, y \[Distributed] yd}]; quantile[q_] = z /. ...


2

This is also not an answer but a brief study in $Version "8.0 for Microsoft Windows (64-bit) (October 7, 2011)" which might be of interest. It considers three methods of calculating the requested probability. It shows that in this version there is no negative probability but there is still a "critical number" which amounts to 8. For n = 8 the ...


0

You can also depict the expected value nicely as a function of Mu and Sigma using Plot3D. px = Simplify[PDF[LogNormalDistribution[Mu, Sigma], x], x > 0] E^(-((Mu - Log[x])^2/(2 Sigma^2)))/(Sqrt[2 \[Pi]] Sigma x) Plot3D[NIntegrate[Log2[1 + x] px, {x, 0, \[Infinity]}], {Mu, -5, 10}, {Sigma, .2, 2}, AxesLabel -> {Mu, Sigma, EY}] PS: Reminds me ...


1

I suspect there may not be a closed form expression (I have not looked at it hard enough). If the aim is to not analytical but numerical, I post the following for illustration (apologies if not the intent of question): f[x_, y_] := NIntegrate[ Log2[t + 1] Exp[-(x - Log[t])^2/(2 y^2)]/(Sqrt[2 Pi] t y), {t, 0, Infinity}] rv[a_, b_, n_] := ...



Top 50 recent answers are included