Tagged Questions

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

2
votes
0answers
32 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
34 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. ...
0
votes
0answers
38 views

Simulating a 3d-Sphere and diffusion process (eg. Brownian motion) [closed]

I am new to simulating Brownian motion and I would appreciate any help. What would be some good books to get me started on simulating 2d and 3d Brownian motion? Then if it is easy for you, can you ...
1
vote
2answers
102 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
64 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
118 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
50 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
77 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
73 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. ...
0
votes
0answers
16 views

Size and Power of Test: Poisson Distribution [migrated]

In a homework problem, I am given a Poisson distribution with lambda = 1 as null hypothesis, lambda greater than or equal to 2 as an alternate hypothesis, and 3 as a test statistic. I am instructed to ...
4
votes
2answers
118 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
71 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
58 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
77 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
66 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
59 views

How to include confidence intervals into ProbabilityScalePlot?

I use ProbabilityScalePlot[data, "Weibull"] to plot measured data and ...
5
votes
1answer
60 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
60 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
66 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
53 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
84 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
122 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
130 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
41 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
112 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
67 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
94 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
158 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
171 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
101 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. ...
1
vote
1answer
112 views

Simulation Beta Distribution

Suppose a function such as: $\phi^{\alpha} (x,y) = \left\{ \begin{array}{l l} \alpha x & \quad \text{if $x < y$}\\ x & \quad \text{if $x = y$}\\ \alpha x + (1 -\alpha) & ...
1
vote
1answer
92 views

Parameter Estimation of a mixture of sums of Lognormals

Let $X$ be a random variable that is of a mixture distribution of two lognormals (with the same sigma), so $X \approx p\cdot \mathcal L (\mu_1, \sigma) + (1-p)\cdot \mathcal L (\mu_2,\sigma)$. Now ...
0
votes
1answer
40 views

Using ImplicitRegion to define an ellipse around Multinormal distribution for integration

I have both a 2D 'MultinormalDistribution', and also a single xy point, and I would like to be able to calculate the probability of this point (given the multinormal distribution) and also plot an ...
1
vote
1answer
84 views

Manual maximum likelihood estimation of a mixture with no closed form

Let $X$ be a random variable that is from a mixture of two Lognormals (Lognormals(mu1,sigma) and Lognormals(mu2,sigma)) and set $Y=X_1+X_2+...+X_{10}$ a sum of 10 random variables from this mixture. ...
0
votes
1answer
51 views

Probability of xy point on bivariate normal distribution [closed]

I have a bivariate normal distribution and I am trying to calculate the probability of finding a point at a certain distance from the mean, so far with limited success. My approach has been to build ...
2
votes
1answer
108 views

FindDistributionParameters of a sum of a mixture distribution

I have this Mixture Distribution of two Normal Distributions: ...
0
votes
1answer
77 views

Inclusion-Exclusion Principle Implementation

I would like to know how I can write a Mathematica code for the Inclusion–exclusion principle. The formulas governing it are: $ P(\bigcup_{i=1}^n A_i)=\sum_{k=1}^n (-1)^{k-1} ...
6
votes
4answers
234 views

Conditional Expectation — How can Mathematica find a more general closed form?

Mathematica can't find a solution to this Expectation. ...
3
votes
1answer
79 views
0
votes
0answers
82 views

How to be faster at making a frequency list of increasing steps

I want to find propabilities of having a sequence in a list, by using frequencies. The case is that you will bet on an increase when the last event had an increased and bet on derease when the last ...
2
votes
2answers
161 views

Finding Expectation of function of a Log-normal distribution

Say $Y=g(X)$ and $p_X = \frac{e^{-\frac{(\mu -\log (x))^2}{2 \sigma ^2}}}{\sqrt{2 \pi } x \sigma }$ is Log-normal density function: [Wiki] Find E[Y]? Since $E[Y] = \int_0^\infty y f_Y \ dy = ...
7
votes
0answers
151 views

Calculating probabilities symbolically

Is there a way to solve for statistical quantities analytically/symbolically in Mathematica? example 1: Lets say that I want to do a calculation that requires Bayes theorem. I know p(a), p(b) and ...
4
votes
2answers
230 views

Function given exact arguments returns hugely different value than it returns when given equivalent inexact arguments

I was trying to compute the probability that a coin is from a particular underlying distribution given that a particular set of tosses was observed. (I know this can be done in a different way, but I ...
0
votes
1answer
113 views

Generating a list of standard normal random variables

Im trying to generate a list of random (standard) independent normal variables. For this, I first generate a random list of, say, 100 real numbers in the range [0, 1000], and then make them standard ...
6
votes
1answer
98 views

Why am I getting wildly incorrect results from FirstPassageTimeDistribution with inexact transition matrix?

Working on some large systems using DiscreteMarkovProcess, I changed the transition matrix to machine precision vs using exact values, which sped things up handily. ...
5
votes
1answer
439 views

Is there a free version of the Springer book “Mathematical Statistics with Mathematica”?

Is there a free version of the Springer book: $$\text{Mathematical Statistics with Mathematica}$$ by Rose and Smith ... available on the internet?
0
votes
0answers
51 views

Expectation taking unusually long to evaluate

I am trying to evaluate an expectation, but it is taking an extremely long time although the expression itself should not be too complicated. My code is ...
0
votes
0answers
45 views

Symbolic manipulation of the moments of an unknown distribution

I'm curious as to whether it's possible to get Mathematica to simplify/manipulate/expand basic expectations, conditional expectations, sums of random variables, etc. A simple example might be: ...
0
votes
0answers
38 views

Chi square: compare two different distribution

I try to compare two file with two different distribution of numbers. So i have random1.dat and random2.dat each one are vectors of more then 1000 rows. I saw from this question Doing a chi-square ...
0
votes
1answer
91 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 ...