Tag Info

New answers tagged

2

The two are not equivalent. The first is a one-sided distribution (a^2 is nonnegative) whereas the second is two-sided (a*b is both positive and negative). You can also generate the first from the HalfNormalDistribution: Assuming[x > 0, PDF[TransformedDistribution[ a^2, {a \[Distributed] NormalDistribution[0, 1]}], x] == ...


2

A good source are the Wolfram.com pages; http://mathworld.wolfram.com/search/?query=stochastic+models&x=17&y=14 http://search.wolfram.com/?query=stochastic+models&x=0&y=0 Not free, but gives you a good overview for the library; ...


5

You need ParameterMixtureDistribution: pmd = ParameterMixtureDistribution[NormalDistribution[µ, σ], µ \[Distributed] ExponentialDistribution[λ]] CDF[pmd, x]


4

For a uniform distribution on the unit circle you want the angle to be uniform on {0, 2Pi} thetaDist = UniformDistribution[{0, 2 Pi}]; xDist = TransformedDistribution[ Cos[theta], theta \[Distributed] thetaDist]; Assuming[-1 < x < 1, PDF[xDist, x] // Simplify] 1/(Pi*Sqrt[1 - x^2]) Verifying that this is properly scaled ...


7

Here is a trick that allows you to get exactly what you're looking for: FourierTransform[ InverseFourierTransform[ x/y DiracDelta[x - y], x, k], k, x] DiracDelta[x - y] What I did here is to apply the Fourier transform and its inverse, which is of course the identity and therefore is equivalent to the original expression. But in doing so, ...


1

DiracDelta must be inside an integral to have much meaning. From its documentation: "DiracDelta can be used in integrals, integral transforms, and differential equations. " Assuming[Element[y, Reals], Integrate[x/y DiracDelta[x - y], {x, -Infinity, Infinity}]] 1 Assuming[Element[x, Reals], Integrate[x/y DiracDelta[x - y], {y, -Infinity, Infinity}]] ...


1

You can apply your transformation to your sample data and use EmpiricalDistribution on the transformed data without having to use TransformedDistribution: data = RandomVariate[ExponentialDistribution[1], 10^4]; ed = EmpiricalDistribution[data]; edtr = EmpiricalDistribution[Sqrt@data]; Plot[{CDF[ed, x], CDF[edtr, x]}, {x, 0, 4}, PlotLegends -> ...


8

First I create a set of data to simulate yours. data = RandomVariate[ExponentialDistribution[1], 10^4]; Now you can take advantage of the EmpiricalDistribution function to define a model-free distribution based on your data. edist = EmpiricalDistribution[data]; The core of what you are asking for is to obtain a TransformedDistribution, i.e starting ...


6

Plot[PDF[WeibullDistribution[2, 3.5], x], {x, 0, 20}] data = {0.4, 0.7, 0.4, 0.8, 0.7, 0.7, 0.3, 0.1, 0.2, 0.3, 0.1, 0.7, 0.4, 0.7, 0.4, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.3, 0.9, 0.4, 0.4, 0.4, 0.4, 0.7, 0.1, 0.7, 0.7, 0.7, 0.7, 0.5, 0.7, 0.7, 0.4, 0.7, 0.5, 0.3, 0.9}; Show[ Histogram[data, Automatic, "PDF"], Plot[Tooltip[PDF[#, x], #], {x, ...


1

I'm a bit pressed for time at the moment so this is not a complete answer. The key to understanding SmoothKernelDistribution lies in understanding KernelMixtureDistribution whose PDF it interpolates. The internals for SmoothKernelDistribution are simply coordinates for that interpolation. As for KernelMixtureDistribution it is important to look at the ...


3

edistdata = Table[{x, CDF[EmpiricalDistribution[R], x]}, {x, R}]; cdfw[a_, b_, x_] := Simplify[CDF[WeibullDistribution[a, b], x], x > 0]; cdfe[a_, x_] := Simplify[CDF[ExponentialDistribution[a], x], x > 0]; cdfp[a_, b_, x_] := Simplify[CDF[ParetoDistribution[a, b], x], x > 0]; nlmw = NonlinearModelFit[edistdata, cdfw[a, b, x], {a, b}, x]; nlme = ...


2

FindDistributionParameters and EstimatedDistribution do not provide information to construct confidence intervals conveniently. A possible approach is to use NonlinearModelFit using the empirical cumulative distribution of the data as input and the CDF of WeibullDistribution as the model to be estimated. edistdata = Table[{x, CDF[EmpiricalDistribution[W], ...


10

There is a one-liner (if you have wide enough screen) Histogram@ComponentMeasurements[#, "Area"][[;; , 2]] &@ WatershedComponents@DistanceTransform@Import@"http://i.stack.imgur.com/k0EUJ.png"


2

Clear[custom]; When defining the custom distribution, include the parameter assumptions required for the custom distribution to be a valid distribution. custom[a_, b_] = ProbabilityDistribution[ (a/b) ((x/b)^(a - 1)) E^-(x/b)^a, {x, 0, Infinity}, Assumptions -> a > 0 && b > 0]; DistributionParameterAssumptions[custom[a, b]] a ...


5

Update a Rewrite of my answer in an effort to recreate Matlab's xcov function. I'm using this documentation page as reference. I'd appreciate any code review, in particular how the scale options are implemented since I've seen conflicting documentation. First, the function: Clear[CrossCovariance]; Options[CrossCovariance] = {"Lag" -> All, "Scale" ...



Top 50 recent answers are included