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
45 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 ...
0
votes
0answers
37 views

Simple propability issue [closed]

I have a simple problem: I have 16 kitties. There is 1/2 chance to get a male and 1/2 chance to get a female. What is the probability to get at least a female? Then, if 10 kitties die, what is the ...
3
votes
1answer
113 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
42 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
31 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
96 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
167 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
68 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? ...
0
votes
2answers
370 views

PDF of binomial distribution and mixed binomial distribution

I want to plot the PDF of binomial distributed function and a mixed binomial distributed function, therefore I entered for the binomial distribution function the following: ...
1
vote
1answer
73 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 ...
16
votes
2answers
654 views

How to compute the inverse CDF properly?

Note: this has been fixed in version 9. I want to compute the CDF and inverse CDF of the hyperbolic distribution: ...
12
votes
1answer
165 views

NExpectation behaves oddly with EmpiricalDistribution

Note: this is fixed in version 9. My question concerns the usage of NExpectation and Expectation and why I see the behavior I ...
2
votes
0answers
60 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
64 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
67 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
118 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 ...
0
votes
0answers
89 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 ...
1
vote
1answer
50 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
74 views

Define shifted pdf

I defined a PDF called dist, for example like this one: ...
0
votes
1answer
34 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
96 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: ...
25
votes
6answers
2k views

Efficient way to generate random points with a predefined lower bound on their pairwise Euclidean distance

Using Mathematica what is an efficient way to generate a list of $n$ random two dimensional points $\{x_i,y_i\}$ where $i=1,...,n$ so that no two points $p_1$ and $p_2$ in the list has an Euclidean ...
4
votes
1answer
70 views
8
votes
1answer
605 views

Mathematica code for hidden Markov models (HMM)

I am looking for some simple Mathematica code to model an HMM with just a few states and an equal number of observable signals (emissions). I am hoping to generate sample paths and keep track of the ...
0
votes
0answers
41 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 ...
1
vote
1answer
79 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 ...
2
votes
3answers
318 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 that circle. I tried to ...
1
vote
1answer
144 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
134 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
197 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 ...
1
vote
2answers
146 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 ...
0
votes
1answer
159 views

Solve Probability of Distribution

Why does this work: Solve[Probability[x <= t, x \[Distributed] NormalDistribution[]] == 0.95 ,t] But this doesn't: ...
7
votes
1answer
101 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
150 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
86 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
70 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 ...
1
vote
1answer
146 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
111 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
76 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
181 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
291 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
112 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
97 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 ...
6
votes
1answer
133 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 ...
4
votes
4answers
122 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 ...
3
votes
0answers
141 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 ...
1
vote
1answer
274 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
48 views
3
votes
4answers
202 views

Descriptive statistics of two events

I am trying to use the descriptive statistics feature of Mathematica to answer the following question: suppose I have two events, A and B, whose occurrence is described by a normal distribution around ...
0
votes
0answers
48 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 ...