Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [distributions]

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

71 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7
votes
0answers
69 views

Problem/bug with `RandomVariate` and `FirstPassageTimeDistribution`?

...
6
votes
0answers
179 views

Does DegreeGraphDistribution sample uniformly?

Bug introduced in 10.0 or earlier and persisting through 12.0 The first symptom (histogram below) is gone in 12.0. The second (fraction of connected graphs) persists, showing that the sampling is ...
6
votes
0answers
57 views

Problem with Probability and MultivariateHypergeometricDistribution (bug?)

Using the input ...
6
votes
0answers
856 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 ...
5
votes
0answers
62 views

TransformedDistribution using $k$ iid random variables, but $k$ not fixed

Can I create a TransformedDistribution that uses $k$ independent identically distributed (i.i.d.) random variables where $k$ is not fixed? This question is closely ...
5
votes
0answers
72 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 ...
4
votes
0answers
60 views

Why is ProbabilityDistribution 100x slower than ExtremeValueDistribution?

The two distributions are the same, except the ProbabilityDistribution cuts out below x=0. The wolfram documentation on ProbabilityDistribution says nothing about speed. A search of this site gave no ...
4
votes
0answers
306 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 ...
3
votes
0answers
132 views

Solving Monster Equations with Mathematica

I would like to solve the following equations in Mathematica. Here are the formulas: $u=0.5$ $\alpha=0.5$ $\epsilon_0=0.1$ $\epsilon_1=0.1$ $f_0(y)=\mbox{Gaussian density with mean -1 and ...
3
votes
0answers
103 views

Piecewise and ProbabilityDistribution malfunction when used together

Yesterday I opened this question, what had a happy end after all. But when I tried to model more complex discrete random variables using Piecewise instead of ...
3
votes
0answers
80 views

Evaluating an expectation expressed by a difficult expression

Background I have a 2-dimensional space. The receiver is at the center. The locations of transmitters are given by the PPP $\Phi$ with density $\lambda$. The serving transmitter is the one that is ...
3
votes
0answers
123 views

PearsonChiSquareTest for count/frequency data?

I read with interest a previous question on the PearsonChiSquareTest from a few years ago, and one answer was very helpful: Performing a chi-square goodness of fit ...
2
votes
0answers
39 views

How can I generate a Poisson gap sampled list?

tstart = 0; tend = 3; num = 1024; tstep = (tend - tstart)/(num - 1); list = Table[i, {i, tstart, tend, tstep}] // N; Histogram[list] I have a list of 1024 points ...
2
votes
0answers
93 views

Is Mathematica computing the conditional expectation correctly?

Given a simple case of say 2 independent trials each with probability of success 1/3. Consider a random variable that is gives the 3 times the total successes. We can define this random variable in ...
2
votes
0answers
95 views

DistributionChart and kernel smoothing: preventing negative numbers

I am visualising rather scarce data about size distribution of certain objects (here - oil basin areas on continents, to be specific). There is no raw data, but some already processed quantities, for ...
2
votes
0answers
257 views

How to draw a color square from a spectral distribution?

I need to draw a simple square filled with a flat uniform color, from a given spectral function. The color should simulate as close as possible what an human eye/brain would see, if the light ...
2
votes
0answers
123 views

Why does Expectation function compute, while explicit integration does not?

The code: Expectation[1 + 1/y, {y \[Distributed] ExponentialDistribution[1]}] outputs 1 - EulerGamma While, ...
2
votes
0answers
204 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 ...
2
votes
0answers
173 views

Mixture of a bivariate distribution defined as a copula

I define a bivariate distribution: ...
2
votes
0answers
132 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 ...
2
votes
0answers
99 views

Optimization of custom probability distibutions?

Consider the two tests: Timing[Do[RandomVariate[NormalDistribution[0.5, 0.3]], {200}]] {0.001188, Null} ...
2
votes
0answers
329 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
0answers
324 views

Copula - Correlation or Covariance

Can someone explain to me why the CopulaDistribution function with a "Multinormal" kernal asks for the covariance matrix instead of the correlation matrix. Just by looking at the formula for copula, ...
2
votes
0answers
756 views

Developing easy code to apply Delta Method to generate prediction bands for custom distributions

I think that this is an interesting issue for all those who when to not only adjust one prediction function, but also to obtain the prediction bands to asses the graphical or tabular error I'm trying ...
2
votes
0answers
291 views

Why do EstimatedDistribution and DistributionFitTest work this way

I am fitting some time-series data to both a stable distribution and a normal distribution in order to assess the goodness of fit of each. Along the way I encountered the following confusing result. ...
2
votes
0answers
270 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
971 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 $p(...
1
vote
0answers
36 views

Can LearnDistribution Train and Generate Images Without Defaulting To 256x256?

In spite of anything I try it seems the ConformImages[] function nested in the LearnDistribution[] function resizes images to 256x256. If I convert an image into its "Data" representation before ...
1
vote
0answers
40 views

Getting a PDF from a NonlinearFitModel

With the help of @JimB, I could fit some experimental data with a CDF using NonLinearFitModel. The set of data is the following: ...
1
vote
0answers
51 views

Why is this parallel notebook not maxing out the available memory and processors?

I've searched many questions about parallel processing here, and they are either specialized or over my head. I run the following parallel notebook on an 8 core EC2 instance. The average memory usage ...
1
vote
0answers
319 views

A simple/fast way to estimate distribution modality?

Is there a simple and performant way to estimate whether an empirical distribution generated from a list of data is unimodal and if not (or is reasonably uniform and doesn't have modality at all), to ...
1
vote
0answers
58 views

Calculating mass density using kernel density estimation

I have a data set comprising of three columns: Column A: Position in $x$ direction ($x_p$) Column B: Position in $y$ direction ($y_p$) Column C: Mass ($m_p$) at position $(x_p,y_p)$ I am trying to ...
1
vote
0answers
52 views

Plotting NormalDistributions with different means and standard deviations

I've been using the Mathematica reference code to create normal distributions: ...
1
vote
0answers
52 views

Finding parameters of custom distribution with no analytical function

I need to shift one distribution to another using a simple positional correction parameter. For illustrative purposes, I will create a "double hump" or "twin peaks" distribution here, but my actual ...
1
vote
0answers
175 views

Inverse Fourier Transform of Poisson Characteristic Function?

The follow line is returning without evaluation: InverseFourierTransform[ CharacteristicFunction[PoissonDistribution[1], t], t, w] It is meant to output ...
1
vote
0answers
93 views

Mathematica cannot generate the random variables for a given Probability Distribution

I need to generate a large number of random variables from the distribution generated by the following code. Distribution is given by DistributionF. The code is ...
1
vote
0answers
47 views

Efficient computation of density of ratio of two normal random variables

I want to manipulate the density of the ratio of two normal random variables. One way to do this is: ...
1
vote
0answers
208 views

Multidimensional numerical Fourier transform

I'm trying to numerically compute the Fourier transform of the following bump function: $$\hat{r}(k)=\int r(x)e^{ikx}dx$$, where $r\in C^{\infty}_{0}(\mathbb{R}^{2})$, namely: $$r(x)=\begin{cases}\...
1
vote
0answers
91 views

Convolution of circular densities

I have two distributions. One is a delta function which is non-zero on a circle at radius 1, the other is filled circle of the same radius. When I calculate their convolution I get something very ...
1
vote
0answers
125 views

Evaluating the cumulative multivariate hypergeometric distribution

Suppose there are 5 black, 10 white, and 15 red marbles in an urn for a total of $N=5+10+15$ marbles. You randomly draw $n=6$ marbles without replacement. The probability that you pick exactly two of ...
1
vote
0answers
122 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.46747*10^-22}, {...
1
vote
0answers
107 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
133 views

How to properly (efficiently) define a mixture distribution and optimize the likelihood?

To start with: ...
1
vote
0answers
131 views

Summing the probability distribution to 1 to convince myself

I have worked out a probability distribution and want to check its sum which is necessarily 1. First we write $$ r \triangleq \frac{(2 \lambda + \mu)^2}{2(\mu + \lambda)^2}, \quad s \triangleq \...
1
vote
0answers
235 views

Comparing heavy tailed and non-heavy tailed distribution using Mathematica

I have data from a heavy tailed distribution (see picture 1) and a non-heavy tailed distribution (see picture 2) and want to compare it using a histogram on log-scale. However the picture 3 does not ...
1
vote
0answers
43 views

FisherHypergeometricDistribution and WalleniusHypergeometricDistribution, how to specify boundary conditions

I'm trying to write a function that consists of a noncentral hypergeometric distribution. When I'm passing a set of parameters to the function, the following boundary problems occur: ...
1
vote
0answers
57 views

Why does integration of a radical times HeavisideTheta give a conditional expression?

If I want to compute an integral over x^p HeavisideTheta[y-x] where p is some fraction, I do not get the desired result, but ...
1
vote
0answers
342 views

Is this the correct method in using bootstrapping to determine a lower confidence bound?

Quite often in industry, due to cost and schedule constraints, decisions must be made on small sample size data. I have 4 cycles-to-failure values resulting from running samples to failure in a ...
1
vote
0answers
77 views

Moments Ratio Plot using “ProbabilityDistribution”

I am trying to plot moments ratio plot with the following code: ...
1
vote
0answers
74 views

Comparing NIntegrate with definite integration

I want to calculate without error a sum of double integrals with the following definitions for the functions within them: ...