Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [probability]

The tag has no usage guidance.

1
vote
0answers
42 views

Uniformly sample a point per polytope

I want to uniformly sample a point within each of $10^5$ convex polytopes in each iteration of a solver. The polytopes in one iteration are completely different from the polytopes in another iteration....
2
votes
0answers
31 views

GPGPU/FPGA programming for Combinatorial Analysis

Recently, I have taken an interest in performing combinatorial analysis for the game of 21 (blackjack) and attempted to use my AMD APU to try and thread the program via the 4 cores on the chip. ...
2
votes
1answer
119 views

Finding probability vectors from an implicit equation

I have $q$ $n$-dimensional vectors $\vec y_i$ and a matrix $\hat B$ of shape $n\times m$. I'm looking for $q$ $m$-dimensional vectors $\vec x_i$ such that: $\vec y_i=\hat B \vec x_i$ each vector $\...
3
votes
0answers
42 views

Book Suggestion for Approximating Integrals using Random Partitions

Suppose I want to approximate the integral $\int_0^1 x^2\,dx$ using Riemann Sums or Darboux sums over random partitions of the interval $[0,1]$, Like in the image below: Here, A "random" partition of ...
4
votes
1answer
140 views

Kernel-based differentiation

Consider a $\mathcal{C}^1$ function $V:\Omega\rightarrow\mathbb{R}$ where $\Omega\subset\mathbb{R}^n$. If a random vector $X$ has a parametric density $p_\theta(\textbf{x})$ that's smooth in its ...
3
votes
1answer
39 views

Verifying that ODE integration generates Theoretical Stationary distribution

I am trying to simulate an ODE, like $ \dot{x} = \xi(x) $ that should have a stationary distribution (a la Stat Mech). Assuming that my ODE algorithm generates time samples of my system state $ x $ ...
1
vote
0answers
32 views

Deterministic method to compute “Process noise covariance matrix, Q” for a Kalman filter when parameter variations of the model is known apriori

