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 (1)

1
vote
1answer
119 views

How can I evaluate a certain probability density function?

The PDF of a random variable $X$ is given by $$f_X(x)=\frac{2m^mx^{2m-1}}{\sqrt{\pi}\Gamma(m)}\sum_{i=1}^{N}W_iH(T_i)$$ with $$H(t)=\exp\left(-m\left(\sqrt{2}\lambda ...
9
votes
3answers
164 views

Linear fit with conditional noise distribution

I need to fit a linear model of the form $y_i = a · x_i + b + e_i$. The $e_i$ are independent noise from a distribution that depends on $x$ as well as on global parameters of the data; however, the ...
1
vote
2answers
52 views

MMA gives error when a different PDF expression is used for the same distribution

I have the following MMA code. Note that the function I declared at the very beginning is the PDF of square of a Nakagami Distributed random variable. With $m=1$ and $P=1$, $f(h)$ becomes Exponential ...
0
votes
1answer
49 views
0
votes
0answers
43 views

How to obtain the PDF of variable that is square of a Rician distributed variable? [closed]

If a random variable $X$ is Rician distributed with PDF $f_X(x)$ where $$f_X(x)=\frac{2x}{\alpha}\text{exp}\left(\frac{-(x^2+v^2)}{\alpha}\right)I_0\left(\frac{2xv}{\alpha}\right)$$ Then what is ...
2
votes
0answers
48 views

The correct assignment of probability distribution to generate random variables

I'm asking you for a help to solve a difficult (for myself) task. Now I will tell you what and why I'm trying to implement. The task is to simulate the passage of elementary particles through a ...
1
vote
2answers
77 views

ContourPlot of HistogramDistribution

I am trying to create a density plot of a 2-dimensional HistogramDistribution. ...
0
votes
2answers
147 views

Why can't Mathematica integrate this PDF?

I'm trying to integrate a transformed Gumbel PDF in Mathematica. Integrate[E^(η*(-(x - q)) - E^((-η)*(x - q))), {x, t, ∞}] However, it doesn't compute. It's fine ...
1
vote
1answer
55 views

How to generate a histogram distribution with height function

According to the Mathematica documentation the HistogramList command allows to specify a height function fh, as third argument, ...
3
votes
2answers
362 views

Calculating the Mean of a Truncated Multinormal Distribution

First, I'm a little disappointed that Mathematica balks at: Mean[TruncatedDistribution[{{0, Infinity}},MultinormalDistribution[{0}, {{1}}]]] Second, is the ...
1
vote
0answers
70 views

Detecting the probability distribution in dataset [migrated]

I have a dataset in a CSV file which is a single column of positive integers. I would like to know which probability distribution it fits. The histogram is as follows. This is how I am trying. ...
0
votes
0answers
32 views

Stable numeric integration of multidimensional step function

I am trying to integrate numerically a two-dimensional function (a SmoothKernelDistribution) with a step. I tried a few different settings for the parameters of ...
0
votes
1answer
62 views

Poisson point distribution

The probability of n telephone calls received at an exchange in a time frame (t_i, t_f ) is given by the Poisson point distribution: ...
4
votes
1answer
288 views

Heuristic Method to create low discrepancy sequences

Introduction I am now trying to program an algorithm to achieve an uniform distribution of points within a space of dimension n. I started working in 2D. The idea is to achieve an uniform ...
0
votes
1answer
64 views

How to generate samples from an arbitrary continuous pdf?

If I define an arbitrary pdf p[x_] for a arbitrary-dimensional continuous variable x, how can I use Mathematica to create a function that will return a set of n random samples of x with distribution ...
2
votes
0answers
86 views

Optimization of custom probability distibutions?

Consider the two tests: Timing[Do[RandomVariate[NormalDistribution[0.5, 0.3]], {200}]] {0.001188, Null} ...
6
votes
1answer
70 views

Bug (or missed opportunity) in MarginalDistribution?

Observe: dist = MultivariateHypergeometricDistribution[k, Range@5]; Tr@Range@5 MarginalDistribution[dist, {1}] MarginalDistribution[dist, {1, 2}] First@% 15 ...
10
votes
2answers
136 views

Probability: MultivariateHypergeometricDistribution broken with more than five categories?

2016-04-09: This bug is indeed fixed (thank you, Stefan R.!) in 10.4. It may have been fixed in 10.3 or 10.3.1, but I haven't tried these versions. ...
1
vote
1answer
39 views

Difference between two usages of TransformedDistribution

I am modeling the distribution of the sum of two dice throws as a TransformedDistribution ...
4
votes
1answer
98 views

PDF of product of two random variable with PDFs involving Dirac-delta function

I am trying to find the PDF of product of two random variables with the following distributions, ...
3
votes
2answers
137 views

Fast way to evaluate the PDF of a multivariable distribution

I'm trying to evaluate the PDF of a truncated multi-normal distribution. My distribution has 8 dimensions and each value must be ≥ 0. ...
-1
votes
1answer
80 views

Draw independent samples from conditional distribution at a fast rate

I would like to draw samples from the following conditional distribution of the following (don't ask why): ...
12
votes
2answers
297 views

Sampling a phase space uniformly for a given energy?

The energy for a 1D harmonic oscillator can be written: $$ E = \frac{1}{2 m} p^2 + \frac{m \omega^2}{2} x^2 $$ where x is position and p is the momentum. I would like to sample phase space $(x,p)$ ...
0
votes
0answers
69 views

Maximum Likelihood Estimation of Gamma-distribution Scale parameter

I have the following tasks: Generate random sample with given parameters shape = 2, scale = 0.001 and shape = 2, scale = 1/1200 for the right censored sample; Using Maximum Likelihood Method ...
0
votes
1answer
43 views

Dependency of parameter to find maximum vanishes after simplification

EDIT: It turns out I just made a dumb mistake: Simplify[Exp[x^2]*2^n*Pi*D[maxdist[n,x]/n*(1+Erf[x/Sqrt[2]])^(2-n),x]] A portion of my "factor" is actually inside ...
4
votes
4answers
181 views

Fitting Coxian distribution to some data

I'm trying to fit a transformed (actually shifted to the right) Coxian distribution to some data ( if needed an example set is here Sim data ). I've tried a number of ways for this: ...
1
vote
2answers
125 views
1
vote
1answer
83 views

Using ListDeconvolve to find velocity distrbution

Consider a Distribution of Particles correspondent with the NormalDistribution: PDF[NormalDistribution[], x] The Particles also have a velocity distribution: ...
0
votes
1answer
50 views

PDF for square of Rician random variable? [closed]

Let the random variable $X$ has Rician distribution (unit power in direct and scattered paths), whose PDF is given by ...
0
votes
1answer
60 views

InverseFourierTransform very slow

I determined a distribution dist = SmoothKernelDistribution[ListOfValues];. Then I determined the FT of the PDF, which is the ...
4
votes
2answers
381 views

Colors associated to parts of a 3D distribution of points

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

Estimate parameters of a derived distribution

I would like to estimate the parameters of a derived distribution fSurvivalGompertzNoiseDist below. This distribution represents simulations from a probability ...
4
votes
3answers
87 views

FindDistributionParameters failing for a TransformedDistribution

I would like to estimate the parameters of a distribution that I obtain via TransformedDistribution: ...
1
vote
0answers
150 views

Fitting data to an Normal Inverse Gaussian distribution

I am using data which I suspect is distributed according to the Normal Inverse Gaussian distribution (NIG). The literature says that the 4 parameters of the NIG distribution can be estimated from the ...
0
votes
2answers
52 views
0
votes
2answers
61 views

generate “dynamic” random variables?

I have the following problem: I generated two random numbers ...
1
vote
1answer
59 views

Efficient maximisation of log-likelihood

I would like to efficiently find the maximum $(\sigma,\lambda)$ for the log-likelihood of the derived distribution below. I only need $\sigma$ and $\lambda$ to one decimal place - so not very precise. ...
3
votes
1answer
182 views

Adding two random variables (probability distributions)

Let's consider two balanced dice. I am modelling each of them using ...
0
votes
1answer
44 views

Integrating Poisson distributions [closed]

I'm trying to do the following Integrate[Exp[-λ] λ^k/k!, {k, 0, ∞}] The answer should be 1 but Mathematica is unable to do it. Same story when I try the ...
7
votes
4answers
230 views

How to generate two group of $n$ random numbers in $U(0,1)$ such that sum of these two groups equal? [closed]

I want to have two groups of $n$ random numbers $u_i$ and $v_i$ in $U(0,1)$, such that $\sum u_i = \sum v_i$ What I tried is: I can firstly get $u_i$ by ...
3
votes
1answer
137 views

Random Variate generating strange results when using ProbabilityDistribution

I have created a probability distribution that follows a general normal distribution, given by: $$ \frac{b *e^{-\left(\frac{\sqrt{(x-u )^2}}{a }\right)^{b }}}{2 a \Gamma \left(\frac{1}{b }\right)} ...
0
votes
1answer
42 views

How is the DistributionFitTest[data, dist] function actually using the dist parameter?

The first "Applications" example given for the DistributionFitTest of the Wolfram Language & System Documentation Center is: Analyze whether a dataset is drawn from a normal distribution: ...
6
votes
1answer
114 views
0
votes
0answers
53 views

Integration of a Gaussian function in kernel density estimation [on hold]

I came recently across an odd result of mathematica, which so far I cannot explain. In a standard kernel density estimation (example http://www.ssc.wisc.edu/~bhansen/718/NonParametrics1.pdf) the ...
4
votes
2answers
103 views

Gaps in the plot of a cumulative distribution function produced from HistogramDistribution [duplicate]

I have about 200 real numbers spread over the range 0-400. I use HistogramDistribution to bin them and PDF to create the ...
1
vote
1answer
41 views

Limit involving DiracDelta gives zero [closed]

Why is the following limit zero? In[147]:= Limit[DiracDelta[ϵ], ϵ -> 0] Out[147]= 0 It does not matter if the limit is taken from either sides (+/-), since ...
3
votes
3answers
91 views

Working with $X^2$, where $X$ has the uniform distribution in $[-b,b]$

Consider $b>0$ and let $X \sim U[-b,b]$ (the continuous uniform distribution in $[-b,b]$ ). I want to do two computations in Mathematica. First is to compute the density function of $X^2$, which I ...
1
vote
1answer
47 views

Mean of a half-Cauchy distribution

I am trying to calculate the mean (if it exists) of a half-Cauchy distribution. I know that the mean of the a Cauchy is undefined, but I was wondering whether the same is true of a half-Cauchy? (A ...
1
vote
3answers
324 views

Random non-overlapping disks in a square

I've found a nice code snippet by @belisarius from this question, that I'll reproduce here for reference: ...
6
votes
2answers
346 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 ...