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.

Filter by
Sorted by
Tagged with
1
vote
1answer
74 views

Expectations of sums

I would like to use Mathematica to derive some bounds on empirical estimators, such as $E[Y]$ where $Y = \tfrac1n\sum_{i=1}^n (X_i - X)^2$ and $X = \tfrac1n\sum_{i=1}^n X_i$. For a moment I thought ...
2
votes
1answer
76 views

Creating a user defined PDF

I have a derived distribution which I want to play with, which is of the form $$\frac{1}{\sigma^{2}}2^{-2+\frac{x}{10}} 5^{-1+\frac{x}{10}} e^{-\frac{1}{\sigma^{2}} 2^{-1+\frac{x}{10}} 5^{\frac{x}{10}}...
3
votes
3answers
117 views

How to relate a binned pdf to a pdf, taking into account how the data is binned?

I have a data set which I represent as a PDF histogram Histogram[Data,{"Raw", NumberOfBins},"PDF"]. I want to know the distribution parameters of my data. I've ...
3
votes
2answers
123 views

Automatically bound histogram regions?

Given a histogram of some data, such as e.g. in the following sample https://www.codepile.net/pile/NLlNgP60 ...
2
votes
1answer
47 views

Using GPU Computation in LearnDistribution

LearnDistribution has an option for RealNVP, which is directly training a neural network for the distribution. It also has an option for TargetDevice, however, it appears to do nothing. Take the ...
2
votes
2answers
60 views

TransformedDistribution

I am trying to perform some calculations on a random variable that is the sum of a normal distribution and a truncated normal distribution. My understanding is that using ...
2
votes
2answers
70 views

Idiomatic way to obtain conditional density function from a continuous joint distribution

Context In Mathematica one is able to directly calculate the marginal and conditional probability distributions of a discrete joint distribution (abstracting over the specific details) like so: ...
2
votes
1answer
88 views

Product of a normal distribution and an exponential distribution?

I am trying to find the product of normal distribution and Exponential distribution (Both are independent). Could we do analytically? This question is linked with Link 1, and Link 2. But still not ...
0
votes
1answer
46 views

How to fit data with superposition of CDFs?

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
1answer
70 views

How to define conditioned random variables / distribution in mathematica?

Consider a simple case, $X_1$ defined as $\mathbb{P}(X_1=1)=q$ and $\mathbb{P}(X_1=-1)=1-q$ $X_2|\{X_1=1\}$ defined as $\mathbb{P}(X_2=1|X_1=1)=p$ and $\mathbb{P}(X_2=-1|X_1=1)=1-p$ $X_2|\{...
6
votes
3answers
108 views

Symbolic integration of logmultinormal distribution

I have been trying to integrate and compute moments of LogMultinormalDistributionin Mathematica, but the integrals don't seem to evaluate. Say for the first moment, ...
1
vote
1answer
86 views

TransformedDistribution doesn't seems to work properly in this case

Im trying to get the distribution of the random variable defined by $$Y_n:=\left|\sum_{k=1}^n e^{ i X_k}\right|$$ for arbitrary $n$, where $X_k\sim U[0,2\pi]$ i.i.d. Then I had written the code <...
0
votes
0answers
36 views

Index of cumulative distribution function

When trying to compute this ...
0
votes
3answers
93 views

How can I calculate the expected value of the sum of “n” i.i.d. variables with any distribution?

Particulary, I would like to find the expected value of the sum of $n$ variables distributed like ParetoDistribution[1,1.14]. For example, this works for the sum of two vars with Gamma distribution: <...
1
vote
1answer
75 views

Fitting tail of distribution to Generalized Pareto Distribution

Hello, I have a problem in Mathematica and I don’t know if you could help me. I’m trying to compare the “performance” of a Laplace distribution and a Generalized Pareto Distribution (GPD) for the tail ...
0
votes
1answer
68 views

Correct double distribution function for the following dataset

Consider a dataset data-angles-gamma-factors.txt having the form {{x1,y1},{x2,y2},...}. Each row represents an event with values x,y; all events have the equal ...
3
votes
1answer
110 views

Fitting a mixture of two normal distributions for a data set?

EDIT: Raw data can be found here: https://gist.github.com/Kagaratsch/65a931d8d78fcdd81f7e346429a02afd Consider the following binned example data: ...
2
votes
1answer
397 views

Why does the PoissonDistribution not plot around its mean for moderate large numbers?

I plotted the Poisson Distribution for various mean values (plot label and vertical line). The plots does not peak around the mean as the mean increase. Any advice to get the right plot, or at least ...
1
vote
1answer
50 views

Sampling Standard Deviation

Here I found a formula for the sample standard deviation: http://mathworld.wolfram.com/StandardDeviationDistribution.html Here is my simulation: ...
6
votes
1answer
83 views

Why is SmoothKernelDistribution not symmetric in 2D?

For example, we create SmoothKernelDistribution from one data point in 2D, e.g. {0,0}. Why is the plot of ...
1
vote
1answer
52 views

How to generate LogNormalDistributions with mean=10, spanning one order of magnitude?

I'm a beginner with WM. I actually want to generate two non-overlapping LogNormalDistributions spanning an order of magnetitue with respect means $x = 1$ and $x = ...
0
votes
0answers
57 views

Can Mathematica be used to fit these functions related to the Riemann Xi function $\xi(s)$ to a known probability distribution type?

This question is related to my Math Stack Exchange question at the following link: Question on Probability Distributions Related to the Riemann Xi Function $\xi(s)$ The definitions below are for $x&...
0
votes
1answer
82 views

Arrays, Mapping, and Convolutions

I'm trying to create a function that convolutes a 3D Normal Distribution to the points listed below. However, I think I'm going about it in the wrong way. When I try and convolve it with the points, ...
1
vote
1answer
45 views

Two ways of obtaining differential distribution using Mathematica do not match

Consider a set of data dataset = {{x1,y1},{x2,y2},...} It contains ~200000 rows. I would like to obtain the pdf for x. I can do this, for example, using two ways:...
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: ...
0
votes
2answers
65 views

How to generate two non-overlapping LogNormalDistribution and their CDF?

I'd like to know how to generate two LogNormalDistribution with the same standart deviation and, if possible, get the associated CDF. To contextualize, I'm trying ...
0
votes
0answers
38 views

How to fit experimental data with by numerical integration?

folks. I'm a begginer with Mathematica and all I know is just a few basics commands and i'm trying to improve it. I have this list of experimental data taken from a paper which describes the ...
17
votes
4answers
1k views

Does Mathematica have an implementation of the Poisson binomial distribution?

I need to work out the probability of having $k$ successful trials out of a total of $n$ when success probabilities are heterogeneous. This calculation relates to the Poisson Binomial Distribution. ...
2
votes
1answer
61 views

How to plot Intensity of SmoothKernelDistribution?

For example, we have a list of values data = RandomVariate[NormalDistribution[], 10^3]; then SmoothHistogram[data] By ...
0
votes
1answer
59 views

PDF for one-dimensional data [closed]

Consider a dataset data={{x1},{x2},{x3},...}. How to generate a distribution function over $x$ using it? I tried to construct something like PDF[data,x], however ...
1
vote
1answer
89 views

Generate a uniform distribution over an $n$-simplex employing quasi-random low-discrepancy points

This post is intended in a similar direction to an earlier one Can I use Compile to speed up InverseCDF? . I now wish to generate uniform points in an $n$-simplex (specifically $n=8$), making use of ...
0
votes
0answers
48 views

Creating a prediction/distribution based on several years of data

So I have several years of data from a survey. For each year I've used FindDistribution and Predict to see if I can fit the data. Here's one example Where I used FindDistribution to get ...
1
vote
1answer
62 views

RandomReal in combination with NormalDistribution [closed]

I am normally not working with Mathematica, but I have to understand a code written in i! Can some body say what the arguments and parameters of code below say? ...
1
vote
1answer
49 views

How to produce ListPlot that samples a given distribution?

I wanted to get a binned plot that a uniform background distribution with a spike at some bin. My first instinct was to use RandomVariate, and then ListPlot. What i get is this This makes sense as ...
0
votes
1answer
42 views

Expectation of two independent random variables

I would like to compute the following function of two independent random variables: ...
5
votes
3answers
135 views

Slow performance of TransformedDistribution

I am trying to use TransformedDistribution for a data analysis task. The distribution performs well with RandomVariate applied. ...
6
votes
2answers
172 views

Transformation of random variables and joint distributions

Given a variable $y_i$, normally distributed with 0 mean and $σ_y$ standard deviation $y_i$ ~ NormalDistribution[0,$σ_y$ ] I want to obtain with Mathematica: The distribution of: $x = \bar{y} = \...
4
votes
2answers
243 views

Problem with TransformedDistribution

I am trying to use Mathematica to obtain the probability distribution of $\frac{1}{2}(A + B)$ where $A$ and $B$ are independent random variables each distributed according to the uniform distribution, ...
1
vote
1answer
35 views

Impose conditions on PDF distribution

Consider some data data = {{x1,y1},{x2,y2},...} I organize a density distribution using ...
0
votes
2answers
97 views

How to plot a single plot with two variables

guys. Suppose I have this equation: M(t) = Meq + (M0 - Meq) exp[-t/τ] where t denotes de time, Meq and M0 defined parameters and τ is an another defined parameter. I can easily plot this equation (...
4
votes
2answers
76 views

ProbabilityDistribution with variable number of dimensions

I would like to construct a ProbabilityDistribution with a variable number of dimensions. I tried to use $Assumptions = x ∈ Vectors[d, Reals] so that the variable <...
3
votes
2answers
568 views

How can find the 2D Voronoi cell area distribution?

I need to find the area distribution function of the 2D Voronoi cells in Mathematica version 11 and later. My old instructions for Mathematica 9 don't work anymore. How can I do it?
4
votes
1answer
136 views

Smooth Density Histogram with probability areas

As an example, for a normal distribution everyone knows that 68% will fall within one standard deviation away from the center and so on. The following code will give me a 2D Normal distribution and ...
3
votes
3answers
740 views

How would you visualize a multivariate Gaussian in high dimension (>3D)?

Obviously, I can't do: Plot3D[PDF[ MultinormalDistribution[{0, 0, 0}, {{1, 0, 0}, {0, 1, 0} {0, 0, 1}}], {x, y}], {x, -20, 20}, {y, -20, 20}] How would ...
0
votes
1answer
71 views

Create Poisson distribution

I would like to make a phone call at the average arrival rate of λ = 300 [call / minute] per minute in the Poisson distribution of the telephone exchange and save it on the list. I don't know even if ...
1
vote
1answer
59 views

Issues computing expectation

I am interested in computing a conditional expectation, but not sure what is the best way to do it. All the methods I have used seem to have issues. Let $Y=X_1+X_2$ where $X_1$ and $X_2$ are ...
-1
votes
1answer
60 views

Conditional expectation using derived distribution [closed]

While this question can be solved using some (hand) analysis and standard calculus, I would have thought that the following code would have worked: ...
0
votes
1answer
66 views

Double Integral to compute conditional expectation

Let $V=X+Y$ where $X$ and $Y$ are independent random variables, both normally distributed with $\mu=0$ and $\sigma=1$. I am interested in computing $E[X \mid V\geq c]$ where $c$ is an arbitrary ...
0
votes
1answer
165 views

How to use Mathematica's Moment Generating Function?

Given the following p.d.f., which is the p.d.f. of the ratio between a complex Gaussian and a Chi-squared RVs: \begin{equation*} f_U(u)=\exp\Big\{{-\frac{1}{4 u^2}}\Big\} \,\frac{\left(8 n u^2-1\...