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

19
votes
2answers
278 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
216 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 ...
1
vote
1answer
76 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
136 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
46 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
386 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: ...
5
votes
1answer
108 views

MarginalDistribution with Symbolic range in ProbabilityDistribution

Given the following joint density: for 10 < x < 20, x/2 < y < x. To find the marginal density for X we do: ...
1
vote
1answer
108 views

Expressing a joint distribution for use in ContourPlot

I have $$X_1=T + W$$ $$X_2=2 T + 3 W$$ where $$W \sim N(3,5) \,\text{;}\,\, T \sim N(1,2)$$ and $$P(X=X_1)=P(X=X_2)=\tfrac{1}{2}$$ which I have awkwardly expressed as ...
3
votes
1answer
147 views

Determining the dimension of a probability distribution

Functions like Mean and RandomVariate clearly infer the dimension of the distribution passed to them. One can also usually ...
0
votes
1answer
65 views

Pattern matching with PDF, Distributed and multivariate distributions

I have defined a function to compute the Shannon entropy of a probability distribution: ent[p_] := Expectation[-Log[PDF[p, x]], x \[Distributed] p] This works ...
1
vote
0answers
71 views

An example of how to compute numerically the KL-divergence in mathematica [closed]

I wanted to compute an exact number for two probabilities that I am comparing. These are two normal distributions as: $$Normal(\mu = 5, \sigma = 4)$$ $$Normal(\mu = 5, \sigma = 5)$$ I decided to ...
3
votes
0answers
114 views

What can I do to improve the performance of my calculations?

I'm trying to express a simple probability problem in Mathematica, but am having trouble getting my calculations to execute at a reasonable speed. I have an object whose unknown location is modeled ...
3
votes
1answer
182 views

Put random points into a specific 2D subregion

I want to cover a particular subregion of the x-y plane with a random distribution. As this particular region is not a circle I encounter some problems declaring the permitted zone where to put ...
0
votes
0answers
98 views

Constrained maximum likelihood

Trying to solve a MLE with nonlinear constraints that need to be satisfied. However, the given solution do not match the constraints. Am I doing it correctly? ...
1
vote
1answer
94 views

Difficulty finding Expectation of a special function

I have a special function given as: $${\rm f}\left(r\right) ={1 \over \beta\lambda}\,2^{r/\beta} \exp\left({\left[2^{r/\beta} - 1\right]K \over \lambda}\right)$$ I should find the Expectation of ...
4
votes
0answers
80 views

Converting problem into form involving Probability

I want to solve the following problem symbolically, using Probability: What is the probability of the first random variate of a set to be present more than ...
1
vote
0answers
178 views

Slow mixture fitting when having ill-conditioned covariance matrices. How to make it faster?

I'm using Mathematica 9.0 to fit multidimensional observations with a gaussian mixture. To do so I first adapted these steps to ensure that the mixture parameters are well defined (see ...
3
votes
1answer
80 views

Where do Mathematica's probability functions draw a line in the sand for predicates?

Thinking about a recent question mis-posted here (belonged on math), I noted the following. A contrived example - probability that a or b are 1: ...
3
votes
1answer
309 views

Categorical Distribution

Suppose I want to do calculations with a random variable $X$ that has a simple categorical distribution (a.k.a generalised Bernoulli distribution or discrete distribution). I was expecting to be able ...
1
vote
1answer
78 views

How to define an n-variate empirical distribution function probability for any n?

I'm using Mathematica 9.0 to calculate the probability according to the empirical distribution function (EDF) of some sample data. Afterwords this is included in a maximization stage so I define this ...
2
votes
1answer
85 views

Define shifted pdf

I defined a PDF called dist, for example like this one: ...
0
votes
1answer
83 views

Calculate expected value of custom pdf

I've a custom pdf in the sense that it's the convolution of several other PDFs p[t_] := Convolve[p1[x],p2[x],x,t]; Now I want to calculate the expected value of ...
0
votes
1answer
123 views

PDF for Gamma Distribution not what I expect

I have plotted the the PDF for a Gamma Distribution with various parameters (e.g. 3 and 5) using Manipulate: ...
4
votes
1answer
97 views

Define customised distribution with discontinuous CDF

I have the following CDF: ...
0
votes
0answers
100 views

Probability Model

