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
0
votes
1answer
20 views

Simplifying / approximating compound negative binomial - binomial distribution

Suppose we have that the distribution of a count $x$ is given by a binomial distribution: $x\sim \mathcal{B}(n,\theta)$. Further, suppose that the sample size $n\sim NB(\lambda,\kappa)$, where this ...
0
votes
0answers
68 views

Integration of multidimensional Gaussian

How could the following integration of a 6-dimensional Gaussian be achieved? Are there some techniques? (MMA code below) $$\int _{-\infty }^{\infty }\int _{-\infty }^{\infty }\int _{-\infty }^{\infty ...
4
votes
0answers
53 views

CDF of an order distribution derived from a sum of gamma random variables

I am interested in finding an analytic expression for the below cdf of an order distribution, whose form I now describe. Suppose that the time until a particular process occurs can be modelled as the ...
0
votes
0answers
31 views

How to calculate the average from the probability distribution? [closed]

I create a plot from the formula that I have for the probability distribution,, a parameter (I do not have data point). How can I calculate the average for that distribution that I have? Best
2
votes
2answers
296 views

Expectation of function of random variables (example Euclidean distance)

How the expectation value of a nonlinear transform of normal distributed variables can be approximated by Mathematica in case there is no analytical solution? Let's take the Euclidian distance of 2 ...
7
votes
1answer
124 views

About Silverman's bandwidth selection in SmoothKernelDistribution

I asked the following question in the site Cross Validated: https://stats.stackexchange.com/questions/444320/convergence-of-kernel-density-estimate-as-the-sample-size-grows/444479#444479. It was about ...
1
vote
1answer
69 views

Automate Poisson Football Scores Prediction

I would like to automate a simple poisson football scores predictions process. I started by importing and cleaning home and away England League team tables data to work on it with Poisson ...
2
votes
2answers
76 views

Fit probability distribution from weighted observations?

Consider an observable $X$ which follows some unknown statistical distribution $P$, with elements $x\in X$ in the interval $-1<x<1$. Consider also an observable $Y$ which follows a uniform ...
1
vote
4answers
125 views

Compute moments, variance, skewness, mean from the PDF of a non standard distribution

I have tried to compute Skewness and variance and moment using the code below, I have tried first to create a distribution from my PDF using the command ...
2
votes
0answers
67 views

Random Number Generation using LogNormalDistribution

I have a problem that I can't seem to figure out on my own due to limited knowledge of mathematics, and I was hoping I could seek help from the community. I would like to use ...
-1
votes
1answer
60 views

Does What I have ploted for Normal distribution or for my PDFcode?

Really , am confused and mixed in the same time , I have tried to plot the Histogram of my PDF which it is already integrated to 1 (Normalised) , I didn't succeed to compute anything related to that ...
0
votes
1answer
83 views

How I can Normalize the below given PDF?

I have tried to Normalize the below Code PDF with a such Constant K But I didn't succeed , I have used this instruction: ...
0
votes
0answers
37 views

How Do I can Generate a CDF Plot from Below PDF code and also it Histogram Plot?

I have tried many times to plot a CDF from the following PDF code , But I failed to get that however I have used the command CumulantGeneratingfunction[, ] but it coudn't work , any Help ?and also the ...
1
vote
0answers
31 views

Compute Confidence Interval for Binomial Distribution

I want to understand how to calculate hypothesis tests on a Binomial distribution. An example is something like A diagnostic test is claimed to be correct 96% of the time. On a sample of 75, 68 ...
0
votes
1answer
82 views

How can I show multiple PDFs derived from my distribution in one plot

My question is related to the This question. I want to plot different PDFs for a given random variable in the same plot using f[x_NumericQ]. For example, I have ...
0
votes
1answer
37 views

Plotting a cumulative binomial distribution [closed]

The curve is correct, however I am not sure why it is not fully touching the x- and y-axes; it's just floating in the middle of the plot. Here is my Mathematica code: ...
1
vote
1answer
72 views

How to include measurement error in FindDistributionParameters (using maximum likelihood)?

I am trying to fit a non-standard PDF to data using FindDistributionParameters. My custom distribution is defined like this: ...
0
votes
1answer
45 views

Dealing unexpected behavior of FindDistributionParameters

I want to extract the distribution parameters for a set of data. I know what the distribution is. However, I find that for different sets or even subsets of this data the values of the extracted ...
2
votes
0answers
42 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 ...
0
votes
1answer
46 views

How to fit a Weibull distribution function to histogram with unequal bins?

Whenever the function "FindDistributionParameter" is used in Wolfram Mathematica, it needs two inputs: raw data and distribution function. I have a problem where I have have data and I need to use ...
1
vote
1answer
45 views

Cumulative difference between discrete cumulative distribution functions

I would please like to ask for how to cumulate and plot the difference between cumulative disitribution functions (:=CDFs). Example: ...
0
votes
0answers
33 views

Univariate Gaussian Splitting

I would like to experiment a bit with univariate Gaussian Split libraries. This is essentially a constrained non-linear optimization (minimization) problem. There are multiple formulations of this ...
5
votes
1answer
82 views

Speeding up Probability using Monte Carlo

I have a recipe for generating custom distributions, which I want to use Probability[...] on, but am finding that with more than a few variables it very quickly becomes intractable (it runs for hours)....
1
vote
0answers
43 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 ...
0
votes
1answer
71 views

How to find de Mean and Variance of a defined distribution

I would like to find the Mean and Variance expressions for a Poisson-Lognormal Distribution $$f(x;\mu,\sigma)=\frac{1}{x!\sigma\sqrt{2\pi}}\int_{0}^{\infty}\lambda^{x-1} e^{-\lambda} e^{\frac{(log(\...
2
votes
0answers
96 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 ...
7
votes
3answers
141 views

How to replace $x$ and $x^2$ with different value?

I have an expression now expr = x + x^2 what I want to do is to replace $x$ with $k\times p$ , and $x^2$ with $[k\times p + k\times(k - 1)\times p^2]$. The ...
5
votes
2answers
105 views

What is the distribution of a random variable with pdf proportional to the product of two normal pdf's

I'm working my way through a nice e-book on Kalman filters, translating to Mathematica as I go and I've hit an interesting problem. In this section: https://nbviewer.jupyter.org/github/rlabbe/Kalman-...
0
votes
0answers
35 views

Expectation operator expression does not permit distribution parameters

It appears that the Expectation operator doesn't allow the presence of distribution parameters. Defining the Expectation operator...
2
votes
1answer
28 views

Find the Kernel distribution over an already known histogram

I have an estimated distribution over a parameter, however, the distribution is not continuous, and InterpolatingPolynomial cannot estimate my distribution good ...
1
vote
1answer
81 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
84 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}}...
4
votes
3answers
174 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
127 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
76 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
68 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
101 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
93 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
67 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
74 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
139 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
91 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 <...
1
vote
0answers
38 views

Index of cumulative distribution function

When trying to compute this ...
0
votes
3answers
112 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
105 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
71 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
147 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
424 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
59 views

Sampling Standard Deviation

Here I found a formula for the sample standard deviation: http://mathworld.wolfram.com/StandardDeviationDistribution.html Here is my simulation: ...