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
1
vote
1 answer

Monte carlo area of a circle

is it possible to use Monte carlo to compute the area of circle with a radius bigger than 1? i tried to make it this way but it only work for a circle of radius 1. N = 10000 incircle = 0 count = 0 while (count
Rasule
  • 19
  • 1
  • 6
1
vote
1 answer

Find limiting distribution of transition matrix and plot in R

may I know how I can find and plot the results of the limiting distribution or a unique stationary distribution of a transition matrix in R? (my goal is to have a unique and constant result instead of a random result) This is the P matrix…
yoyo
  • 47
  • 4
1
vote
0 answers

Differential equations with time-dependent random variable. How do I write and solve it?

I need to write and solve a set of differential equations with Mathematica, like below: eqns[numb_] := Table[{Subscript[W, i]'[ t] == (Subscript[\[Eta], i][t] - \[Mu] - \[Sigma]^2) Subscript[W, i][t] + J (1 - Subscript[W, i][t]), …
1
vote
1 answer

TypeError when sampling AR(2) process using Turing.jl

I'm trying to create a simple AR(2) process Y where: Y[t] = ϵ[t] + b1 * y[t - 1] + b2 * y[t - 2] ϵ[t] ~ Normal(0, σ) and b1 and b2 are parameters drawn from some prior distributions. The code is as follows: using Statistics using Turing,…
ForceBru
  • 43,482
  • 10
  • 63
  • 98
1
vote
0 answers

number of items to replace is not a multiple of , MonteCarlo Stochastic Process R error

## set.seed(123) SimpleEulerApproximation = function(T,x,a,b,delta){ numberofSteps = T/delta; TimeSteps = rep(numberofSteps,1); Y = rep(numberofSteps,1) Y[1] = x; for (i in 1:numberofSteps){ TimeSteps[i] = 0 + i*delta; } for (j in…
1
vote
1 answer

Simulating an elementary stochastic process in Python

I'm trying to simulate a simple stochastic process in Python, but with no success. The process is the following: x(t + δt) = r(t) * x(t) where r(t) is a Bernoulli random variable that can assume the values 1.5 or 0.6. I've tried the following: n =…
pietrosan
  • 23
  • 5
1
vote
2 answers

Modify code to get synthetic data that trends smoothly from bull to bear market cycles

I have this class that generates synthetic looking (stock) data and it works fine. However, I want to modify it so that NewPrice generates smooth trending data for say n-bars. I know that if I reduce the volatility, I get smoother prices. However,…
Ivan
  • 7,448
  • 14
  • 69
  • 134
1
vote
2 answers

Generate a Dataframe that follow a mathematical function for each column / row

Is there a way to create/generate a Pandas DataFrame from scratch, such that each record follows a specific mathematical function? Background: In Financial Mathematics, very basic financial-derivatives (e.g. calls and puts) have closed-form pricing…
VISQL
  • 1,960
  • 5
  • 29
  • 41
1
vote
0 answers

R queue simulation: Finding a function whith two arguments the process and a state, which returns the amount of time spent in that state

I have a code for a simulated birth/death process. And would like to find a function which takes a simluted process and a state of that process and returns the amount of time the process spent in that state. I think I can use parts of the code i…
1
vote
1 answer

(Python) Regarding the following question, what's the difference between Option (A) & Option (C)?

I encountered this question while taking the online course. The correct answer is Option (C), however, why can not me choose Option (A)? What's the nuance between these two options? ---> Suppose we wanted to create a class PolarBearDrunk, a drunk…
livemyaerodream
  • 890
  • 6
  • 19
1
vote
2 answers

Improving scaling of sample from discrete distribution

I have recently started playing around with Julia and I am currently working on a Monte Carlo simulation of some stochastic process on a 2-dimensional lattice. Each site has some associated rate of activation (the number of times it "does something"…
1
vote
1 answer

Markov chain for in aggregrated level (multiple seuquence)

Suppose I have three sequences: dat <- list( Seq1 =c("A", "B", "C", "D", "C", "A", "C","D","A","A","B","D"), Seq2 = c("C" ,"C" ,"B" ,"A" ,"D" ,"D" ,"A" ,"B","C","D","B","A","D"), Seq3 = c("D" ,"A" ,"D" ,"A" ,"D", "B", "B",…
Lzz0
  • 423
  • 1
  • 4
  • 13
1
vote
1 answer

Stochastic gradient descent converges too smoothly

As a part of my homework I was asked to implement a stochastic gradient descent in order to solve a linear regression problem (even though I have only 200 training examples). My problem is that stochastic gradient descent converges too smoothly,…
1
vote
0 answers

Error: Object not found

I'm new to R and I'm simulating an experiment to apply some theoretical result. The experiment is this: At Larry storehouse, the number of customers is poisson distributed with parameter lambda. The probability that a customer would buy a suit is p.…
Crunchy
  • 11
  • 2
1
vote
1 answer

The plots of co-variance functions should start from 0-shift

The following was my question given by my teacher, Generate a sequence of N = 1000 independent observations of random variable with distribution: (c) Exponential with parameter λ = 1 , by inversion method. Present graphically obtained…
user366312
  • 16,949
  • 65
  • 235
  • 452