Questions tagged [probability]

For computation questions involving computing probabilities or simulating probabilistic processes.

Filter by
Sorted by
Tagged with
1 vote
0 answers
27 views

SageMath: How do I plot the sum of a deterministic variable and a random variable

Suppose I have the following function $$f(x,y,z1,z2)=g(x-z1,y-z2)$$ where $g(x,y)$ is a deterministic function from the $X\times Y\to S$ and $z1,z2$ are random variables following a known probability ...
vidyarthi's user avatar
  • 111
-1 votes
1 answer
26 views

How to generate p Sample of GGM of dimension m, for parameter : the weight, the means and the covariance?

after searching in the python numpy, scipy and sklearn module, there is no function who can generate p samples of a gmm (gaussian mixture model) for parameter means, covariances and the weight of each ...
Loca's user avatar
  • 1
0 votes
0 answers
33 views

Algorithm for Probabilities in a "Random" Integers Runs test

Suppose you have a set of N random integers. ( aka bytes 0..255 ) You then consider each subsequent neighbor as "ascending" or "descending", counting the number of consecutive ...
David GSM's user avatar
1 vote
0 answers
38 views

Sampling points from space based on known density

I have a problem where I heavily need to restrict the number of points at which I sample a function based on the values of a different function. I have two functions: $f:{\mathbb{R}\times [0,\infty)\...
blockchain187's user avatar
1 vote
0 answers
29 views

Non-Linear Distributed Delayed Kalman Filter

I have a system $\vec{x}_{i + 1} = \vec{x}_i + W_i$ where $W = N(\vec{\mu}, \Sigma)$. For some matrix $H_i$, let $y_i = H_i$ and let $z_i = y_i + R$. Where $R$ is some random variable. We are given $...
JEK's user avatar
  • 23
0 votes
0 answers
55 views

Finding optimal values from multiple parameter estimation runs

I've performed a parameter estimation repeat (i.e. 1000 parallel runs with the same initial values of parameters). I am trying to estimate ~20 parameters using measurements from experiments. After ...
Natasha's user avatar
  • 411
1 vote
1 answer
85 views

What are the Exact Rules for Significant Figures, Precision, and Uncertainty?

In the physical sciences (which are physics, chemistry, astronomy, materials science, etc.), we learned that the uncertainty is +/- the smallest unit (which is 1) of the last significant figure if the ...
CoastCity Lapse 00crashtest's user avatar
6 votes
1 answer
730 views

Estimate the number of self-avoiding walks of length $n$

For the past couple of days, I have been thinking a lot and searching online for an algorithm capable of estimating the number of Self-Avoiding Walks (SAW) of length $n$ in $\mathbb{Z}^2$. There is a ...
Pearson's user avatar
  • 63
3 votes
1 answer
297 views

Importance Sampling for multidimensional integrals and random numbers from multivariable pdf's

I am aiming to get a numerical value for a five-dimensional integral using Monte Carlo Integration. I am getting good results using the Mean Value Method, but I would like to try to use Importance ...
pollux33's user avatar
-1 votes
1 answer
97 views

Generating Rvs for a given PDf in python

Two random variables $X$ and $Y$ are distributed according to \begin{align} f_{XY}(x,y)= \begin{cases} x+y & 0\leq x \leq 1, 0\leq y \leq 1 \\ 0 & otherwise \end{cases} \end{align} I ...
leo's user avatar
  • 1
0 votes
0 answers
20 views

Probability Density Function of DNS velocity field [duplicate]

I am currently working on a DNS turbulent solver and I would like to compare my IHT simulations to papers. Those papers show the Probability Density Function of the velocity field: I would like to ...
Ofdow's user avatar
  • 1
1 vote
1 answer
152 views

Define continuous, non-analytical pdfs in python

I am planning to do some basic algebra on continuous, non-analytical random variabels. I want to define their probability density functions as arrays x and f(x). Yet, I was surprised to find out that ...
Yann's user avatar
  • 159
1 vote
0 answers
93 views

N-dimensional optimization of moments of distribution function

Let's say I have a bag of marbles. Each marble has several attributes (color, diameter, surface roughness, weight). I know that there is a statistical relationship between various marble attributes ...
user3814483's user avatar
0 votes
2 answers
248 views

Different questions about "Inverse Physics problems"

I am in a context of forecasts in astrophysics. Don't be too rude if questions seem to you stupid or naive but rather indulgent, I am just looking for better undertsand all these numerical methods of ...
user avatar
5 votes
1 answer
339 views

Non-negative least squares with very small numbers

(I have asked this question on StackOverflow previously but it has been pointed to me that CSSE or MSE could be more appropriate) I have to solve a constrained optimization problem of the following ...
Nicola's user avatar
  • 51
1 vote
0 answers
36 views

Combining many probabilities, modifying, seeking general formula

CONTEXT I need to combine the probability of occurrence of many thousands of events for millions of individuals (trees) in an agent-based/individual-based simulation model developed in NetLogo (agent-...
Flow's user avatar
  • 11
-1 votes
2 answers
541 views

How to solve system of equations with almost-zero determinant?

I have a system of equations that I am trying to solve. In matrix form, it's written as $$x(I - S) = b.$$ I am solving for $x$, where $I$ is the identity matrix and $S$ is a matrix where each column ...
FooBar's user avatar
  • 119
1 vote
0 answers
71 views

How to simulate a PDF using data samples like this?

I know two methods to simulate a PDF from random data samples using MATLAB : 1) Using a histogram where I use this command histogram(data,'Normalization','pdf'), it gives PDF like bins. 2) Another ...
Userhanu's user avatar
  • 151
