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
0answers
61 views

Need to plot binomial distribution probabilty function [on hold]

I am incredibly new to using Mathematica, and struggling to learn it as I have very little experience with any sort of software more complicated than excel, so I am very sorry if this is a stupid ...
1
vote
1answer
73 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
155 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
150 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 ...
10
votes
1answer
83 views

FullSimplify on TransformedDistribution

Bug introduced in 8.0.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. ...
3
votes
1answer
55 views
2
votes
0answers
51 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
100 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
130 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$ ...
0
votes
2answers
46 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
86 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
94 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 ...
2
votes
1answer
91 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 ...
20
votes
2answers
532 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 ...
1
vote
1answer
58 views

Defining Probability Distribution with parameters

I have a family of probability distributions, indexed by elements in $\mathcal I =\mathbb N \times [0,1] \times [0,1]$. For each $(A,B,C) \in \mathcal I$ I know how to define the corresponding ...
4
votes
1answer
120 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 ...
0
votes
1answer
169 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 ...
6
votes
3answers
130 views

Distribution over the product of three, or n, independent Beta random variables

I would like to calculate the PDF for the product of three independent Beta random variables. Specifically, I would like to find the distribution of the product of the following: $X_1\sim ...
5
votes
1answer
81 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 ...
2
votes
1answer
62 views

Plot a product of Beta distributions

I would like to plot the PDF of the product of a $Beta(1,1)$ and $Beta(3/2,1/2)$ random variables. I can use the following to calculate the PDF at a point $x$: ...
15
votes
1answer
388 views

RandomVariate returns values outside the support of a PDF

Bug introduced in 8.0.1 and fixed in 10.2.0 Let $X$ be a random variable with pdf: dist = ProbabilityDistribution[1/(Abs[x]*Log[Abs[x]]^2), {x, -E^-2, E^-2}] ...
12
votes
2answers
247 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
35 views

Simulating from CopulaDistribution

I am currently using CopulaDistribution and have been generating RandomVariates from this distribution. Say my code looks sort of like this (this is much simpler) ...
3
votes
1answer
63 views

How should I iteratively refine a MixtureDistribution?

I am trying to find a stopping time for a randomized simulation such that say 95% of trials that will be successful will have already finished. I would like to do this by creating and then refining ...
4
votes
0answers
464 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 ...
20
votes
2answers
888 views

Efficient Generation of Random Variates from a Copula Distribution

I have a 7-asset portfolio for which I want to simulate daily log-deltas using a Student T copula. The marginal distributions are all either Stable or TsallisQGaussian. Using NMaximize, I have ...
30
votes
1answer
2k views

RandomVariate from 2-dimensional probability distribution

A probability distribution can be created in Mathematica (I am using 8.0.1) with e.g. ...
4
votes
0answers
57 views

How to define a bivariate skew normal distribution?

There is BinormalDistribution that handles easily bivariate normal distribution and its mixtures. There is also ...
0
votes
0answers
152 views

Binomial Distribution (binomial model inspired by Merton)

I want to do the following and I hope that anyone of you can help me out. In short, I have a portfolio consisting of 10 companies, whereas their asset values are driven by a common economic ...
16
votes
2answers
975 views

How to compute the inverse CDF of HyperbolicDistribution properly?

Fixed in version 9. I want to compute the CDF and inverse CDF of the hyperbolic distribution: ...
4
votes
1answer
70 views
6
votes
2answers
216 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 ...
5
votes
2answers
494 views
9
votes
3answers
599 views

The default bandwidth of the SmoothKernelDistribution function

I am researching the Silverman rule of thumb for bandwidth selection. Below is a sample of my code, from which it seems that BW=63 is close to the default parameter given by Mathematica (2 images are ...
2
votes
1answer
45 views

Documentation for the Bounded option of SmoothKernelDistribution

I have found the Bounded option useful in the SmoothKernelDistribution function, but I can't find any documentation for exactly ...
0
votes
1answer
37 views

Error message when exporting plot as XLS file

I imported data from excel which has 300 data (which are change in CDS spread). I want to compute corresponding CDF for the data using kernel density estimation. I get the CDF plot but cannt get the ...
0
votes
1answer
58 views

kernel density estimation

I am trying to compute CDF of historical data ( weekly change in CDS spread) using kernel density estimation. The original data has 300 observation. I uploaded data from excel ...
10
votes
1answer
315 views

How does LocationTest choose its “AutomaticTest”?

Is there a way of determining how LocationTest chooses its "AutomaticTest"? Sometimes it's clear from the ...
0
votes
0answers
80 views
2
votes
3answers
185 views

Fitting and plotting Weibull distribution

How can I find the best fitted 2-parameter Weibull's distribution (PDF) to describe my data? How can i plot my data and estimated distribution all in one graph? How can I show/compare results of ...
5
votes
2answers
98 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], ...
28
votes
8answers
1k views

How to generate random points in a region?

The Mathematica 10 documentation was updated for FindInstance adding support for regions. In my use case, I'm trying to sample points in a set of disks: ...
1
vote
2answers
88 views

TargetFunctions option in FindDistribution 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 ...
0
votes
2answers
157 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: ...
0
votes
1answer
49 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 ...