Questions about performing probabilistic calculations, especially those concerned with the Mathematica commands Probability, Expectation and the various functions related to distributions such as NormalDistribution, CDF, PDF etc.

learn more… | top users | synonyms

1
vote
3answers
129 views

Find 2 points in a normal distribution with these given properties

I would like to find a and b. How should I code this in Mathematica? What I did wrong? ...
30
votes
7answers
2k views

Efficient way to generate random points with a predefined lower bound on their pairwise Euclidean distance

Using Mathematica what is an efficient way to generate a list of $n$ random two dimensional points $\{x_i,y_i\}$ where $i=1,...,n$ so that no two points $p_1$ and $p_2$ in the list has an Euclidean ...
6
votes
1answer
260 views

Speeding up the non-negativity algorithm for multilinear function with interval probabilities?

The algorithm is a branch-and-bound algorithm that calculates the non-negativity of a multilinear function with interval probabilities. The lines 9-11 has an optimization that is explained on the ...
20
votes
3answers
356 views

Negative probability?

Bug introduced in 9.0.1 and fixed in 10.0.2 I am trying to get the sum of the squares of seven random variables, all uniformly distributed. This is what I tried. ...
0
votes
0answers
52 views
1
vote
0answers
37 views

Why is Plot3D applied to TransformedDistribution in 2 random variables so slow?

I am trying to plot 3D, the pdf of a TransformedDistribution made up of random variables. So I can see the pdf in 3D, similar to this answer here Visualizing a 2-dimensional PDF But it seems to take ...
1
vote
1answer
33 views

Specifying that hierarchical probability distribution conditional on independent random parameters

I would like to create a ParameterMixtureDistribution to model the following: $X \sim $ Binomial($N,P$) $N \sim \mathrm{Poisson}(\lambda) \perp P \sim ...
0
votes
0answers
30 views

Mixture / Hierarchical Distribution from Conditional

How does Mathematica handle Hierarchical distributions. For example, if I have X|Y ~ Poisson(Z) Y ~ Exp(lambda) Z ~ Normal(0,1) First, of all, the distribution of X is only given conditionally and ...
0
votes
1answer
69 views

probability calculation with two independent normal RVs

I don't understand why Probability[X < Y, {X \[Distributed] NormalDistribution[0, 1], Y \[Distributed] NormalDistribution[0, 1]}] gives 1/2 while we know ...
0
votes
1answer
109 views

Integration of linked PDFs over probability simplex

I'm trying to integrate the following expression: f[a1,p1+p2+p3+p4]*f[a2,p2+p3+p4]*f[a3,p3+p4]*f[a4,p4] Where ...
1
vote
1answer
48 views

Find a probability with random variates from the same distribution

I'm trying to find Probability involving 3 random variates from the same distribution, but Mathematica does not seem to solve it. ...
0
votes
1answer
38 views

Central Limit Theorem - solve for a const, given probability

I hope this is not a very complicated question, but I have problems finding the answer. Quite often, I need to calculate something like this: $P(-a<\bar{x}<a) = p$, where $\bar{x}$ refers to the ...
0
votes
0answers
10 views

In Mathematica, how to calculate marginal probability of continuous conditional distributions? [duplicate]

I have random variables A and B, given by Beta distributions. This can be easily defined in Mathematica. I have a conditional probability P(C|A,B) which I custom-design as a function. The function ...
1
vote
1answer
42 views

There is an higher probability to win with 3 dices versus 2 or with 4 dices versus 3?

In Dice wars, you gain a territory rolling the dices you have in an adiacent territory (almost like Risk game). If I have more options to choose, there are more chances to win with 3 dices versus 2 ...
0
votes
1answer
49 views

probability going outside 1 (due to optimization violation of constraint)

I am working on an optimization, which involves the following density: ...
2
votes
1answer
100 views

How to get a more compact form of this probability calculation?