0 votes
1 answer
70 views

Change of random variables and check by plot

Question As a test, I transform a uniform distribution over the unit square. But when I check the transformed distribution with Monte Carlo, it is wrong. What went wrong? Thanks. Problem Random ...
R zu's user avatar
  • 163
2 votes
0 answers
123 views

difference between PLSA and LDA

What is the difference between Probabilistic Latent Semantic Analysis(pLSA) and Latent Dirichlet Allocation (LDA)?
MIK's user avatar
  • 21
2 votes
1 answer
107 views

How to add extra constraints to a linear system for probabilities?

Background: I have an equation which looks like as follows: $W \times P = R$ $$\left[\begin{array} &{1}&{0}&{0}&-\frac{w_{1}}{w_{o1}} &\dots &{0} &-\frac{w_{1}}{w_{0} } \...
rosefun's user avatar
  • 123
2 votes
1 answer
362 views

Numerical integration of Fokker-Planck equation allowing for negative drift?

The Fokker-Planck equation (a.k.a Kolmogorov forward equation or Smoluchowski equation) describes the evolution of a probability density function and numerical integration of the FPE should conserve ...
The Hagen's user avatar
  • 123
1 vote
0 answers
56 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....
R zu's user avatar
  • 163
3 votes
1 answer
124 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. ...
dogman_1234's user avatar
2 votes
1 answer
339 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 $\...
Pawel's user avatar
  • 23
3 votes
0 answers
53 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 ...
MathNerd's user avatar
  • 131
5 votes
1 answer
170 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 ...
VF1's user avatar
  • 211
2 votes
1 answer
54 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 $ ...
user avatar
2 votes
0 answers
47 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 ...
Dr Krishnakumar Gopalakrishnan's user avatar
0 votes
1 answer
103 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 ...
Donald Wu's user avatar
0 votes
2 answers
5k 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 ...
juhist's user avatar
  • 151
1 vote
1 answer
145 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 ...
puelo's user avatar
  • 113
3 votes
0 answers
143 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 ...
Amir Sagiv's user avatar
1 vote
0 answers
118 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 ...
Amir Sagiv's user avatar
2 votes
1 answer
73 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 (PDF). I used the Finite Element Method to ...
CRG's user avatar
  • 347
2 votes
1 answer
426 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 ...
Denis  Korzhenkov's user avatar
2 votes
0 answers
474 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 ...
Bob Mortimer's user avatar
2 votes
1 answer
200 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 ...
user1841833's user avatar
5 votes
1 answer
759 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 ...
lacerbi's user avatar
  • 183
7 votes
2 answers
239 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. ...
PickleRick's user avatar
1 vote
0 answers
45 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 ...
neversaint's user avatar
0 votes
0 answers
21 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 ...
AturSams's user avatar
  • 113
6 votes
1 answer
11k 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 ...
Yogesh Yadav's user avatar
1 vote
0 answers
192 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: ...
donald's user avatar
  • 11
2 votes
1 answer
292 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 ...
Prokop Hapala's user avatar
4 votes
1 answer
173 views

solving for unknown inside an expectation

I need to find roots for the following function: $$f(\theta) \equiv E[R(\theta;\eta)]=0$$ for some unknown $\theta$ which is deterministic, while the expectation is taken over a normally ...
user17880's user avatar
  • 235
3 votes
1 answer
157 views

Computing expectations

I want to compute the following conditional expectation $E_{t}[\phi(A_{t+1}, \eta_{t+1})| A_t]$ where $\log A_{t}=\rho \log A_{t-1} + e_{t}$ and $e_{t}$ is IID $N~(0,\sigma_e)$ and $\eta_{t}$ is ...
user17880's user avatar
  • 235
2 votes
2 answers
905 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.
Isopycnal Oscillation's user avatar
2 votes
2 answers
377 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 ...
wdg's user avatar
  • 279
1 vote
1 answer
1k 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)^...
markovchain's user avatar