All Questions
Tagged with copulas or distributions
851 questions
0
votes
0
answers
106
views
Optimizing a While Loop for High-Precision Computation in Mathematica
Edit: Clarifying the Core Issue
i=x;
While[Abs[p1 - p2] >= p1 tol,
p2 = p1;
p1 += s *= i (mkn + i)/((k1 - i) (n1 - i));
i--;
];
The core of my ...
2
votes
1
answer
123
views
Fastest way to approximate CDF in Mathematica
I need a very fast way to approximate the CDF of HypergeometricDistribution in Mathematica.
I need to evaluate it for very large ...
5
votes
2
answers
353
views
2
votes
0
answers
137
views
Insights on using the HypergeometricDistribution functions in Mathematica
I'm trying to calculate the upper confidence interval for the hypergeometric distribution in mathematica and I came up with this very simple code.
...
0
votes
0
answers
21
views
Simulating data from a piecewise pdf occasionally returns an error [duplicate]
In the following code, I generate data from a piecewise PDF. Usually, I get a sample size of ns, but sometimes I get an error message:
Error: RandomVariate::unsdst:...
0
votes
2
answers
101
views
Fitting data to a Log-normal distribution (2)
I used the stack exchange code to fit a Gaussian Model to
...
0
votes
1
answer
63
views
Custom (semi-circle) distribution not playing well with RandomVariate?
I have created a custom probability distribution that is a semi circle with area 1:
myD = ProbabilityDistribution[Sqrt[2/Pi - x^2], {x, -Sqrt[2/Pi], Sqrt[2/Pi]}]
I ...
1
vote
0
answers
39
views
Cannot recover Marginal Distribution from Product Distribution
In this simple example MarginalDistribution is unable to recover the marginal distribution from a Product Distribution. Why does it fail?
Start with a simple empirical distribution (It is a discrete ...
4
votes
1
answer
121
views
Best way to implement the "plus-distribution" for very long expressions?
I'm at my wits end here. Is there an efficient way to implement the following distribution into MMA:
$$\int_0^y dx \frac{f(x)-f(y)}{y-x}$$
where $f/1-x$ can be analytically integrated. The difficulty ...
0
votes
0
answers
31
views
SmoothKernelDistribution only uses 1 core
I have a huge amount of datasets, each containing many elements, and trying to convert it to PDF using SmoothKernelDistribution. I see that applying it to 1 dataset ...
2
votes
1
answer
100
views
0
votes
2
answers
205
views
Log Pearson Type III Distribution
Has anyone managed to implement the Log-Pearson type III distribution in Wolfram. To determine the parameters of the distribution over the data array using the FindDisributionParameters function?
Here ...
0
votes
0
answers
41
views
The "StandardGaussian" bandwidth selection method in the SmoothKernelDistribution function
I have a list of points which follow the Gaussian distribution:
...
3
votes
1
answer
239
views
How to use Mathematica to find the maximum expected value of multiple normal distributions?
Is it possible to calculate the maximum expected value of $ n (n\geq 2) $ independent (identical distributed) random variables that follow a normal distribution? If possible, how to find it? If it ...
3
votes
1
answer
444
views
Plot fails to plot. What am I doing wrong?
The below code executes. If I uncomment the Plot, it runs for a while and outputs nothing, not even the Mean and Variance.
...
0
votes
0
answers
92
views
How to find a fit for the following data?
Consider the following function:
...
1
vote
1
answer
133
views
How to quickly sample from the following distributions
Consider the following distributions:
...
10
votes
5
answers
896
views
Create n random points on [0,1] with minimum distance
Given a positive integer n and a small positive real number s.
How to create distribution for ...
0
votes
1
answer
49
views
Log probability of compound Poisson distribution [closed]
Does anyone know how can I find the analytic and numerical log probability of compound Poisson distribution implemented in mathematica?
https://reference.wolfram.com/language/ref/...
0
votes
1
answer
74
views
Estimating the shape of the distribution of histogram
Here is the data:
data = {37., 76, 81, 81, 28, 29, 18, 18, 27, 44, 18, 17, 70, 87, 45,
32, 88, 20, 18, 44, 17, 51, 24, 37, 24, 21, 18, 18, 17, 44, 25,
16, 45, 31, 74, 38, 16, 35, 17, 44, 34, 27, 87, ...
1
vote
1
answer
90
views
How to compute a weighted mean as a measure of central tendency?
Imagine I have data points in triplicates, as follows
$$
L=\begin{pmatrix}
p_{11} & p_{12} & p_{13}\\
p_{21} & p_{22} & p_{23}\\
& \vdots &\\
p_{n1} & p_{n2} & p_{n3}
\...
2
votes
2
answers
246
views
How to randomly sample small rotations?
I need a random rotation matrix that rotates random vectors by $\approx \arccos 0.9$
RandomVariate[CircularRealMatrixDistribution[n]] gives rotation matrices that ...
1
vote
1
answer
90
views
How to show all bandwidth in adaptive bandwitdh KDE?
I have implemented the KDE distribution finding for a dataset. I apply the adaptive bandwidth method; I want to plot the change in bandwidth over the entire distribution. How can I do it? Thank you!
3
votes
0
answers
128
views
FindDistribution from moments
There is a function FindDistribution that finds a distribution from the given data.
But what if I'm given moments and what to find a distribution.
Is there any ...
0
votes
0
answers
33
views
Generate samples from multivariate correlated data with non-parametric cdf
I have 40 samples that contain information about 6 variables (hence a 40x6 data matrix).
Each variable (column) has a cumulative distribution function (marginal distribution) based on the 40 values, ...
0
votes
1
answer
171
views
Uniform distribution in polygon [closed]
For defined in the condition of random values:
The two -dimensional law of the distribution of the random vector $X_I = (X_{I_1}; X_{I_2})$, one-dimensional(1D) laws of the distribution of the ...
0
votes
2
answers
130
views
Why is Mathematica's integral from negative infinity to positive infinity of the normal distribution probability density function not 1? [closed]
As we know, the integral from negative infinity to positive infinity of the normal distribution probability density function is 1. However, in Mathematica, it only returns
$\frac{1}{2} \text{erf}\left(...
-5
votes
1
answer
161
views
Uniform distribution in trapezoid [closed]
Model the law of distribution of a random vector Xi=(Xi1; Xi2) and vector (min{Xi1; Xi2},max{Xi1; Xi2}) using 100 tests, construct a cloud of points and a regression line on the plane. Random ...
0
votes
1
answer
76
views
Normal Distribution of random plot
I have the following data,
...
4
votes
1
answer
235
views
How to quickly sample points from the given PDF data?
Consider some data (distr.dat). It is a tabulated PDF: x, y, z, PDF[x,y,z], where x is some parameter (and the integral of ...
0
votes
1
answer
77
views
Numerically testing integrals which evaluate to Dirac delta distributions
For non-distributional integrals, it is very useful that one can test integral equations numerically, e.g. if I have some argument to believe that
$$\int_0^{\infty}dx e^{-a x}=\frac{1}{a},\qquad \text{...
3
votes
1
answer
83
views
Is there any general solution exist for $\sum_{i=1}^{N} \frac{1}{B(x+i, i)}$ function? [closed]
$\sum_{i=1}^{N} \frac{1}{B(x+i, i)} = \frac{1}{B(x+1, 1)} + \frac{1}{B(x+2, 2)} + \ldots + \frac{1}{B(x+N, N)}$
where ${N}$ is fixed value. is there any simple expression exist for x in the above ...
0
votes
2
answers
62
views
Modifying horizontal axis of a PDF plot
I have a bunch of particles that I can measure their volume.
PDFs of the size distribution by volume of particles, v(a), measured are reasonably well represented by lognormal distributions of the ...
3
votes
0
answers
88
views
How can I calculate P-Value for a custom distribution?
I used DistributionFitTest but it works only with a defined distribution.
This is the distribution that I used:
...
4
votes
3
answers
229
views
Integration involving two DiracDelta with variable limit
I want to write a code to evaluate
$$ \int_0^{t-1}\frac{\delta(z-1)}{z}\frac{\delta(t-z-1)}{t-z}dz$$
which should gives the answer $$\frac{\delta(t-2)}{t-1}.$$
I tried to write the code
...
2
votes
1
answer
160
views
SIR Parameter Estimation in Mathematica
All infected individuals go through an incubation period, which lasts on average for 4 days. During this time, individuals are not infectious, nor do they have any excess mortality risk.
All infected ...
2
votes
1
answer
145
views
Convert R code to Mathematica code of Poisson log-likelihood for the epidemic curve
I want to define a function that simulates the model for a given combination of parameters and calculates the Poisson log-likelihood for the epidemic curve of reported cases:
...
0
votes
1
answer
48
views
Trying to use ProbabilityDistribution for custom distribution - Getting errors/warnings I don't understand
I have this custom distribution that I want to use in Mathematica, but there
appears to be some sort of problem I don't understand.
Also, when I compute the mean for the custom distribution via
...
0
votes
0
answers
42
views
Combinations of distributions to be called with `RandomVariate`
I'd like to manipulate distributions that I'm going to retrieve using RandomVariate; e.g., I would like to take
...
-4
votes
3
answers
181
views
Unable to check own distribution
Good afternoon I need to estimate different distributions from some data. Among these distributions, it is necessary to use the Kritsky-Menkel distribution. I set a formula for the distribution ...
2
votes
2
answers
134
views
Calculating Distributions that Have Dependencies
I want to calculate a distribution from a function that depends on several variables, where there is an interdependency between the variables. This works:
...
2
votes
1
answer
84
views
What distribution corresponds to the asymmetric Around?
The documentation for Around, https://reference.wolfram.com/language/ref/Around.html, indicates that
For linear computations, Around[x,δ] behaves like a number whose values are distributed according ...
1
vote
2
answers
133
views
What is the best (fastest and accurate) way to obtain PDF from the given dataset?
Consider some list of two coordinates, points, generated by some arbitrary function function1 (which is a pdf up to a ...
1
vote
3
answers
188
views
How to extract as large a number as possible by random sample? [closed]
When I extract a element from a list by random sample, I want to extract as large a number as possible
(It mean it's not always extracted the max value.)
For example, when I take a element by random ...
0
votes
1
answer
57
views
Expression for variance of a truncated distribution as a function of the point of truncation
I am working on a project where I need to calculate variance of a truncated distribution. Suppose $X$ has some distribution and $x\in\mathbb{R}$. I am interested in $var(X|X\leq x)$. Given some ...
1
vote
1
answer
150
views
How is InverseErf related to the inverse normal distribution?
The inverse function of the standard normal cdf is
f[x_] := InverseCDF[NormalDistribution[0, 1], x]
I also have
...
2
votes
0
answers
71
views
Mathematica unable to realize simple distributional relationship
I was trying to find the CDF for the following problem:
...
3
votes
3
answers
353
views
0
votes
1
answer
144
views
Expansion of standard inverse normal cdf
Let $\Phi: x\rightarrow y$ be the CDF of a standard normal distribution. The range of $\Phi(x)$ is $[0,1]$ and the domain is all real numbers.
I want to get a series expansion of $\Phi^{-1}(y)$ around ...
1
vote
0
answers
63
views
I am unable to improve the (MAProcess) time series model
I am a time series novice and have been learning the art/trade from examples while being governed by the NIST handbook (ch.6, sec.4).
My question is regarding:
How to improve the estimated time ...