Inspired by the probability calculation here, I am trying to solve a little general one: $$\mathbb{P} (\sum_{i=1}^{m-1} A_i + \sum_{i=1}^{m} S_i < L < \sum_{i=1}^{m} A_i + \sum_{i=1}^{m+1} ...
4
votes
2answers
147 views

what is The Formula behind the Kolmogorov-Smirnov test statistics?

I calculate the Kolmogrov-samirnov test statistic for the following data: ...
5
votes
1answer
277 views

How to solve this probability symbolically or numerically?

I am trying to calculate the following probability $$\mathbb{P} \big(\sum_{i=1}^{m} (A_i + S_i) \le L < \sum_{i=1}^{m+1} (A_i + S_i) \big)$$ where, $$A_i \sim \exp(\lambda), \quad S_i \sim ...
2
votes
1answer
38 views

TransformedDistribution using n iid random variables

How do I create a TransformedDistribution that uses $n$ independent identically distributed (i.i.d.) random variables? For example, I can derive a chi-squared ...
0
votes
1answer
39 views

Combining two SmoothHistogram plots without normalization of each

I'm trying to plot a density of states out of a list of energy values, and on it I want to include another over-layed plot with it that shows some fraction of that density of states at different ...
2
votes
1answer
116 views

on Kolmogorov-Smirnov test

I found a problem to calculate Kolmogorov-Smirnov test statistic or p-value the data is ...
2
votes
0answers
49 views

Belief Network, Bayesian network

There is already a question about simulating Bayesian networks with Mathematica (Mathematica Package for Bayesian Networks). However, are there any packages or approaches which help in computing the ...
3
votes
2answers
115 views

RandomFunction and Histograms

RandomFunction[QueueingProcess[3, 5], {0, 15}] Histogram[data, Automatic, "PDF"] gives a very nice way to see the histogram based on the specified process. ...
2
votes
1answer
54 views

Statistical Analyzis of Observed Data (Queuing Process)

Basically I have a process that belongs to a certain state at any point of time. However, the time intervals are not fixed (in fact they are exponentially distributed). Essentially, the data points ...
2
votes
0answers
59 views

Simulating Dynamic Priority Queues

I have found several examples of static priority queue implementations: there are two classes of items, with the exponential interarrival times. The service times are also exponential. The first-class ...
0
votes
1answer
38 views

Understanding `TransformedDistribution` behavior on two similar lines of code

The two following lines of code does not give the same output. Mathematica manages to calculate the first one but fails to calculate the second one. ...
1
vote
2answers
117 views

Calculate expected value of piece-wise pdf

I have the following PDF of a random variable: $f(x)=\begin{cases} 1 & \text{if}\ \ \ 0<x<\frac{1}{2} \vee 1 < x < \frac{3}{2}\\ 0 & \text{otherwise}. \end{cases}$ How can i ...
1
vote
1answer
96 views

Where can I find a good tutorial for stochastic modeling using Mathematica?

I am a newbie in Mathematica and I aim to use Mathematica mostly for stochastic modeling (to develop and analyze models in evolutionary biology). Note that I am not necessarily a great mathematician ...
1
vote
1answer
129 views

What is the PDF of a variable where a parameter is itself a random variable?

Question How do we analyze in Mathematica cases where a parameter in a Probability Density Function (PDF) varies according to another PDF? Consider the following example... Example The text below ...
2
votes
1answer
54 views

Create a ProbabilityDistribution

I am trying to wrap my head around the function ProbabilityDistribution. For training purpose, I'd like to recreate the binomial distribution (without using it) so that the two code lines return the ...
1
vote
1answer
85 views

Function of a random variable

Here is a probability density function (PDF) pdfq[q_] = C q^(4 n ν - 1) (1 - q)^(4 n μ - 1) $$P_q(Q=q) = C q^{4 n\nu - 1} (1 - q)^{4 n \mu - 1}$$ I'd like to ...
14
votes
2answers
1k views

Obtaining joint distributions and conditional distributions using Mathematica

I have two multivariate Gaussian distributions $p(x)$ and $p(z)$ with mean vectors $m_x$ and $m_z$, and covariance matrices $\Sigma_x$ and $\Sigma_z$. my model is a simple linear model $x = W z+n$ ...
9
votes
2answers
980 views

Mathematica Package for Bayesian Networks

Are there any packages that allow the simulation of Bayesian Networks with Mathematica? I found what seemed to be a promising package (Dynamics) on a Brown University URL, ...
1
vote
1answer
88 views

Problem using Compiled Function within NProbability

I've built a very simple function to estimate the probability for a Long Straddle (derivative strategy) to be positive at expiration. ...
5
votes
2answers
135 views

Getting the Cumulative Distribution Function of f(x) from a dataset of x

I've a data set $\mathcal{X}$ which consists of randomly generated numbers. Let's say for example data = RandomVariate[ExponentialDistribution[1], 10^4]; My aim ...
0
votes
1answer
93 views

On plotting the Weibull distribution

First: How can I plot the Weibull distribution with parameters a = 2 and b = 3.5 on the range of ...
4
votes
4answers
535 views

Generate random points in a region with higher probability in a sub-region

I am trying to generate random samples of points in the unit square in such a way that points inside a given circle are twice as likely to be selected as points outside of that circle. I tried to ...
2
votes
1answer
95 views

Choosing The Best Fitted Probability Distribution Model

The following Example 20 Obs and i used Goodness of fit test with Exponential distribution, another time with Weibull distribution and third time with Pareto distribution .All of them are significant ...
1
vote
1answer
97 views

Estimating Confidence Interval Variance covariance matrix from weibull distribution

In The following Example 50 obs . I estimated distribution parameters (by point) but *i want to estimate parameters by confidence interval and calculate covariance matrix i need help * ...
0
votes
1answer
76 views

Estimating Parameters of a Custom Distribution

The problem is I can not get estimation of parameters of any custom probability distribution (distributions are not built in Mathematica), here is an example: First: I entered random numbers of ...
2
votes
1answer
85 views

Probability evaluation fails with equals condition

The following evaluation fails (the result is just the copy of the input) $$\text{Probability}[0<x\leq a | x-y=t,\{x\ {ExponentialDistribution}[\lambda ],y\ {ExponentialDistribution}[\lambda ...
0
votes
1answer
574 views

PDF of binomial distribution and mixed binomial distribution

I want to plot the PDF of binomial distributed function and a mixed binomial distributed function, therefore I entered for the binomial distribution function the following: ...
0
votes
1answer
65 views

Moment generating function for custom distribution [closed]

For some reason the following fails. I tried everything I could, and I don't know what else to try. ...
2
votes
0answers
78 views

How to include confidence intervals into ProbabilityScalePlot?

I use ProbabilityScalePlot[data, "Weibull"] to plot measured data and ...
5
votes
1answer
71 views

Speedup of KL Divergence by Monte Carlo Simulation

I started with Mathematica about just a week, so I don't know how to take all of this environment. What I want to know is if there is a way to speedup my code to compute the KL-Divergence of Gaussian ...
3
votes
1answer
68 views

Why doesn't this invocation of Probability work? [closed]

I'm trying to invoke this Probability[x < 3, x ≈ DiscreteUniformDistribution[{1, 6}]] Why doesn't Mathematica execute this and give me an actual number?
3
votes
1answer
56 views

TransformedDistribution with respect to new variable

Given a custom pdf $f_x(x)$, I'm trying to find it's transformation $f_y(y)$ where $$y=x^2$$ and $$f_x(x)=30*x^2 (1 - x)^2, 0<x<1$$ I tried to using the following commands: ...
2
votes
2answers
190 views

Summing Normal random variables

I would like to plot the graph of the sum of two random variables.So, I wrote Plot[PDF[NormalDistribution[0, 1]+NormalDistribution[0, 1], x], {x, -10, 10}] Why ...