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

0
votes
0answers
22 views

Probability of occurrence of an event [on hold]

If n positive integers are taken and multiplied together then the probability that the product has 1,3,7 or 9 as it's last digit ?
2
votes
1answer
98 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
32 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
111 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
32 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
264 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
101 views

on Kolmogorov-Smirnov test

I found a problem to calculate Kolmogorov-Smirnov test statistic or p-value the data is ...
2
votes
0answers
45 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
43 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
106 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. ...
0
votes
0answers
26 views

how many even number faced dice will be their if 99 dices roll for eternity with some condition [migrated]

Consider a six ­sided dice with number from 1 to 6. Imagine you have a jar with 99 of such dices. You throw all dices on the floor so they all land at different numbers. You look at one dice at a ...
2
votes
0answers
49 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
35 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
108 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
81 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
125 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
51 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
80 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
82 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. ...
4
votes
2answers
123 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
82 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
80 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
88 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
69 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
63 views

How to include confidence intervals into ProbabilityScalePlot?

I use ProbabilityScalePlot[data, "Weibull"] to plot measured data and ...
5
votes
1answer
68 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
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
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
127 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
143 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
113 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
69 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
95 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
160 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
173 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
105 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
113 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
97 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
43 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
85 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
56 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
119 views

FindDistributionParameters of a sum of a mixture distribution

I have this Mixture Distribution of two Normal Distributions: ...
0
votes
1answer
79 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
247 views

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

Mathematica can't find a solution to this Expectation. ...
3
votes
1answer
81 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
189 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 = ...