I am implementing a Kalman filter (for a linear ODE system for now). My model represents a physical device that has 6 "parameters", i.e. those values of the device do not evolve over time (within a ...
0
votes
1answer
72 views

What is the expected value of area of intersection of a circle and a rectangle

$r$: cicle C1's radius $w$,$h$: rectangle R1's edges: $x=w$, $y=h$, $x=0$, $y=0$ $(w>2r, h>2r)$ $S(x,y)$: area of ...
0
votes
2answers
708 views

How to generate Poisson-distributed random numbers quickly and accurately?

I have attempted to create Poisson-distributed random numbers, seeing that it is not so easy as the simple multiplicative algorithm works accurately only if the mean is less than 500. Using logarithms ...
1
vote
1answer
113 views

How is KDE used in stochastic tomography

I am currently writing my masters thesis and my topic also touches on Stochastic Tomography for volume reconstruction presented in this paper. Now i understand most of the process described, but i ...
4
votes
0answers
83 views

Closed form PDF/CDF using Orthogonal Polynomial Expansion (gPC)

Consider a random variable which is given by an orthogonal polynomial expansion in one parameter (or polynomial chaos expansion PCE), i.e. , $$ f(\alpha) = \sum\limits_{n=0}^{\infty} \hat{f} (n) \psi ...
1
vote
0answers
96 views

Numerically compute PDF given a function

Consider $[0,1]$ with the Lebesgue measure $m$ and $f:[0,1]\to \mathbb{R}$, and $x$ a uniformly distributed random variable in $[0,1]$. Then, $f(x)$ itself define a new random variable. We can then ...
2
votes
1answer
41 views

Using physical parameter as a Gaussian Random Variable in a simple Poisson Problem

I want to vary the input parameter of a physical dynamic mechanics problem, as a Gaussian Random variable and view the resulting Probability Density Function. I used the Finite Element Method to ...
2
votes
1answer
146 views

Optimize custom probability distribution in Python [closed]

Consider random variables $X$ and $Y$, their distributions are given. $Z = f_a(X, Y)$ where $f(\cdot, \cdot)$ is a deterministic, not random function $f_a: \mathbb{R}^2 \to \mathbb{R}$ depending on a ...
3
votes
0answers
142 views

Numerical methods for calculating the inverse CDF when closed form approximation not available

I need to calculate the inverse CDF for a probability distribution, however there is no closed form approximation available in the literature. The distribution I am working with is the Normal Inverse ...
2
votes
1answer
190 views

Probability of reconstructing a word using c substrings from a random sample

Consider a voice recording split into it's phonemes as our sample $S=(s_1,...,s_k) \in \Omega = P^k$. The number of phonemes is $|P| = 40$. Then I have a word $w = (w_1,...,w_n) \in P^n$. I want to ...
4
votes
1answer
162 views

Efficient and stable computation of inverse CDF

What is the most efficient and numerically stable algorithm for computing the inverse CDF $F^{-1}(y)$ of a probability function, assuming that both the PDF $f(x)$ and the CDF $F(x)$ are known ...
8
votes
2answers
211 views

Learning parameters of noise and filter coefficients from data where data and noise both have Gaussian distributions

Assume $X$ and $N$ are two sets of vectors (observations) from two different normal distributions, where $X$ represents clean data and $N$ represents noise; and $A$ a projection matrix of a filter. ...
1
vote
0answers
40 views

Probabilistic model to approach problem that is usually dealt with linear programming

I have the following problem. Let's say we have $x_{jk}$ it is an expression value of gene $j$ in a sample $k$. It is the average of expression levels across the cell types $s_{ij}$, weighted by ...
0
votes
0answers
17 views

Assigning new values based on original guesstimates and ranking / ordering?

Lets say we have two things as input, $N$ scalars (measurements) that we know are erroneous to some degree (i.e. the correct values are somewhat similar). In addition, we also have a roughly more ...
4
votes
1answer
5k views

How do I generate maxwell-boltzmann variates using a uniform distribution random number generator?

I am doing a molecular dynamics simulation. I need to assign initial velocities to the atoms. I want to assign the initial velocities which follow the maxwell-boltzmann distribution. How do I ...
1
vote
0answers
144 views

Simple MCMC Algorithm in Matlab

I would be really glad to get some specific advise on how to implement a simple MCMC algorithm (in Matlab, if possible). I'm not yet too familiar with optimization methods. My problem goes as follows: ...
2
votes
1answer
174 views

Metropolis Monte Carlo integration of Area with unknown normalization

I probably miss something very basic. I don't see how to use Metropolis–Hastings algorithm for computation of integrals, if I don't know the volume of accessible phase space (i.e. proper normalization ...
2
votes
1answer
140 views

solving for unknown inside an expectation

I have a an equation that need to find its root. The function is the following $f(\theta) \equiv E[R(\theta;\eta)]=0$ for some unknown $\theta$ which is deterministic, while the expectation is taken ...
2
votes
2answers
309 views

Python: What is a good way to generate a 1D particle field with a gaussian distribution?

If I have N particles how do I assign their x values so that the end result is Gaussian distribution. i.e. particles near the ends are more spread out than particles near the center.
2
votes
2answers
248 views

Extracting time scales information from empirical cumulative distribution function

I have a stochastic process (a Markov chain actually) that has two absorbing states. I am using a difference equation to calculate the first passage time to either of the absorbing states. There are ...
1
vote
1answer
713 views

Coding complex equations into C++

I have here equations from a paper by E. Bradlow. They're for counting the events in a Weibull-distributed data set. $$\begin{align} \Pr(N(t)=n) &= \sum_{j=n}^\infty{\frac{(-1)^{j+n}(\lambda t^c)^...
1
vote
2answers
11k views

How to plot probability density function in MATLAB?

I'm trying to get a frequency plot, or PDF (probability density function) plot for my biometrics project in MATLAB. I have two vectors genuine_scores and ...
2
votes
2answers
1k views

visualization of 3D probability flow

I have a master equation for $P(N_A^+,N_B^+,N_C^+,t)$, with $N_A^+,N_B^+,N_C^+$ all discrete. The numerical integration is done by this Matlab program using Euler's method. Despite the crude Euler's ...
2
votes
0answers
28 views

Approximate convolution of independent Beta variates?

Is there a way to approximate the convolution of Beta variables? Specifically, I am trying to find an approximation to $g(x_0)$: $$g(x_0) = \int \delta(x_0-\sum_{i=1}^{n} a_i x_i) \prod_{i=1}^{n} f(\...
2
votes
3answers
123 views

Hash in set probability?

First off I would like to mention that I am absolutely terrible at statistics... so bear with me please. The question: a sha1 hash is a hexadecimal string of 40 characters, the largest number being: ...
10
votes
2answers
5k views

How do I plot the surface of a 4D plot?

I am trying to plot the wave function for a particle in a 3D box. This requires me to plot 4 variables: x, y, z axes and the probability density function. The probability density function is: ...
2
votes
1answer
123 views

Multiple independent random number streams

Having multiple streams of pseudo-random numbers known to be independent and with a uniform distribution I want to do Monte Carlo simulations in parallel. In other words, one thread will have a full-...
5
votes
3answers
1k views

How to sample numerically from an arbitrary smooth distribution?

I'm given a smooth probability density function via its values on a reasonable fine grid. I assume that cubic spline interpolation (or cubic spline interpolation of the logarithm of the density) will ...
2
votes
1answer
222 views

Chinese Restaurant Process… Why?

I recently started to study non-parametric clustering methods and I come across to CRP. After reading all the material I found on the web there is one thing which is not completely clear to me: which ...
3
votes
2answers
588 views

Efficient computation of Markov chain transition probability matrix

Consider a continuous Markov chain $X=(X_t)$ on a finite state space and let $Q$ be the (given) transition rate matrix. This matrix is very sparse, with non-zero values on 3 diagonals only (so from ...
0
votes
1answer
87 views

sum of random variables, probability 101

Consider $n$ integer-valued and independent random variables $e_1, e_2, \dots, e_n$ with known distribution functions $m_1, m_2, \dots, m_n$. Let's denote with $E^{1..n}$ the random variable given by ...
2
votes
0answers
82 views

function over conditional probability

I need to create a scoring model out of estimated conditional probability functions for two events, A and B. Let 0.5 be the threshold value. Ideally, the probability is in the interval $[0,0.5)$ for A ...
5
votes
3answers
703 views

Computing the PDF of a quadratic function of two random variables

Given the function $\mathcal{M} = g + Ah + Bh^2$ where $A$ and $B$ are constants and $g$ and $h$ are random variables with their distributions $f_G(g)$ and $f_H(h)$ known, is it possible to compute ...
4
votes
1answer
293 views

Convert ODE into discrete probabilistic model

how can I turn an ODE equation into a discrete probabilistic model? I take for example the Verhulst equation for the growth of a population. $$\frac{dP}{dt} = rP(1-P/K)$$ I was thinking to simulate ...
18
votes
2answers
13k views

Define custom probability density function in Python

Is there a way, using some established Python package (e.g. SciPy) to define my own probability density function (without any prior data, just $f(x) = a x + b$), so I can then make calculations with ...
6
votes
2answers
2k views

How can I generate half-normal variates in MATLAB?

I can find the random('normal', 0, 1, 10000,1) command in MATLAB but it generates half-normal variates. I would like to generate random half-normal variates. The ...
10
votes
3answers
1k views

Drawing samples from a finite mixture of normal distributions?

After some Bayesian update steps, I am left with a posterior distribution of the form of a mixture of normal distributions,$$\Pr(\theta| \text{data} ) = \sum_{i=1}^k w_i N(\mu_i, \sigma^2).$$ That is, ...