I have the following probability model: $(X_k|\text{ PastHistory}_{k-1}, \theta_0, \theta_1, \theta_2) \sim (\pi\cdot N(\theta_1+\theta_0\cdot X_{k-1},1)+(1-\pi)\cdot N(\theta_2+\theta_0\cdot ...
0
votes
0answers
43 views

Using an Interpolating Function as a probability density function [duplicate]

I have seen a couple of similar questions but have not been able to figure out a solution for my particular problem. I have a probability density function of two variables ...
2
votes
2answers
159 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 ...
1
vote
1answer
186 views

2D Markov Process

I have a homework project. I need to analyse a gambler's ruin where there are 6 possible outcomes of every wager with corresponding probabilities and payoffs and the gambler may vary the wager (say ...
1
vote
0answers
269 views

When are `If`, `Piecewise`, `Switch`, and `Which` interchangeable and when are they not?

Experimenting with joint dependent distributions via the TransformedDistribution function, I used the following to derive a distribution where the second variate is ...
1
vote
1answer
233 views

Detecting a nonlinear edge in a 2D point pattern

Following an earlier post here, I have generated a point pattern on the unit square $[0,1]\otimes[0,1]$, which is described by a piecewise constant intensity function constructed so that (in ...
4
votes
4answers
508 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 ...
1
vote
2answers
174 views

Analyzing Betting (Keno) in Mathematica [closed]

Keno is a popular lottery game that is available with all of the larger casino softwares. The player is given a ticket with 70 numbers on it. He picks 1 to 11 numbers on the ticket. 20 winning numbers ...
7
votes
1answer
148 views

How to create a spliced survival statistical distribution?

I am trying to use Mathematica for more of my reliability engineering work and am having trouble using SplicedDistribution. I have a Weibull distribution (dist1) associated with a low stress ...
2
votes
1answer
190 views

Making a histogram of a user defined random variable

Suppose I want to generate a histogram of $n$ trials a slightly complicated random variable in Mathematica. Is there an easy way to do this? For instance, to make a histogram of a normal variable one ...
0
votes
1answer
112 views

How can I type "aprox symbol in Mathematica? [closed]

I want to obtain a value of the Normal Distribution, but I can´t type "approx symbol" before Normal Distribution" to tell Mathematica that x FOLLOWS N[0,1] How can I do it? Probability[z >= 8.49, z ...
0
votes
1answer
72 views

Find the point that holds a given property

I have a normal distribution with mean 106, and a standard deviation of 8. I'm being asked to find the point that has the property that 25% of these values have this value or lower. What I've ...
0
votes
1answer
194 views

Solve Probability of Distribution

Why does this work: Solve[Probability[x <= t, x \[Distributed] NormalDistribution[]] == 0.95 ,t] But this doesn't: ...
4
votes
2answers
439 views

Why does this integral have a complex component?

I wanted to find the probability of my normally-distributed random variable being at least 15, so I set up this integral: ...
4
votes
2answers
145 views

Finding the characteristic function of a TransformedDistribution[]

I am trying to find the characteristic function of a sum of "named" distributions, though I am interested in how to use Mathematica to find the characteristic function of $$f(X_1,\ldots, X_n),$$ where ...
1
vote
1answer
88 views

How to use ProbabilityDistribution for a posterior expression [duplicate]

I am performing a Bayesian updating on a Lognormal prior. After combining the prior and likelihood and dividing by the normalization constant I get the following expression as the posterior: ...
1
vote
2answers
219 views

How to use Mathematica in my Problem as I would use it in Matlab

I would like to calculate the convolution of a function with itself for $n$ times. Let $n$ be $10$. For $n=1$, I wont make any calculation and $f0$ is my function, when $n=2$, I will convolve $f0$ ...
4
votes
3answers
345 views

Plotting the convolution of the same probability density function with itself

I would like to compute the integral $$q_n(x)=\int_{B}^A q_{n-1} (\omega)f(x-\omega)\mathrm{d} \omega,\quad q_1=f,\quad n\geq 1.$$ for a given density function $f$. Basically it is the convolution ...
0
votes
0answers
133 views

Discrete distribution binomial set up

I hope one of you guys can help me out. I am trying to visualize a discrete distribution based on a binomial distribution and a mixed binomial distribution. In the first step I started to determine ...
3
votes
4answers
106 views

Check whether a function of two variables is a probabilty distribution function

I have a function like this $f(x,y)=c\,y\,(y-x),\ \text{for}\ 0<x<2,\;-x<y<x$ and I need to find the value of $c$ such that $f(x,y)$ is a PDF. How can I do that? I know that the ...
7
votes
1answer
155 views

RandomVariate does not fill range of PDF of distribution

I've declared my own probability distribution as follows dist[a_, b_] := ProbabilityDistribution[Cos[(b x)/2]^2 Sinc[a x]^2, {x, -400, 400}]; When I try to ...
3
votes
0answers
178 views

Markov Chain for combined events?

I was wondering how to apply Markov steady-state chains to a simple case in genetics, eye colour. Assuming the probabilities of being brown, green or blue eyed, given your parents were a certain ...
4
votes
4answers
132 views

How do I emulate DiscreteUniformDistribution in Mathematica?

How do I define a function from scratch that emulates DiscreteUniformDistribution? As shown below, attempting to use ...
0
votes
0answers
48 views

Determine appropriate initial conditions for exit time

These are some constants: ...
1
vote
1answer
350 views

How to compute the Multifractal Spectrum of a Financial Series with WTMM

I would like to know if someone knows how to compute the Multifractal Spectrum of a Financial Time Series (Currency) througth the Wavelet Transformation Modulus Maxima (WTMM). I would highly ...
0
votes
0answers
55 views

Identify columns of a huge matrix just polynomially many rows chosen at random

I am interested in the following problem in combinatorics $\Cap$ Probability. Let $\lambda \in \mathbb{N}$ be a parameter. Consider a matrix of $2^\lambda$ rows and $2^\lambda$ columns. Each column ...