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
1answer
68 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 ...
3
votes
2answers
110 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
70 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
52 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
74 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
62 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
56 views

How to include confidence intervals into ProbabilityScalePlot?

I use ProbabilityScalePlot[data, "Weibull"] to plot measured data and ...
5
votes
1answer
59 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
118 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
122 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
40 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
66 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
92 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
157 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
168 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
99 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
111 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
90 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
39 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
48 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
74 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
230 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
151 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
150 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
229 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
107 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
97 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
405 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
49 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
44 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
36 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
90 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 ...
3
votes
2answers
114 views

Calculating the conditional probability of discrete samples

I have two lists: a = {0, 1, 1, 1, 0, 1} b = {1, 0, 1, 1, 0, 0} I'd like to calculate the conditional probability of a given b; for example, $p(a=1 | b=0)$. Is ...
18
votes
2answers
276 views

Negative probability?

I am trying to get the sum of the squares of seven random variables, all uniformly distributed. This is what I tried. ...
2
votes
1answer
211 views

Reversing Autocorrect, aka how to find the word that was supposed to be there

When I receive messages from people using their smartphones I usually see typos and, worst, typos corrected by Autocorrect. Now, I receive messages in English, which is not my first language. I can ...
0
votes
1answer
70 views

Working with means and variances

My goal is to work out on the following equation: $$Mean(P)(1-Mean (P))\left (h + (1 - 2 h) (1 - \frac {Var (P)} {Mean (P) (1 - Mean (P))}) (1 - Mean (P)) + \frac {Var (P)} {Mean (P) (1 - Mean ...
1
vote
1answer
133 views

Bilateral Laplace Transform in Mathematica (to be used with Moment Generating Functions)?

I am trying to solve a linear ODE for a Kolmogorov forward equation to get a stationary distribution of a random variable. The easiest approach may be to transform the ODE with a two-sided Laplace ...
0
votes
0answers
45 views

Time varying Poisson rate using ParameterMixtureDistribution

I have a system in which there is a Poisson arrival process with rate $\lambda$. I need to split this process into two independent poisson processes $\lambda_i$ and $\lambda_u$. Where ...
2
votes
3answers
356 views

How do I plot two Gaussians/normal distributions with 2 different means and 2 different standard deviations?

This is probably very easy for someone with more experience, but I am trying to plot only two Normal distributions, but for some reason my Method plots 4, instead of 2. I have: ...