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
1answer
19 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
26 views

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

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
89 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
165 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
67 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
71 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 ...
2
votes
0answers
59 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
61 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
116 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
48 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
92 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
67 views

Define customised distribution with discontinuous CDF

I have the following CDF: ...
0
votes
0answers
88 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
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 ...
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
130 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
195 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 ...
2
votes
3answers
311 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
2answers
145 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
100 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
84 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 ...
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: ...
1
vote
1answer
137 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
110 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
75 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
179 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
288 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
111 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
96 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
128 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
140 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
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 ...
0
votes
0answers
47 views

Determine appropriate initial conditions for exit time

These are some constants: ...
1
vote
1answer
270 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

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 ...
1
vote
1answer
51 views
0
votes
1answer
111 views

Convert probability example to a distribution

Consider a box which contains 30 balls. 10 red, 10 white and 10 blue balls. There will be picked 4 balls randomly, without putting the balls back to the experiment. My question is: How do I create a ...
2
votes
1answer
168 views

Compute Correlation between two binary variables

$X_1$ and $X_2$ are two binary stochastic variables with simultaneous probabilitydistribution: $$ \begin{matrix} &X_2=0&X_2=1\\ X_1=0&0.30&0.17\\ X_1=1&0.08&0.45 ...
2
votes
2answers
120 views

Conditioned Probability Task

I have this task with two questions I would like to compute in Mathematica. Suppose a pair of random variables $(X, Y)$ has a equal distribution on the following 7 points: $\begin{matrix} ...
6
votes
3answers
351 views

Calculate probability function

I would like to calculate the following with Mathematica: Let $X$ be a random variable with probability function $$p(x)= \left\{ \begin{matrix} \frac{x}{6} & \text{for }x \in \{1,2,3\}\\ 0 ...
12
votes
1answer
174 views

Randomness test suites that can be invoked from Mathematica

There are several test suites referenced at csrc.nist.gov designed to test a (pseudo-)random byte sequence for randomness, and discover possible skews, correlations, patterns, or other hidden ...
0
votes
2answers
365 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: ...
0
votes
1answer
118 views

plot probability

Hi I just want to flatten a function, I tied it with Joined->True, but it did not work, hope somebody of you can help me. This is my code: ...
2
votes
1answer
184 views

Expectation function does evaluate my expression

I am trying to evaluate the expression Expectation[(B x (-6 b + 12 a n0 + B x + B^2 x^2))/(2 (6 a + B x + B^2 x^2)), Distributed[x, BetaDistribution[α, β]]] ...