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)

0
votes
1answer
57 views

Random non-overlapping disks in a square

I've found a nice code snippet from this place (last code on that page), that I'll reproduce here for reference : Plotting random circles in a square ...
0
votes
1answer
35 views

How to get DistributionChart to show normalised densities?

I am having some issue getting DistributionChart to show bin widths as expected, or perhaps it is in my interpretation of the plots. I have four data sets, all of the same length, and plot them in ...
1
vote
2answers
64 views

TargetFunctions option in FindDistrobution yields error

I have some data set that I am trying to find the maximums . I figured I could do this by fitting the many peaks of the dataset to Gaussian distributions and then finding the peaks of this data from ...
8
votes
1answer
171 views
1
vote
1answer
104 views

How can I draw a box with moving particles inside and a hole in one side? [closed]

The idea is to create a simulation for ideal gas motion in a container that have a hole and then find the speed distribution for the gas particles that leave the box through the hole. I have a ...
2
votes
1answer
156 views

Confusion with SplineFit (Angle calculation)

This question is continuation to this other one I am creating polymers (where each monomer is of equal length) using this method: ...
3
votes
2answers
75 views

Efficient Sampling of A (Countable) Discrete Distribution

I have a sequence of positive terms $(a_n)$, for which $\sum_{n=1}^\infty a_n = A <\infty$, and wish to take a psuedo-random sample from the discrete probability distribution \begin{equation} ...
2
votes
1answer
73 views

P-Values are inconsistent when using DistributionFitTest repeatedly

I am attempting to become more familiar with the DistributionFitTest, specifically the distributions it yields and their fittedness. What I have found is that when I generate random data, fit it, and ...
0
votes
1answer
39 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 ...
4
votes
1answer
53 views
2
votes
1answer
104 views

Mathematica equivalent of `qnorm` or `invNorm`

In R and TI-89 you can do qnorm(prob, mu, sigma) or invNorm(prob, mu, sigma) to get a value of ...
0
votes
1answer
147 views

Prime number The Ulam spiral [closed]

I want a simple method of visualizing the prime numbers that reveals the apparent tendency of certain quadratic polynomials to generate unusually large numbers of primes. I was able to display the ...
2
votes
1answer
64 views

Performance of a bootstrap - time of computation not linear with number of iterations

I'm doing a bootstrap based on this thread with the following code (file.txt here): ...
0
votes
0answers
44 views

Multinormal Distribution with an affine transformation

