Tag Info

New answers tagged

3

If you separately define the distribution, the forms of subsequent expressions are simplified and you are less likely to lose track of the brackets. dist = TransformedDistribution[x^2, x \[Distributed] ProbabilityDistribution[((2/9))*(x + 2), {x, -2, 1}]]; PDF[dist, y] Plot[ Evaluate[PDF[dist, y]], {y, 0, 4}, Filling -> Axis] mgf[t_] = ...


1

EDIT: Correction to erroneous first response. Let where the x[k] are independent identically distributed normal variables each with distribution NormalDistribution[m, d]. Assume that y[n] is distributed NormalDistribution[n*m, Sqrt[n]*d] then the distribution for y[n+1] = (y[n] + x[n+1]) is dist = Assuming[{d > 0, n > 0}, TransformedDistribution[ ...


8

You need ProbabilityDistribution. Example: distr = ProbabilityDistribution[E^(-(x^2/2))/Sqrt[2 π], {x, -Infinity, Infinity}] Mean[distr] (* ==> 0 *) Variance[distr] (* ==> 1 *) Warning: You are responsible for ensuring that the probability density function you provide is normalized over its domain. Mathematica will not verify this and will not ...


2

As a an alternative, you can also extract the data out of the SmoothHistogram object. This way is a bit dirty and should be done carefully because the "magic index" 1,2,1,3,3,1 could be dependent on Mathematica version and other parameters. This is for v10: data = RandomVariate[NormalDistribution[], 1000]; dataHist = SmoothHistogram[data] now directly ...


4

With some data data = RandomVariate[NormalDistribution[], 1000] the SmoothHistogram plot: SmoothHistogram[data] is using SmoothKernelDistribution. You can create the same DataDistribution object using dist = SmoothKernelDistribution[data] and then extract the values you see in the plot at a specific single point e.g. PDF[dist, 0.5] ...



Top 50 recent answers are included