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
56 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|\{...
1
vote
1answer
82 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
34 views

Index of cumulative distribution function

When trying to compute this ...
0
votes
3answers
91 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
69 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
66 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
101 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
394 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
50 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
55 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
81 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
43 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
38 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
64 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 ...
16
votes
3answers
995 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
58 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
83 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
46 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
59 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
48 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
133 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
168 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
242 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
34 views

Impose conditions on PDF distribution

Consider some data data = {{x1,y1},{x2,y2},...} I organize a density distribution using ...
0
votes
2answers
92 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
75 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
560 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
130 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
680 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
66 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
55 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
58 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
65 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
162 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\...
19
votes
5answers
1k views

Sisyphus Random Walk

A Sisyphus Random Walk evolves as follows: With probability (r) you advance the position of the walker by +1. With probability (1-r) the walker resets at x0 = 0. To simulate the probability of reset ...
7
votes
5answers
1k views

Survival Probability for Random Walks

The Survival Probability for a walker starting at the origin is defined as the probability that the walker stays positive through n steps. Thanks to the Sparre-Andersen Theorem I know this PDF is ...
8
votes
2answers
241 views

Overloading functions like Mean for distributions

I'd like to understand how functions like Mean are overloaded to provide the right behavior for the distributions in Mathematica (like NormalDistribution or PoissonDistribution). I originally assumed ...
17
votes
1answer
245 views

Possible bug in OrderDistribution? [Update: Confirmed by Wolfram Research and enqueued.]

Bug Introduced in 11.3 or earlier Initial testing indicates this has been addressed in 12.0 Observe: ...
3
votes
3answers
115 views

Efficient function for life duration probability?

Sent to me by a colleague asking me for assistance (the function as is breaks): ...
0
votes
1answer
60 views
0
votes
1answer
87 views

Mathematica failing to compute function to calculate integral over a region bounded by straight line

Statement of the problem Consider the following situation: You have a model which employs a bivariate distribution with known parameters. You have a random realization from the distribution ...
1
vote
2answers
106 views

Sampling data from numerical values of density distribution of nucleons

How could i sample my data which follows distribution if i have only numerical values of density distribution as an example data attached as in picture I tried but do not know how to do it. The data:...
0
votes
2answers
85 views

Finding area under a PDF

Suppose I have a PDF with mean a and standard deviation b defined as below. How would I go ...
1
vote
1answer
67 views

Computing the PDF of a WishartMatrixDistribution. Is this a limitation in the PDF Mathematica function?

I'm trying to compute the pdf of a wishart distribution. Why does PDF[WishartMatrixDistribution[10, IdentityMatrix[4]], 2*IdentityMatrix[4]] not return a ...