The affine property of Gaussians says: if $x \sim N_x(\mu_x, \Sigma_x)$, one can apply an affine transformation to $x$, $y = Ax + b$, which gives the distribution --> $y \sim N_y(A\mu_x+b, A\Sigma_x ...
0
votes
1answer
92 views

Solve ${\rm BinomialDistribution}(x;\,n_1,\,p_1) = {\rm BinomialDistribution}(a-x;\,n_2,\,p_2)$ in terms of $x$ [closed]

I'm totally a novice with Wolfram software, so please forgive me if the question is nonsense. I want to solve the following equation in terms of $x$: $\quad \quad {\rm ...
11
votes
4answers
239 views

Frequency of punctuation characters used in Mathematica languages

I would like to determine the computer language character frequency in Mathematica code. I want to remap my keyboard to the most used character such as [], {}, -, +. There are the frequency of ...
2
votes
2answers
70 views

FindDistributionParameters gives an error for a mixture of user defined sinh-arcsinh distributions

I have some data (1593 values). I first binned it using the Knuth rule and fitted a function that is a linear combination of two sinh-arcsinh functions. I then ...
4
votes
1answer
207 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 ...
2
votes
0answers
39 views

Marginal distribution with weight

Given a multi-variate distribution $P(\mathbf{x},\mathbf{y})$, I would like to obtain the marginal distribution $$P_m(\mathbf{x})=\sum\int_{\mathbf{y}}P(\mathbf{x},\mathbf{y})W(\mathbf{y})$$ In my ...
10
votes
2answers
515 views

Generating uniform random points over a binary image

So I recently read this excellent post about generating random points over arbitrary regions. I hope Wolfram eventually builds that functionality into Mathematica's Random functions. I want to do this ...
1
vote
1answer
69 views

Mean of inverse probability distribution does not agree with explicit integral

I tried to work with the inverse exponential distribution and encountered the following, which I think is an inconsistency in Mathematica (version 10.0.2): ...
2
votes
0answers
35 views

Custom graph distribution

I am working with random graphs a lot. It's quite easy to describe random graph using, adjacency matrix or just a list of edges. However I am thinking that I might benefit from describing random ...
-2
votes
1answer
71 views

How to generate normally distributed random number [closed]

I want to sample or return random number from a distribution which is normally distributed with mean of zero and standard deviation of 1. I am using RandomReal[NormalDistribution[0, 1]] I s this ...
2
votes
1answer
41 views

Is this behavior of DistributionFitTest together with StableDistribution a bug?

I have been using DistributionFitTest to fit the following data: ...
4
votes
2answers
115 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: ...
6
votes
2answers
190 views

Nearest neighbor distribution

I need to construct nearest neighbor distribution for a given finite set of real numbers. I have no clue how this can be realized. Any suggestion would be very much appreciated.
1
vote
1answer
66 views

calculate variance of conditional sum of Normals

Let $\quad W \sim N(\mu_0, \sigma_0^2), \quad X_1 \sim N(\mu_1, \sigma_1^2), \quad X_2 \sim N(\mu_2, \sigma_2^2)$ denote independent random variables, and let $c$ denote a constant. I want to find ...
4
votes
2answers
148 views

Deriving a Rayleigh distribution

When I tried to find this Rayleigh distribution Mathematica couldn't come with an answer: ...
1
vote
1answer
94 views

Accumulating elements of lists taking the criteria out of another list

In order to find the critical values for the significance of a discrete distribution, for example BinomialDistribution[20,0.6], i need a function which works on the ...
0
votes
2answers
79 views

Plot Bivariate Data with Marginals

I would like to plot bivariate data along with the marginal distributions. I've arranged the plots in a GraphicsGrid as below but the marginals are centered away from the bivariate plot and I wonder ...
1
vote
1answer
62 views

Generate a sample from a multivariate Cauchy distribution

I want to generate a random sample from a multivariate Cauchy distribution, however I couldn't find a function for the multivariate Cauchy in Mathematica. I know how to define a distribution in 1D and ...
4
votes
1answer
71 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 ...
9
votes
2answers
123 views

Why are Binormal and Multinormal giving me different results when I use NExpectation?

fixed in 10.1 (windows) Binormal and Multinormal can both be used to represent normal random variables: ...
2
votes
2answers
53 views

Cannot use the MultinormalDistribution code

I am trying to use the MultinormalDistribution code with the Quantile function to get the 0.01 quartile of the multinormal ...
1
vote
0answers
89 views

Extrapolation of area for a 2D integration

I have a set of points distributed almost uniformly in a certain area of a 2D plane as follow: An example of data points (orange) data = {{0.919443, 1.68921*10^-22}, {0.262277, ...
1
vote
1answer
68 views

Find maximum Log likelihood for repeated random variates

I have the following code ...
0
votes
0answers
32 views

How to fix the PlotRange on LogPlot? [duplicate]

I'm plotting families of Boltzmann'esque distribution functions $\propto\exp\left(-{\dfrac{\varepsilon+{\mathcal O}(\varepsilon^2)}{k_\mathrm{B} T}}\right)$. But it won't let me fix the ...
2
votes
1answer
59 views

Why is RandomVariate of special probability distribution doesn't working in all cases

I would like to generate a random variates in Mathematica 9 with this distribution: ...
0
votes
1answer
38 views

Fit process parameters to a transformed AR(1) process

I would like to fit the parameters of an exponented AR(1) process using Mathematica's EstimatedProcess, however, the function does not seem to evaluate to anything. First of all I create the ...
1
vote
1answer
73 views

Cannot evaluate TransformedDistribution for vectorial sum

I'm trying to obtain the distribution of the magnitude (length) of the vectorial sum of two vectors under a random (uniformly distributed) angle $\phi$. The sum is $\sqrt{x^2+y^2+2xy\cos(\phi)}$, ...
1
vote
0answers
33 views

Fit a custom process to a data: inhomogeneous 2-state Markov chain

I would like to fit a custom process - a time inhomogeneous 2-state Markov chain, to data. The time inhomogeneity is a result of the transition probabilities varying sinusoidally through time with a ...
1
vote
0answers
87 views

Von Neumann's method to generate points uniformly distributed on a region of a n-sphere surface

I am trying to generate points uniformly distributed on a region of a single n-sphere surface (all angles in hyperspheric coordinates are between 0 and Pi/2). I decided to use von Neumann's method ...
2
votes
1answer
89 views

Time inhomogeneous Markov Chain in Mathematica

I would like to create a discrete 2-state Markov process, where the switching probabilities in the transition matrix vary with time. I can currently do the following, which creates a process with ...
1
vote
1answer
57 views

Using Inner to calculate a log likelihood

I am trying to use the function Inner to calculate the sum of log likelihoods of a custom probability distribution 'custom' applied to a vector of data 'vData'. The custom distribution changes ...
4
votes
2answers
208 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 ...
0
votes
1answer
74 views

Sketch Probability density function [closed]

My question is : Suppose that the PDF of a random variable X is as follows: \begin{equation*} f(x) = \begin{cases} ce^{-2x} & \text {$x > 0$}\\ 0 & \text {otherwise}\\ ...
0
votes
1answer
80 views

Custom distribution [closed]

I am trying to define a custom distribution using the code below. Unfortunately, it did not produce a satisfactory result ...
1
vote
1answer
98 views

Mean Preserving PDF Spreading

I have a histogram representing the PDF (probability density function) of an unknown discrete RV. The histogram is asymmetrical. Is there a known way in Mathematica to increase/decrease the variance ...
4
votes
2answers
182 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 ...
2
votes
2answers
72 views

RandomVariate from Dirichlet into Multinomial Not Summing to 1

I have a draw from a Dirichlet distribution that I would like to use as input into a MultinomialDistribution. For instance: ...