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
1 answer
60 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, ...
SciJewel's user avatar
  • 369
1 vote
1 answer
58 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} \...
sam wolfe's user avatar
  • 4,553
1 vote
1 answer
138 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 ...
Yaroslav Bulatov's user avatar
1 vote
1 answer
79 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!
Tin Trung Chau's user avatar
3 votes
0 answers
114 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 ...
Paul R's user avatar
  • 143
0 votes
0 answers
23 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, ...
-1 votes
1 answer
160 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 ...
Mark's user avatar
  • 15
0 votes
2 answers
88 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(...
Y. zeng's user avatar
  • 537
-5 votes
1 answer
140 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 ...
Mark's user avatar
  • 15
0 votes
1 answer
59 views

Normal Distribution of random plot

I have the following data, ...
a019's user avatar
  • 845
4 votes
1 answer
218 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 ...
John Taylor's user avatar
  • 5,397
0 votes
1 answer
67 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{...
Luke's user avatar
  • 237
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 ...
No Yeah's user avatar
  • 43
0 votes
2 answers
60 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 ...
Mahdi Razaz's user avatar
3 votes
0 answers
74 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: ...
A Day's user avatar
  • 59
4 votes
3 answers
221 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 ...
Mohamed Mostafa's user avatar
2 votes
1 answer
116 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 ...
Athanasios Paraskevopoulos's user avatar
2 votes
1 answer
136 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: ...
Athanasios Paraskevopoulos's user avatar
0 votes
1 answer
42 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 ...
PiE's user avatar
  • 437
0 votes
0 answers
41 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 ...
zjs's user avatar
  • 153
-5 votes
1 answer
97 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 ...
Hey Moon's user avatar
2 votes
2 answers
123 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: ...
Brian's user avatar
  • 133
2 votes
1 answer
81 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 ...
secavara's user avatar
  • 210
1 vote
2 answers
126 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 ...
John Taylor's user avatar
  • 5,397
1 vote
3 answers
186 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 ...
hare's user avatar
  • 406
0 votes
1 answer
48 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 ...
Jan's user avatar
  • 143
1 vote
1 answer
112 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 ...
user1936752's user avatar
2 votes
0 answers
65 views

Mathematica unable to realize simple distributional relationship

I was trying to find the CDF for the following problem: ...
Thomas Ahle's user avatar
3 votes
3 answers
273 views

Drawing a shaded area under a probability distribution

...
csn899's user avatar
  • 3,635
0 votes
1 answer
93 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 ...
user1936752's user avatar
1 vote
0 answers
62 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 ...
dearN's user avatar
  • 5,341
0 votes
0 answers
22 views

Creating Process Template from FindDistribution

may i ask if anybody knew where i wrong please? Im stuck in this step. I want to visualize Hidden Markov Model in which state from 2-20 is best with continuous emission, but it need starting value ...
Rahmat Nasrul's user avatar
-1 votes
1 answer
126 views

How to plot the frequency histogram of a given data? [closed]

...
csn899's user avatar
  • 3,635
0 votes
1 answer
113 views

How to find Specific Fit of a Distribution?

I want to fit a data set: ...
SAC's user avatar
  • 1,335
3 votes
2 answers
82 views

Why does Maximize return this unevaluated?

Maximize[{PDF[NormalDistribution[0, sigma], x], sigma > 0}, x, Reals] Just returns unevaluated (when, obviously, it should return ...
ben18785's user avatar
  • 3,167
1 vote
2 answers
187 views

Probability of a point being from the same distribution as sample [closed]

I have a sample of two-dimensional points {{x_,y_1},..{x_n,y_n}}, I've built a linear regression line, there seems to be a correlation between X and Y (Pearson's 0.662 if that matters). Now what I ...
user15933's user avatar
  • 173
0 votes
1 answer
74 views

Conditional Expectation of an autoregressive (AR1) Process

Suppose X is a time series that follows the process: $X[t]=\rho X[t-1] + \varepsilon[t]$ where $\varepsilon[t] \sim \mathcal{N}(0.0, \sigma)$, $\varepsilon[t]$ is IID and $X[0] \sim \mathcal{N}(0.0, \...
Baba Yara Fahiz's user avatar
6 votes
3 answers
400 views

Finding the mean and variance of a distribution

I have tried unsuccessfully to use Mathematica to derive both the expected value (mean) and variance of a particular statistical distribution of interest to me. The distribution is a discretized ...
CrimsonDark's user avatar
1 vote
2 answers
138 views

How to sample from a `MultinormalDistribution` with a positive semidefinite covariance matrix?

I'm trying to sample from a Gaussian process (GP) following these tutorials: https://peterroelants.github.io/posts/gaussian-process-tutorial/#Sampling-from-prior https://stephens999.github.io/...
ForceBru's user avatar
  • 155
1 vote
0 answers
36 views

Plotting a parametric function for a given prior distribution of parmaeters

I have a function $f(x, \alpha, \beta)$. The function is piecewise defined and not analytically integrable. I would like to do the following: draw from a distribution on $\alpha$ and $\beta$, compute $...
John Ritz's user avatar
5 votes
3 answers
560 views

How to plot the the maximum likelihood estimates?

I would like to find the code for the graphical representation of the maximum likelihood estimates. For that first, I find the estimate values using the the code given below ...
Deepthy Gs's user avatar
0 votes
0 answers
59 views

How does Mathematica work with multivariate distributions?

I recently found the AEP algorithm. Curious how Mathematica would handle the situation, I made an experiment: ...
user7427029's user avatar
0 votes
1 answer
74 views

How to obtain smooth distribution for the given datasets?

Consider a variable x defined in the range $$ \tag 1 x \in (1,10^{7}) $$ Let us assume that we have three datasets belonging to three different intervals of x: ...
John Taylor's user avatar
  • 5,397
1 vote
2 answers
185 views

How to plot correct empirical distribution?

I have data that represents number of values in intervals. So, I have intervals like: [0,1], [1,2], [2,3] and so on. My data is [23,11,3], which means in interval [0,1] there are 23 values, inside [1,...
joe963's user avatar
  • 11
1 vote
0 answers
64 views

Modeling Experimental data with a CDF

I have some data plotted above which relates two variables that were derived experimentally. I'm trying to fit a cumulative distribution function to it so that we can take a sample of Y at X. I've ...
BBirdsell's user avatar
  • 1,176
0 votes
0 answers
76 views

Discrete Plot of a complicated function containing Dirac delta or discrete delta function

I have tried to obtain the discrete plot of the following distribution function, which contains summations and integrations along with Dirac delta function, the Mathematica code of which is given ...
R. Bhattacharya's user avatar
0 votes
0 answers
34 views

Slow SmoothKernelDistribution of WeightedData

Consider some data in the form data = {{x,y,weight(x,y)},...}; I make wd = WeightedData[data[[All,{1,2}]],data[[All,3]]]; I ...
John Taylor's user avatar
  • 5,397
0 votes
0 answers
61 views

Parameter distribution from NonlinearModelFit result

Is it possible to construct a parameter distribution (e.g. Normal or StudentT) from the Estimate and Standard Error of a NonlinearModelFit result? The SE is the square root of the variance but what is ...
cadeFoster's user avatar
1 vote
1 answer
76 views

How can I calculate the moments of a truncated random variable?

I am using the Moment function to calculate the moments of an exponential random variable. as follows, Moment[ExponentialDistribution[3], 9] However, I need to ...
slow_learner's user avatar
4 votes
1 answer
72 views

Speeding up RandomVariate with custom probability distribution

I have the defined a custom distribution, which is a Gaussian where the exponent can be any real n greater than 0 (set to actually be >0.5 in use), i.e. ...
Xyive's user avatar
  • 115

1
2 3 4 5
17