# Tagged Questions

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

250 views

### When analytical and numerical methods do not agree - Case study with Maximum Likelihoods methods

Here is the probability distribution I am interested in: $$P(q)=C e^{4 n s q} q^{4 n \nu - 1} (1 - q)^{4 n \mu - 1}$$ , where $e$ is the constant of Euler and $C$ is constant so that the whole thing ...
528 views

### How can I create a Distribution from its probability density function?

I have a probability density function. Is there a mechanism to create a Distribution object from it, such that normal Mathematica commands that usually work on ...
218 views

### Best way to represent a joint distribution

The motivation for this question is producing a distribution that produces the gender and age of an individual when the distribution of ages depends on gender. Suppose I want a distribution which, ...
199 views

### Where can I find the Distributions Palette?

I was watching the "Statistics: Modeling with Statistical Distribution" Training Course and in one of the slides, the following image showed up. Does anybody know if this palette is available and ...
150 views

### P-values differ in tests for normality between Mathematica and SAS

I am testing the following data for normality, in Mathematica and SAS: ...
235 views

### How to get probabilities for multinomial & hypergeometric distribution ranges more quickly?

I often need to calculate the probability of a result from a multinomial distribution falling within some range, e.g., the maximum of the categories having an upper bound, or a lower bound for the ...
71 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 ...
465 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 ...
610 views

### When are If, Piecewise, Switch, and Which interchangeable and when are they not?

Experimenting with joint dependent distributions via the TransformedDistribution function, I used the following to derive a distribution where the second variate is ...
1k views

### what is The Formula behind the Kolmogorov-Smirnov test statistics?

I calculate the Kolmogrov-samirnov test statistic for the following data: ...
426 views

### Getting the Cumulative Distribution Function of f(x) from a dataset of x

I've a data set $\mathcal{X}$ which consists of randomly generated numbers. Let's say for example data = RandomVariate[ExponentialDistribution[1], 10^4]; My aim ...
391 views

### Areas of Voronoi cells from image file

I have an binary image with non-point objects. Does anyone have any suggestions how to determine area of each Voronoi cell in Voronoi diagram (goal is area distribution)? Thank you in advance.
667 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 it....
138 views

### Calculate the mean of ordered distribution of the defined distribution

I am trying to evaluate the mean of the following: Let $a\sim Binom(10,1/2)$ and consider the random variable $\quad \quad d=\left|\frac{2}{\sqrt{10}}a-\sqrt{10}\right|$ Let $d_1,\dots,d_{20}$ be ...
215 views

### Mathematica function to calculate equivalent NormalDistribution from a WeibullDistribution

I have a WeibullDistribution with mean 12.0 and standard deviation 3.2. Is there any built-in Mathematica function that calculates an equivalent ...
109 views

### Dirichlet marginals - why does Mathematica not give the *Kth* marginal?

Observe: MarginalDistribution[DirichletDistribution[{a, b, c, d}], #] & /@ Range@4 {BetaDistribution[a, b + c + d], BetaDistribution[b, a + c + d], ...
105 views

Observe: ...
742 views

### How can we create a histogram distribution from binning data?

HistogramDistribution takes a list of data points, creates a histogram from them, and returns this histogram in a form that can be used as a distribution. I ...
160 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 ...
157 views

### MarginalDistribution with Symbolic range in ProbabilityDistribution

Given the following joint density: for 10 < x < 20, x/2 < y < x. To find the marginal density for X we do: ...
180 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 ...
118 views

### Can I store a DataDistribution in a database?

I have a DataDistribution data = KernelMixtureDistribution[RandomVariate[NormalDistribution[], 10^5]] that takes a long time ...
106 views

### Second derivative of SmoothKernelDistribution PDF?

Does anyone know why I can't seem to get a second derivative of this interpolating function f? In this example, h[x] is zero ...
94 views

### Overriding a built-in function with custom coded procedures

Sometimes it might be useful to override Mathematica's built-in functions with custom code that is either more specific or more efficient (or even less "smart"), but at the same time keeping the same ...
224 views

### SmoothHistogram with sharp boundary [duplicate]

When using SmoothHistogram (to plot probability distribution function), I noticed that the edge of the figure is automatically smoothed towards zero probability. ...
183 views

### Define customised distribution with discontinuous CDF

I have the following CDF: ...
65 views

### How to pass a custom method to a particular option?

In an answer to my question More efficient method to compute moments of the Johnson $S_B$ distribution, J. M. has come up with a method to compute the moments of the Johnson $S_B$ distribution, which ...
1k 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 ...
130 views

### Iterating distributions

I want to calculate the distribution that comes from summing up random numbers between -0.5 and 0.5. A computationally intensive version of doing this is to simply do the following: ...
190 views

### Deriving a Rayleigh distribution

When I tried to find this Rayleigh distribution Mathematica couldn't come with an answer: ...
384 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 ...
201 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: ...
318 views

### How to plot an implicit value funtion

Previous question has been solved (Gap in a continuous plot). Here is a new related question. ...
98 views

### Dependent probabilities distributions?

What's the best way to model situations with dependencies? What I mean is well-defined arrangements like: If I choose a 6-sided die with probability $p$ and a 20-sided one otherwise, and then roll ...
92 views

### FindDistributionParameters failing for a TransformedDistribution

I would like to estimate the parameters of a distribution that I obtain via TransformedDistribution: ...
249 views

### How to transform an image into a probability density function?

I'd like to use the Metropolis algorithm to randomly generate points with density according to the brightness of an image. I just need to transform a binary image into a pdf function to use this ...
444 views

### Why doesn't FullSimplify simplify expressions with DiracDelta?

I want to simplify a complicated expression with some Dirac delta distributions, but FullSimplify does not do what I want. Specifically, I want ...
356 views

### Calculate PDF and CDF of a product of independent exponentially distributed random variables

Let x[1], x[2], ..., x[n] be independent random variables each of which is distributed exponentially, i.e. with the PDF ...
658 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 ...
149 views

### Finding Distribution based on quantile data

I am trying to determine an approximate distribution based on quantile data. I have the following information regarding Profit/Loss from an investing strategy backtest, and I want to use the data to ...
191 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 ...
115 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 ...
118 views

### Why doesn't NSolve work for this equality? Wildly incorrect solutions are given in certain cases

I am trying to write a function that solves for p in the following equation: PDF[BinomialDistribution[n, p], x] == op The ...
598 views

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 ? ...
198 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: ...
122 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, ...
136 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 ...
78 views

### Proper command to fit a distribution with data incomplete in a known way

Here is my scenario: got some data that I have to fit to a specific parametric family of probability distributions (cannot be changed). Data consist of several bunches of integers between, say, 0 and ...