For questions about distributions built-in in Mathematica, and functions that operate on them. Also includes questions about defining your own distributions.

learn more… | top users | synonyms

16
votes
2answers
2k views

Standard errors for maximum likelihood estimates in FindDistributionParameters

I am trying to fit a non-standard PDF to data and FindDistributionParameters works great, and gives me the parameters of the distribution back using maximum ...
16
votes
2answers
646 views

How to compute the inverse CDF properly?

Note: this has been fixed in version 9. I want to compute the CDF and inverse CDF of the hyperbolic distribution: ...
15
votes
4answers
737 views

Visualization of Bivariate Distributions

I know it is perfectly possible to show the bivariate probability distributions in MMA. But my question is can we show each dimension of distribution in 2D dimension while we are showing the 3D plot? ...
13
votes
1answer
330 views

RandomVariate returns values outside the support of a PDF

Let $X$ be a random variable with pdf: dist = ProbabilityDistribution[1/(Abs[x]*Log[Abs[x]]^2), {x, -E^-2, E^-2}] Here are some pseudo-random drawings from it: ...
13
votes
2answers
871 views

Obtaining joint distributions and conditional distributions using Mathematica

I have two multivariate Gaussian distributions $p(x)$ and $p(z)$ with mean vectors $m_x$ and $m_z$, and covariance matrices $\Sigma_x$ and $\Sigma_z$. my model is a simple linear model $x = W z+n$ ...
11
votes
2answers
682 views

Trying to fit an unknown extreme distribution

First up, I'm quite new to Mathematica so any hints on better code would be greatly appreciated. I have some histogram frequency data from an unknown distribution that I'm trying to fit. Here's the ...
11
votes
2answers
1k views

Finding distribution parameters of a gaussian mixture distribution

Short version: how to estimate the parameters of a mixture of multivariate normal distributions (i.e.: Gaussian mixture model)? Long version. I am trying to estimate the parameters of a mixture of ...
11
votes
1answer
178 views

How does bandwidth selection work for low-variance dimensions with KernelMixtureDistribution?

I am puzzled because this toy example (in Mathematica 8) ...
10
votes
2answers
289 views

What do the options of SmoothKernelDistribution do?

The function SmoothKernelDistribution has three options that are not described in too much detail in the Mathematica's help window. InterpolationPoints: What is ...
9
votes
3answers
2k views

How to generate a RandomVariate of a custom distribution?

I'm trying to generate a pseudorandom variate out of a custom distribution. Suppose I want define a custom distribution, and for the sake of simplicity I define a Poisson distribution (the ...
8
votes
3answers
377 views

The default bandwidth of the SmoothKernelDistribution function

