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)

6
votes
5answers
175 views

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

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 ...
5
votes
2answers
101 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
1answer
36 views

Limit involving DiracDelta gives zero [on hold]

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 ...
4
votes
0answers
45 views

Gaps in CDF produced from HistogramDistribution

I have about 200 real numbers spread over the range 0-400. I use HistogramDistribution to bin them and PDF to create the ...
3
votes
3answers
84 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
43 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
281 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: ...
1
vote
0answers
100 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 can be estimated from the sample mean, ...
5
votes
2answers
314 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 ...
8
votes
3answers
286 views

How to evaluate if a list obeys the Normal distribution?

I am processing a data when I encountered this problem. I use the way of plotting the "normal probability plot" to show the result The list I have is: ...
0
votes
0answers
107 views

Creating a Distribution

Say I want to create a multivariate distribution that perhaps, as an example, looks something like this. ...
1
vote
1answer
60 views

Boundary parameter in Beta Distribution

I use EasyFit to find the probability distribution of my data. It turns out the data follows BetaDistribution with 0.54022,0.70601 shape parameters and 1.33,6.83 continuous boundary parameters I am ...
0
votes
0answers
41 views

Exploring contours plots of two Binormal distributions

I am facing a little interesting problem. Let´s suppose two binormal distributions, as follows: ...
4
votes
1answer
167 views

Where can I find the Distributions Palette?

I was watching the "Statistics: Modeling with Statistical Distribution" Training Course http://www.wolfram.com/training/videos/DAT016/ and in one of the slides, the following image showed up. Does ...
0
votes
0answers
36 views

Non-existent PDF for combined MixtureDistribution and TransformedDistribution?

I am trying to mix two discrete distributions, one of them shifted by an integer amount by means of TransformedDistribution. When I then try to access the mix, it responds to CDF but not PDF. This ...
10
votes
2answers
443 views

Compiling the VoigtDistribution PDF

According to List of compilable functions, Erf and Erfc are compilable functions. However, I want to make a compiled version ...
3
votes
1answer
96 views

How does Matematica compute the CDF of the binomial distribution?

I want to know, how Mathematica actually implements the cumulative distribution function of the binomial distribution. Which algorithm does Mathematica use to compute ...
6
votes
2answers
106 views

Scale SmoothHistogram curve to Histogram

Like in this question, I would like to display a histogram and a smooth histogram in the same plot. I believe the default “bin height specification” (or $\textit{hspec}$) for ...
4
votes
1answer
114 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 ...
15
votes
2answers
254 views

More efficient method to compute moments of the Johnson $S_B$ distribution

Here is a very specific feature request. I need Mean[JohnsonDistribution["SB", γ, δ, 0, 1]] When I issue e.g. ...
1
vote
1answer
101 views

Using List/Histogram Data As A Weighted Function?

I have a list of data points that I would like to use as a weighted function. The data represents the number of particles within a bin of a particle distribution. Ultimately I would like to multiply ...
4
votes
1answer
75 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 ...
5
votes
0answers
60 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 ...
10
votes
2answers
159 views

Possible bug in VonMisesDistribution?

Bug introduced in 10.2 or earlier and fixed in 10.3 Observe: ...
10
votes
1answer
103 views

FullSimplify on TransformedDistribution

Bug introduced in 8.0.0 and fixed in 10.3.0 Could someone check that I haven't gone mad? I would like to take the maximum of two $[0, 2 \pi]$ independent uniform random variables. ...
1
vote
0answers
91 views

Question about Mann-Whitney implementation in Mma

So, I've been doing some statistics using Mma. Typically, the Mann-Whitney U test is used to compare non-normally distributed samples, whose medians are compared if both distributions exhibit similar ...
7
votes
2answers
255 views

Is there any function that compares distributions of two populations?

Imagine I have two populations that I want to test whether they exhibit similar shape distributions. Is there such a function that does this sort of testing already implemented? I am asking this ...
5
votes
1answer
158 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 ...
1
vote
3answers
186 views

Fit dataset with customized discontinuous distribution

