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

0
votes
0answers
34 views

Help with Multivariate ProbabilityDistribution

I wish to obtain numbers from ...
-2
votes
0answers
51 views

How to calculate math expectation [closed]

How to calculate math expectation of maximum of difference between two lognormal random variable: E[max(X-Y,0)] =? How to proceed?
0
votes
0answers
51 views

Constrained Nonlinear Optimization with expectations functions in the constraints

I am modeling an optimal compensation contract with a CRRA utility function : ...
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
68 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 ...
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
37 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
40 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} ...
2
votes
1answer
37 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 ...
4
votes
2answers
142 views

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

I calculate the Kolmogrov-samirnov test statistic for the following data: ...
0
votes
1answer
37 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 ...
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
115 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 ...
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 ...
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
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
116 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 ...
0
votes
1answer
93 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
53 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
84 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 ...
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
91 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 ...
1
vote
1answer
95 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 * ...
2
votes
1answer
94 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 ...
0
votes
1answer
73 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
0answers
77 views

How to include confidence intervals into ProbabilityScalePlot?

I use ProbabilityScalePlot[data, "Weibull"] to plot measured data and ...
5
votes
1answer
70 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 ...
0
votes
1answer
63 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. ...
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
55 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
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 ...
6
votes
1answer
132 views

How can I create a Distribution from its probability density function?

I have a probability density function. Is there a mechanism to create a Distribution object from it, such that normal Mathematica commands that usually work on ...
3
votes
2answers
174 views

How to extract the probability density function from SmoothHistogram? [duplicate]

I have some data.I plot the histogram with SmoothHistogram in Mathematica. If the y-axis of the histogram is my p(x) function, I want to plot f(x)=(1/n)ln(p(x)) ...
1
vote
1answer
43 views

Difference in output from R's mvtnorm and Mathematica/Java

Let a=$\mathcal{N}(6.532056,0.06532056)$,b~$\mathcal{N}(8.390961,0.08390961)$ and c~$\mathcal{N}(8.736566,0.08736566)$. We use $\mathcal{N}(\mu,\sigma^2)$ notation unless specified otherwise. We ...
1
vote
1answer
117 views

How determine The most possibility probable with programming

i have a scatter chart of probable of happen some thing like below chart link of google chart i what determine the probable The most point in below chart , can use a mathematic method to determine ...
1
vote
1answer
70 views

Stochastic Approximation and Simulation using Running Median

I have a function $$F(X_{t+1},Y_{t}^{med})= \alpha X_{t+1} + (1-\alpha) Y_{t}^{med},$$ where $$Y_{t}^{med} = Median(Y_1, Y_2,... Y_t).$$ Moreover, $Y_1 = X_1$ and $Y_t = F(X_{t},Y_{t-1}^{med})$ ...
3
votes
2answers
102 views

Expectation of a composite Markov-Gamma distribution

In a model I have a discrete two-state first order Markov process, defined by a (2x2) transition matrix with two free parameters. If the first state occurs then the process outputs zero for that ...
5
votes
1answer
167 views

Simulation Sample Paths for Stochastic Approximation Algorithm

Let $X_t$ be IID random variables in $[0,1]$ and CDF $F(\cdot)$. Suppose there exists a variable $Y_t$ given by: $Y_1 = X_1$ and $Y_t = \phi(X_t, \overline{Y}_{t-1}), \forall t >1$, where ...
7
votes
2answers
176 views

Why is mathematica giving wrong and incomparable results for the integral?

1) Integration of Gaussian Distribution with $(x,y,z)$ ranging from $-\infty$ to $\infty$ gives 1 as expected using this command in mathematica. (Total Probability = 1) $\sigma = 200000$ and ...
3
votes
1answer
107 views

Expected graph distance in random graph

I am trying to use the functionality of Expectation and Probability for random graphs, in particular for percolation models. ...