I am researching the Silverman rule of thumb for bandwidth selection. Below is a sample of my code, from which it seems that BW=63 is close to the default parameter given by Mathematica (2 images are ...
8
votes
1answer
132 views

AndersonDarlingTest and DistributionFitTest Leaking Memory

I believe AndersonDarlingTest and probably all other tests are keeping a copy of data somewhere and not freeing it: ...
7
votes
1answer
670 views

Probability and distribution from actual data

Let's say I have some data from a real world system: ...
7
votes
1answer
102 views

Inconsistent DistributionFitTest results?

In pondering this question, I used Mariana's function to generate the following data. ...
7
votes
1answer
100 views

How to create a spliced survival statistical distribution?

I am trying to use Mathematica for more of my reliability engineering work and am having trouble using SplicedDistribution. I have a Weibull distribution (dist1) associated with a low stress ...
6
votes
3answers
423 views

How to randomly erode a 3D distribution of points with Mma 7.0?

Suppose we have a 3D distribution of points, like the spherical ball example below : ...
6
votes
1answer
129 views

RandomVariate does not fill range of PDF of distribution

I've declared my own probability distribution as follows dist[a_, b_] := ProbabilityDistribution[Cos[(b x)/2]^2 Sinc[a x]^2, {x, -400, 400}]; When I try to ...
6
votes
1answer
297 views

Fix end point in smooth kernel distribution density

I am using some extreme value fitting method which results in a parametric distribution for values exceeding some threshold, all values $\geq 0$. For smaller values I'd like to use a smooth kernel ...
5
votes
2answers
465 views

What is the best distribution for my histogram?

I defined a security bound for a random walk (cube with 15 lengh) and i have this code to obtain a sample of the random times at which the random walk crosses the boundary for the first time: ...
5
votes
1answer
88 views

Can I store a DataDistribution in a database?

I have a DataDistribution data = KernelMixtureDistribution[RandomVariate[NormalDistribution[], 10^5]] that takes a long time ...
4
votes
3answers
505 views

Graphical Plots of PDF and CDF

I have a joint density and distribution function that I want to plot in a meaningful way, (i.e., want to be able to see how the functions behaves as changes in x and y happen simultaneously. If ...
4
votes
2answers
374 views

How to fit one distribution to another?

I have a custom distribution created to model some experimental observations. While too complicated to include in this question, I can provide an example and some illustrations to convey a sense of ...
4
votes
4answers
122 views

How do I emulate DiscreteUniformDistribution in Mathematica?

How do I define a function from scratch that emulates DiscreteUniformDistribution? As shown below, attempting to use ...
4
votes
1answer
126 views

Closed form for convolutions of random variables

Is it possible to get Mathematica (9) to calculate PDF's for combined distributions? I can't seem to find the right notation, if this is possible at all. My attempts: ...
4
votes
1answer
315 views

Using DistributionFitTest on custom distributions in Mathematica 8

I originally posted this question on Stack Overflow, but I didn't get any answers, and I'm hoping to have better luck here. I'm trying to compute the goodness-of-fit of a bi-modal Gaussian ...
4
votes
2answers
110 views

Finding the characteristic function of a TransformedDistribution[]

I am trying to find the characteristic function of a sum of "named" distributions, though I am interested in how to use Mathematica to find the characteristic function of $$f(X_1,\ldots, X_n),$$ where ...
4
votes
1answer
68 views

Define customised distribution with discontinuous CDF

I have the following CDF: ...
4
votes
2answers
109 views

NMaximize the Likelihood

I am still pretty new to Mathematica, but have to solve a quite complex problem. The function ...
3
votes
3answers
147 views

TransformedDistribution doesn't work

I'm trying to obtain a sum distribution of two discrete random variables. The function TransformedDistribution doesn't work for me in such case: ...
3
votes
2answers
239 views

Colors associated to parts of a 3D distribution of points

Suppose we have a long list of random points (cartesian coordinates) in 3D space. coords := ...; Until now, I was associating colors in a radial way, from the ...
3
votes
3answers
158 views

Colorize a 3D distribution of points according to density

Suppose we have some random 3D distribution of points. I'll use the spherical ball defined below as an example and a starting point for the discussion here : ...
3
votes
1answer
116 views

Categorical Distribution

Suppose I want to do calculations with a random variable $X$ that has a simple categorical distribution (a.k.a generalised Bernoulli distribution or discrete distribution). I was expecting to be able ...
3
votes
2answers
146 views

How to change type order in PearsonDistribution?

I need to estimate a Pearson distribution from a batch of tables tab: ...
3
votes
1answer
152 views

Expectation of CauchyDistribution

I've noticed this strange behavior and I'm wondering if it's a bug. I define a Cauchy distribution: c = CauchyDistribution[0, 1]; If I evaluate ...
2
votes
3answers
230 views

Covariance of transformed random variables

I am trying to solve the following: $\begin{align*} &X \sim N(1,1)\\ &\mathrm{cov}(X, X^3) = \text{?} \end{align*}$ where $\mathrm{cov}$ is the covariance. How would you do this in ...
2
votes
3answers
217 views

How to Compute Aggregate Best and Worst Cases for a Large Number of Estimates?

I need to aggregate multiple estimations, but I haven't been able to find a built-in function in Mathematica that aggregates multiple probablity estimations (I am specially interested in estimations ...
2
votes
1answer
91 views

Expectation of GeometricBrownianMotionProcess

I am trying to compute $$\mathbb E\left[\max\left(\frac{S_{1/2}+S_1}{2}-K,0\right)\right]$$ where $K=100$ and $S_t$ is a geometric brownian motion (with $S_0=100$, drift $r=0.05$ and volatility ...
2
votes
1answer
73 views

Defining and evaluating new continuous distributions based on Mathematica's distributions

A number of functions operate with Mathematica's set of distributions e.g. Through[{Mean, StandardDeviation, Variance}[UniformDistribution[{umin,umax}]]] which ...
2
votes
1answer
89 views

Determining the dimension of a probability distribution

Functions like Mean and RandomVariate clearly infer the dimension of the distribution passed to them. One can also usually ...
2
votes
2answers
235 views

Generating a range of numbers according to some rules

I'm pretty new to Mathematica, and I'm mainly a programmer so I don't have a lot of knowledge about maths. I want to generate a set of UNIQUE incremental numbers (series) according to the following ...
2
votes
1answer
314 views

Radial Random Walk

I'm trying to generate a spherical distribution of radial random walk points in 3D space. The following code works, but the random walk lines aren't radial. Why ? Where is my mistake ? ...
2
votes
1answer
40 views

Determining sample size with no replacement for a given confidence and reliability when there are x failures observed during sampling?

I am trying to follow the procedure of a Sandia Labs report found here to determine the required sample size, for various population sizes, with no replacement for a given confidence and reliability. ...
2
votes
1answer
139 views

Judging the quality of fitting an EventData object to a distribution using LogRankTest

I have $389$ data points defined in an EventData object and want to judge the quality of fit of this data to a fitted $3$-parameter Weibull distribution. This ...
2
votes
1answer
128 views

DistributionFitTest with WeightedData?

My problem is related to statistical testing with weighted data. I have a data sample and I assume that a part of the data follows a specific distribution (Pareto). So I fit my data to a distribution ...
2
votes
0answers
83 views

Partial convolution of random variables in random vectors

Suppose $(X_1,Y_1)$ is a bivariate random vector with a given distribution and let $X_2$ be a univariate random variable with the same distribution as $X_1$ but independent of $(X_1,Y_1)$. I want to ...
2
votes
0answers
492 views

Calculate variance of random walk?

How can I symbolically calculate the variance of the following random walk in Mathematica? Given several discrete random variables such that $p(Z_i=1-2k)=p$, where $k$ is a small real number, and ...
1
vote
1answer
178 views

Safe values of $\mu$ and $\sigma$ when randomly sampling from a Log-Normal Distribution?

I believe I'm obtaining overflow errors when randomly sampling from a log-normal distribution with the command: RandomVariate[LogNormalDistribution[μ, σ], 1] ...
1
vote
3answers
97 views

Plotting a frequency function

I have a list of numbers and I want to plot the fraction of numbers >= k against k which will naturally be a decreasing curve. How do I do that?
1
vote
1answer
262 views

How to reject or repulse some points in a 3D cloud of particles?

I'm having an issue with a 3D distribution of points. The distribution is really nicely looking in Mathematica, but it is used in an OpenGL astronomy program (Celestia) to generate a nebula, with ...
1
vote
2answers
51 views

CDF of TransformedDistribution Not Returned And No Error Message Produced

I am unable to get Mathematica to return the CDF of a distribution produced by TransformedDistribution. It "executes" for 6 hours on my machine and then returns a blank plot. Could someone execute the ...