I have the following parametric CDF: F[x_, λ_, β_, γ_] = Piecewise[{ {0, x < 0}, {1 - (1 - β) E^(-x λ), 0 <= x < γ }, {1, x >= γ} }]; ...
2
votes
0answers
35 views

How to generate an arbitrary discrete distribution? (EmpiricalDistribution vs ProbabilityDistribution)

I've just started using Mma's distributions. Suppose I want to generate an arbitrary discrete distribution by matching probabilities to outcomes. ...
6
votes
1answer
94 views
1
vote
1answer
66 views

Calculate mean and variance of conditional sum of Gammas

Find $Mean(Z)$ and $Var(Z)$, where: $Z = \begin{cases}W + X_1 & \text{if } W \leq c \\ W + X_2 & \text{if } W > c \end{cases}$ where $\quad W \sim \Gamma(k_0, \theta_0), \quad X_1 \sim ...
3
votes
3answers
259 views

What is a good way to display many discrete probability distributions on the same plot in Mathematica?

For something like 2 to 30 distributions each with 2 to 30 values. If we assume the distributions have unique values, a standard stacked bar chart is insufficient, but maybe something similar would ...
5
votes
2answers
130 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 ...
4
votes
1answer
80 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 ...
1
vote
1answer
44 views

Custom kernel in CopulaDistribution

Note: I recognize that my question is strongly related to How to define a new copula distribution family, but it seems that there was no clear answer there, and the suggestions given were to simply ...
2
votes
2answers
125 views

How to simplify and evaluate Integral with lots of DiracDelta dists

I have a question about an Integrals which I can do by hand but I want to implement this Integral in Mathematica. Actually it is the definition of a 2 Particle Phase Space. The Expression is the ...
7
votes
2answers
113 views

Probability: MultivariateHypergeometricDistribution broken with more than five categories?

dist=MultivariateHypergeometricDistribution[5,ConstantArray[2,10]]; prob=Probability[a==1,Distributed[{a,b,c,d,e,f,g,h,i,j},dist]] We stuff an urn with coloured ...
1
vote
1answer
137 views

How to create a vertical (smooth) Histogram on the y-axis of a function graph for an uncertain x?

This is my first time posting a question in StackExchange. I have encountered a certain problem and I can't seem too find a solution. Just a word of caution, I am kind of an amateur when it comes to ...
2
votes
2answers
186 views

Can not generate graph using smooth kernel distribution

I am a newbie to Mathematica so this question might looks silly. I want to generate a smooth kernel distribution graph for this set of data. The data I uploaded has two columns, the first column is ...
3
votes
3answers
175 views

How to Plot the PDF of Product of two Normals

I've been looking to plot the distribution of the product of two normally distributed variables, x and y, that are uncorrelated. I've tried symbolically calculating the PDF using the ...
3
votes
1answer
59 views
2
votes
0answers
68 views

Detecting discontinuities in derivatives in images

Considering an grey-scale image as a function $z=f(x,y)$. (Specifically, I'm interested in $f=h*h*...*h$, where $h$ is the indicator function of a regular hexagon.) I am interested in finding places ...
4
votes
1answer
112 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 ...
3
votes
2answers
142 views

Estimate parameters of AR1 process

I am trying to estimate the parameters of a series $Z_t=W_t^\beta$, where W_t follows an AR1 process with mean 2, $\rho=0.9$ and $\sigma=0.1$: $W_t = \rho W_{t-1} + (1-\rho) \bar{W} + \epsilon_t$ ...
1
vote
2answers
63 views

Custom multivariate discrete distribution [closed]

This is related to How to define an n-variate empirical distribution function probability for any n? and RandomVariate from 2-dimensional probability distribution but I don't think neither questions ...
4
votes
2answers
92 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 ...
4
votes
0answers
152 views

Goodness of Fit of Copula Distribution

I am trying to find out goodness of fit of copula distribution, but Mathematica 10 gives me the same answer for each copula type. e.g ...
21
votes
2answers
633 views

Given an exact formula, how can Mathematica find a probability distribution whose PDF matches it?

So, given some data, Mathematica 10.2 can now attempt to figure out what probability distribution might have produced it. Cool! But suppose that, instead of having data, we have something that is in ...