Tag Info

4

This is pretty tricky due to the very heavy tail of the distribution. You can certainly get big speed ups as suggested by bill s by pre-computing some quantiles. However, there will always be a good chunk of the tail left to compute. I'm going to try to address the latter and borrow from Bill's solution for pre-computation. s[n_] := Log[n]*n^(-1.5); A ...

5

If you are willing to precompute some things, it can be pretty quick. Here we precalculate 100000 terms of the $a_n$ sequence. Then calculate the CDF (cumulative distribution function) by using Accumulate. To find the closest term to the u, use a NearestFunction. capA = -Zeta'[3/2] // N; aAll = (Log[#]/#^1.5 & /@ Range[100000])/capA; accAll = ...

0

This isn't a working answer, but maybe it will help. I've guessed some about your auxiliary conditions too, and maybe that's the reason I'm not getting a solution. The error the following code gives me is: NDSolve::ndnum: Encountered non-numerical value for a derivative at t == 0.`. Naturally, this occurs at R=0 in your equation. Perhaps the support of P ...

5

Apparently in version 9 listability of the CDF for TransformedDistribution, at least in this particular case, was broken. As of version 10 this is no longer the case. However, there does appear to be a bug here. Named tests like PearsonChiSquareTest actually call DistributionFitTest under the hood so I will use the former to help point to the problem. The ...

1

I think you can find all the possible combinations which satisfy the constrains allpos = Tuples[{Range[6], Range[6], Range[6]}]; select = Cases[allpos, a_ /; Total[a] <= 6]; and you can easily get the probability prob = Length[select]/Length[allpos] the output is 5/54

1

With[{t0 = 0, tend = 1, σ = 0.8, r = .01, S0 = 100, Κ = 110}, data = RandomFunction[GeometricBrownianMotionProcess[0, σ, S0], {t0, tend, 1/12}, 5000]; Exp[-r (tend - t0)] Mean[Max[#, 0] & /@ (data["LastValues"] - Κ)]] (* 27.5607 *) ListLinePlot[data, PlotRange -> All, PlotStyle -> Opacity[0.2]] Comparing this with Black-Scholes: d1[s_, x_, ...

1

As a rule, before going into Detail, it is a good idea to get first an overview over the situation, preferrably graphical. You could proceed like this. The problem can be formulated as follows: find the zeroes in x of the function $$f = p^x \binom{n}{x} (1-p)^{n-x}-q^x \binom{m}{a-x} (1-q)^{m-(a-x)}$$ In Mathematica define f as f[n_, p_, m_, q_, a_, x_] ...

1

Because the distribution is clearly not a gamma distribution, finding estimates of gamma parameters won't be of much use. If there is a theoretical or historical reason to believe that a mixture of two or more distributions should describe the results of the process generating the data, then the above approaches are fine. But if you just need a description ...

Top 50 recent answers are included