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

3
votes
2answers
794 views

Empirical Cumulative Distribution Function

I have a data set of the form $d=\{(y_1,x_1),(y_2,x_2)...(y_n,x_n)\}$ for a large $n$. A non-parametric plot of this data (a scatter plot where all observations are sorted along $x$ and joined with a ...
10
votes
4answers
508 views

How do I solve this probability problem with Probability?

Consider a stick of length 1. Pick two points uniformly at random on the stick, and break the stick at those points. What is the probability that the three segments obtained in this way form a ...
1
vote
1answer
120 views

PDF on TransformedDistribution of two BinomialDistribution too slow

I'd been doing my own convolutions of distributions for some calculations, decided to use built-ins. With ...
4
votes
3answers
559 views

Graphical Plots of PDF and CDF

I have a joint density and distribution function that I want to plot in a meaningful way, (i.e., want to be able to see how the functions behaves as changes in x and y happen simultaneously. If ...
16
votes
3answers
916 views

What is the average of rolling two dice and only taking the value of the higher dice roll?

I am referencing to this question on mathunderflow: What is the average of rolling two dice and only taking the value of the higher dice roll? Now I tried: ...
2
votes
1answer
194 views

My Data has negative and positive numbers, can I still use it to get the PDF?

I have data that reflects the arrival time of a flight. {3, -2, 16, 13, -6, 5, 4, -7, 7, 0……..n} this is for 8:45am and has 150 elements "arrivals" The positive values represent the time in minutes ...
4
votes
1answer
201 views

Reproducing a graphic on Jensen's inequality for the probabilistic case

I am trying to reproduce the following graph on Jensen's inequality for the probabilistic case (source: wikipedia) but with the exponential function as Y, the normal distribution on the X-axis and ...
-4
votes
2answers
264 views

Calculate one-tailed critical point from a probability distribution

I would like to calculate the numerical value of $\xi\in\mathbb{R}_{\geq0}$$$P(|U|<\xi)=0.95$$ where $U$ is standard-normal distributed. How may I do that in Mathematica?
4
votes
1answer
161 views

Expectation of CauchyDistribution

I've noticed this strange behavior and I'm wondering if it's a bug. I define a Cauchy distribution: c = CauchyDistribution[0, 1]; If I evaluate ...
6
votes
1answer
806 views

Mathematica Package for Bayesian Networks

Are there any packages that allow the simulation of Bayesian Networks with Mathematica? I found what seemed to be a promising package (Dynamics) on a Brown University URL, ...
8
votes
1answer
544 views

Recommended book on random processes to understand new functionality in Mathematica 9?

I am interested in exploring the new functionality on random processes available in Mathematica 9, but I am not familiar with all of the underlying mathematics. Could you recommend a book that ...
13
votes
1answer
337 views

RandomVariate returns values outside the support of a PDF

Let $X$ be a random variable with pdf: dist = ProbabilityDistribution[1/(Abs[x]*Log[Abs[x]]^2), {x, -E^-2, E^-2}] Here are some pseudo-random drawings from it: ...
0
votes
1answer
229 views

Trying to plot this probability

Can anyone help me plot this? log P(X >= x) = alpha logx x=0.001 + k(0.001) k= 0, ..., 100 I can't figure out the coding for this.. I've been trying this for a while, and can't seem to figure it ...
9
votes
3answers
2k views

How to generate a RandomVariate of a custom distribution?

I'm trying to generate a pseudorandom variate out of a custom distribution. Suppose I want define a custom distribution, and for the sake of simplicity I define a Poisson distribution (the ...
16
votes
2answers
754 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: ...
10
votes
2answers
2k views

How to calculate the mode of a probability distribution

I was wondering if there is any command to get the mode of the probability distributions. Calculating manually, the mode is (alpha-1)/(alpha+beta-2) While the mean, median or variance of the beta ...
5
votes
4answers
314 views

Probability: proportion of 1000 random lists for x that contain the same nrs

Give a function which calculates for each x a random list of birthdays (which can be x=1 to x=365) birthdays[x_] := RandomInteger[{1, 365}, x] is my answer. ...
4
votes
2answers
214 views

How to find the variance under the assumption that x follows some probability distribution

I am aware that we can find the expectation under the assumption that x follows some probability distribution, something like this: ...
5
votes
1answer
318 views
2
votes
2answers
431 views

Total Variation Distance of probability matrix

How can I calculate the Total Variation Distance of a transition Matrix? is there any built in function? I've searched all documentation and haven;t found anything. ** More information: Let me try ...
13
votes
2answers
990 views

Obtaining joint distributions and conditional distributions using Mathematica

I have two multivariate Gaussian distributions $p(x)$ and $p(z)$ with mean vectors $m_x$ and $m_z$, and covariance matrices $\Sigma_x$ and $\Sigma_z$. my model is a simple linear model $x = W z+n$ ...
7
votes
1answer
868 views

Probability and distribution from actual data

Let's say I have some data from a real world system: ...
8
votes
2answers
491 views

Expected Value: Strange/unexpected result

Assume $X$ is an exponential random variable with unit mean ($f_X(x)=e^{-x}$, $x>0$). I want to calculate the expected value of $\frac{1}{X}$. Since $X>0$, I am expecting that ...
3
votes
0answers
103 views

ProbabilityDistribution PDF on boundary points

I would like to evaluate the PDF of a custom ProbabilityDistribution at the min and max values. However, PDF[...] returns 0 at ...
2
votes
3answers
540 views

Some questions about random numbers

How can I get non-repeating random numbers from Mathematica 8? How can I know which distribution the numbers I get are? Can I choose the distribution I want together with the non-repeating random ...
12
votes
1answer
170 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 ...
0
votes
1answer
299 views

How can an InverseQuantile or an interval valued Quantile function be implemented in Mathematica?

Quantile[] is the workhorse method in robust data analysis and statistics (see, eg Koenker's Quantile Regression). However, it should be complemented by an ...
8
votes
1answer
389 views

Random variables with transformed discrete distributions cannot be applied to Probability[] function?

I have two discrete uniform distributions over same support: Dx = DiscreteUniformDistribution[{-8, 8}]; Dy = DiscreteUniformDistribution[{-8, 8}]; I use ...
10
votes
4answers
405 views

Extracting equations from Piecewise expressions

Say I have a PDF: PDF[LogNormalDistribution[1.75, 0.65], x] Calculating it, Mathematica gives me an expression that looks like this: I want to extract the ...
7
votes
1answer
570 views

How do I calculate the probability of reaching mean residual life

I need to understand the Survival Analysis concept of "mean residual life (MRL)" and calculating probabilities for reaching it. From another discussion: The MRL at time t is the mean additional ...
6
votes
2answers
2k views

Function to compute the probability of exactly one event occurring out of N independent events

Is there a built in function (or a function in one of the standard packages) that allows you to compute the probability of exactly one event occurring out of some known set of probabilities for N ...
23
votes
1answer
1k views

RandomVariate from 2-dimensional probability distribution

A probability distribution can be created in Mathematica (I am using 8.0.1) with e.g. ...
29
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 ...
8
votes
3answers
527 views

Probability problem — Rube Goldberg solution?

A user posted this question on StackOverflow which was closed as off topic: 3 people are playing a game with a standard 52 card deck. Each player is given 2 cards each, possible cards and their ...
10
votes
6answers
1k views

2D Gaussian distribution of squares coordinates

I would like to imitate the structure of this great painting from Ellsworth Kelly in Mathematica. Yet with all the colored squares in Black and the beige one in white. Below is what I have wrote to ...