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.
10
votes
0answers
137 views
1
vote
1answer
101 views
Safe values of $\mu$ and $\sigma$ when randomly sampling from a Log-Normal Distribution?
I believe I'm obtaining overflow errors when randomly sampling from a log-normal distribution with the command:
RandomVariate[LogNormalDistribution[μ, σ], 1]
...
1
vote
0answers
53 views
integral of inverse distribution function
Can Mathematica solve the following problem?
The parameter of interests is $\alpha$. Let $G(y)$ be the distribution function of $y$. (e.g. $G$ is a lognormal distribution function with given ...
2
votes
1answer
145 views
Calculate variance of random walk?
How can I symbolically calculate the variance of the following random walk in Mathematica?
Given several discrete random variables such that $p(Z_i=1-2k)=p$, where $k$ is a small real number, and ...
3
votes
0answers
84 views
shortest paths in probabilistically weighted edges? [duplicate]
I understand Mathematica can find shortest paths. However, is it also able to find the most probable paths? I mean this is a case where edges are given probabilistic wights (from 0 to 1) and the most ...
4
votes
1answer
118 views
Combinations which do not have elements in common
I can choose 2 letters from the four letters $\{A,B,C,D\}$ in 6 combinations using the combination formula
$$\frac{n!}{ r! (n-r)!}$$
...
12
votes
3answers
309 views
Simulate a simple spinner
I'm teaching some simple ideas in probability to students in grade 7.
The "spinner" below works, but I'm wondering how I could make it just a bit more realistic by having it actually "spin" around a ...
4
votes
0answers
97 views
Speeding up multilinear PRA branch-and-bound algorithm with worst-case exponential time scenario with respect to basic events
The algorithm is a branch-and-bound algorithm that calculates dominances for PRA, probalistic risk assessment. The task was to find faster ways to do it in numerical software such as Matlab but we ...
2
votes
4answers
122 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
1answer
235 views
Solving derivative of cumulative normal distribution log likelihood
I am a newbie and I'm trying to use Mathematica to obtain the symbolic Maximum Likelihood Estimation for a cumulative normal distribution. So far I have reached the step where I have the derivative of ...
3
votes
2answers
161 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
368 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
99 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
301 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 ...
12
votes
3answers
588 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
124 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
151 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
175 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?
3
votes
1answer
120 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
364 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
335 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
288 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
157 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 ...
8
votes
3answers
637 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 ...
12
votes
1answer
386 views
How to compute the inverse CDF properly?
I want to compute the CDF and inverse CDF of the hyperbolic distribution:
α = 2; β = 3/2;
x = -3;
u = N[CDF[HyperbolicDistribution[α, β, 1, 0], x], 30]
The ...
9
votes
2answers
841 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
248 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
132 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:
...
4
votes
1answer
226 views
2
votes
2answers
296 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 ...
12
votes
2answers
511 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
310 views
Probability and distribution from actual data
Let's say I have some data from a real world system:
...
7
votes
2answers
337 views
Expected Value - Mathematica
I would appreciate if one could help me with the following Mathematica problem:
Assume $X$ is an exponential random variable with unit mean ($f_X(x)=e^{-x}$, $x>0$). I want to calculate expected ...
3
votes
0answers
85 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
414 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 ...
9
votes
1answer
127 views
NExpectation behaves oddly with EmpiricalDistribution
My question concerns the usage of NExpectation and Expectation and why I see the behavior I see in the following example.
First ...
0
votes
1answer
219 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 ...
7
votes
1answer
236 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
293 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
335 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
1k 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 ...
20
votes
1answer
723 views
RandomVariate from 2-dimensional probability distribution
A probability distribution can be created in Mathematica (I am using 8.0.1) with e.g.
...
16
votes
6answers
1k 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 ...
7
votes
3answers
454 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
859 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 ...




