Questions tagged [stochastic-process]

A stochastic process is a collection of related random variables, often used as a model for a quantity that varies over time or space with some degree of smoothness.

In probability theory, a stochastic process, or sometimes random process (widely used) is a collection of random variables; this is often used to represent the evolution of some random value, or system, over time. This is the probabilistic counterpart to a deterministic process (or deterministic system). Instead of describing a process which can only evolve in one way (as in the case, for example, of solutions of an ordinary differential equation), in a stochastic or random process there is some indeterminacy: even if the initial condition (or starting point) is known, there are several (often infinitely many) directions in which the process may evolve.

In the simple case of discrete time, a stochastic process amounts to a sequence of random variables known as a time series (for example, see Markov chain). Another basic type of a stochastic process is a random field, whose domain is a region of space, in other words, a random function whose arguments are drawn from a range of continuously changing values. One approach to stochastic processes treats them as functions of one or several deterministic arguments (inputs, in most cases regarded as time) whose values (outputs) are random variables: non-deterministic (single) quantities which have certain probability distributions. Random variables corresponding to various times (or points, in the case of random fields) may be completely different. The main requirement is that these different random quantities all have the same type. Type refers to the co-domain of the function. Although the random values of a stochastic process at different times may be independent random variables, in most commonly considered situations they exhibit complicated statistical correlations.

Familiar examples of processes modeled as stochastic time series include stock market and exchange rate fluctuations, signals such as speech, audio and video, medical data such as a patient's EKG, EEG, blood pressure or temperature, and random movement such as Brownian motion or random walks. Examples of random fields include static images, random terrain (landscapes), wind waves or composition variations of a heterogeneous material.

143 questions
4
votes
2 answers

Generate Poisson process using R

I want to generate a process where in every step there is a realisation of a Poisson random variable, this realisation should be saved and then it should be realize the next Poisson random variable and add it to the sum of all realisations before.…
user734124
  • 489
  • 8
  • 20
4
votes
0 answers

How to evaluate Markov Model accuracy

I have created the following Markov chain Model. And I am struggling to prove mathematically that my model works correctly, or doesn't work. Sequence: Start, state1, state2, state3, state3, state2, state1, state2, state1, end States: start, state1,…
4
votes
0 answers

How could time series prediction be applied in a real-time setting where it is infeasible to track every single item?

The problem: Find the estimated lifetime of an object (e.g. the time it is written next) or the corresponding PDF. This is known as a renewal process. Constraint: it is infeasible to track metadata for every single object Assumptions: Prediction…
4
votes
1 answer

scikit multilabel classification: ValueError: bad input shape

I beieve SGDClassifier() with loss='log' supports Multilabel classification and I do not have to use OneVsRestClassifier. Check this Now, my dataset is quite big and I am using HashingVectorizer and passing result as input to SGDClassifier. My…
4
votes
1 answer

Generate and plot the empirical joint pdf and CDF

Given a pair of two variables (X,Y), how can you generate and plot the empirical joint PDF and CDF in vanilla MATLAB (no toolboxes)?
Elpezmuerto
  • 5,391
  • 20
  • 65
  • 79
3
votes
0 answers

How to create a contour plot on the surface of a sphere in Python?

I have plotted a sphere in Python to be used as a graphical representation of some stochastic variables u_1, u_2 and u_3. The plot can be found here. This is achieved using the following Python code: import numpy as np import matplotlib.pyplot as…
3
votes
1 answer

Simulations of the stock price using Monte Carlo in R

Simulate in a graph 50 sample paths of a stock price $80 over 90 days modeled as geometric Brownian motion with drift parameter 0.1 and volatility 0.5. Show in a graph this process on the vertical axis Price option and time on the horizontal axis.…
Andrea Garcia
  • 127
  • 2
  • 8
3
votes
2 answers

Manually simulating Poisson Process in R

The following problem tells us to generate a Poisson process step by step from ρ (inter-arrival time), and τ (arrival time). One of the theoretical results presented in the lectures gives the following direct method for simulating Poisson…
user366312
  • 16,949
  • 65
  • 235
  • 452
3
votes
1 answer

Preventing a Gillespie SSA Stochastic Model From Running Negative

I have produce a stochastic model of infection (parasitic worm), using a Gillespie SSA. The model used the "GillespieSSA"package (https://cran.r-project.org/web/packages/GillespieSSA/index.html). In short the code models a population of discrete…
Rnought
  • 33
  • 3
3
votes
1 answer

ode45 for Langevin equation

I have a question about the use of Matlab to compute solution of stochastic differentials equations. The equations are the 2.2a,b, page 3, in this paper (PDF). My professor suggested using ode45 with a small time step, but the results do not match…
3
votes
1 answer

Simulating the Chinese Restaurant Process in R

I am trying to simulate the Chinese Restaurant process in R, and wondering if I can make any efficiency improvements over this crude implementation. iTables = 200 # number of tables iSampleSize = 1000 # number of diners # initialize the list of…
tchakravarty
  • 10,736
  • 12
  • 72
  • 116
2
votes
1 answer

Stochastic simulations of temporal model

I want to run stochastic simulations of a model which has a rate constant that is time dependent. I am not aware of any stochastic simulator that supports time-dependent rate constants. So far I have tried to use Python (stochpy and gillespy2) and…
2
votes
1 answer

SARIMAX simulation of possible paths

I am trying to create a simulation of possible paths of a stochastic process, which is not anchored to any particular point. E.g. fit SARIMAX model to weather temperature data and then use the model to make a simulation of the temperature. Here I…
2
votes
1 answer

How to simulate a stochastic process until all elements of a path are positive?

I want to simulate a path for certain a stochastic process in continuous time using Python. I wrote the following function to simulate it (np refers to numpy of course): def simulate_V(v0, psi, theta, dt, xsi, sample, diff = False): _, dB =…
2
votes
1 answer

Why the learning rate for Q-learning is important for stochastic environments?

As stated in the Wikipedia https://en.wikipedia.org/wiki/Q-learning#Learning_Rate, for a stochastic problem, using the learning rate is important for convergence. Although I tried to find the "intuition" behind the reason without any mathematical…
1
2
3
9 10