A stochastic system is a system which state depends or some random elements making its behavior non-deterministic. Questions with this tag should cover topics regarding random variables and non-determenistic systems.
Questions tagged [stochastic]
256 questions
0
votes
1 answer
Solving stochastic PDEs in Fipy
I would like to simulate coupled PDEs with a Gaussian white noise field, and was unable to find any examples or documentation that suggests how it should be done. In particular, I am interested in Cahn-Hilliard-like systems with noise:
d/dt(phi) =…

Aaron
- 3
- 1
0
votes
1 answer
Why does changing the p-value with rgeom not give the expected result
So I'm trying to prove that when X ~ Geo(X) the expected value is equal to: E[X] = p / (1 - p)
p <- 0.50
#1 Exact
(p/(1 - p))
nrRuns <- 100000
#1 Simulation
x <- rep(0, nrRuns)
for (i in 1:nrRuns){
x[i]=rgeom(n = 1, prob = p)
}
mean(x)
With p…

FlubberBeer
- 105
- 11
0
votes
2 answers
Python stochastic matrix
I am trying to create a function that checks if a matrix and a vector are stochastic (sum of elements =1 for all the column both of the matrix and of course of the vector) if yes it applies matrix product between M and p otherwise raises an error. I…

AntonYellow
- 11
- 5
0
votes
3 answers
Stochastic value obtained from pine script not matching with actual value in tradingview
I am trying to plot stochastic (14,1,1) in trading view using pine script. But I if I plot the stochastics indicator using the indicators tool of trading view, the output is different.I am using the code as below:
//@version=4
study("My…

Pratik
- 3
- 1
- 4
0
votes
1 answer
Stochastic differential equation sensitivity analysis with specified noise
I am trying to calculate the gradient of a functional of a stochastic differential equation (SDE) solution given a specific realization of the noise. I can successfully calculate these gradients if I leave the noise unspecified, as shown in…

Jonathan A. Gross
- 163
- 1
- 9
0
votes
2 answers
R function/method to sample data frame using probability until condition is reached
I have a data frame with 3 columns:
ObjectID: the unique identifier of a polygon (or row)
AvgWTRisk: probability (0-1) of a disturbance in a forest, ~0.11 is the highest value
HA: AREA of a polygon in the forest
I want to develop a function to…

TWRB
- 1
- 2
0
votes
2 answers
Systematic error in Python stochastic simulation
I want to simulate a simple birth death process using the Gillespie algorithm (https://en.wikipedia.org/wiki/Gillespie_algorithm) in python.
At each instant, there is a probability a of birth and a probability b of death per indiviudal. I believe…

kevinkayaks
- 2,636
- 1
- 14
- 30
0
votes
1 answer
Whats the issue with my implementation of SPSA(simultaneous perturbation stochastic approximation optimizer)?
Here is my attempt to implement the SPSA optimization for the polynomial x^4 - x^2. I recgonize my code only works for 1 dimension, but it seems to not be working at all. Also I recognize that SPSA is typically used when you dont have the function…
0
votes
1 answer
How can (X|X>Y) change to (X-Y|X>Y)+(Y|X>Y)?
If X~Exp(a), Y~Exp(b), consider (X|X>Y).
My book said that (X|X>Y)=(X-Y+Y|X>Y)=(X-Y|X>Y)+(Y|X>Y).
But Why?? I don't know why we can divide those two things.

주혜민
- 67
- 6
0
votes
0 answers
Coding an integrated Bayesian model with a mix of stochastic and deterministic inputs
The Problem
I am having trouble figuring out how to implement a Bayesian Framework for a predictive model that contains many deterministic inputs mixed with a few stochastic inputs. Conceptually the problem seems easy, but from a coding standpoint I…

Stephanie Schneider
- 57
- 5
0
votes
1 answer
What is the difference between Stochastic Gradient Descent and LightGBM?
Although I have individually researched these concepts, I am confused on whether one or the other can be chosen for a solution, or can both of these be used simultaneously to improve results? Any guidance you can provide will be much appreciated.

Amie Johnson
- 57
- 1
- 5
0
votes
0 answers
Is there an equivalent version of randn('state',100) in R like on MATLAB? My output varies too much since it's absent on R
I'm writing a script for the euler maruyama approximation of sdes. The code works, however, since 'rnorm' is present, i expect my output to vary. In MATLAB, there is the randn('state',100) that helps with this issue. Is there a way to stabilize the…

Catalina
- 25
- 5
0
votes
1 answer
gensim Word2Vec - how to apply stochastic gradient descent?
To my understanding, batch (vanilla) gradient descent makes one parameter update for all training data. Stochastic gradient descent (SGD) allows you to update parameter for each training sample, helping the model to converge faster, at the cost of…

Eric Kim
- 2,493
- 6
- 33
- 69
0
votes
1 answer
CM_Stochastic Highlight Bars by Chris Moody?? Alerts
Can anyone tell me how precisely to set up alerts on tradingview (i do know how to set up alerts..) specific to the "Strict Buy" criteria in the CM_Stochastic Highlight Bars indicator??? I have done a lot of searching but with little luck. Thank you…
0
votes
1 answer
Constrain logic in Linear programming
I'm trying to build a linear optimization model for a production unit. I have Decision variable (binary variable) X(i)(j) where I is hour of J day. The constrain I need to introduce is a limitation on downtime (minimum time period the production…

Karthik K S
- 45
- 5