6 Stochastic Process

Statistics II Ā· Unit 6 Ā· 7 hrs

Stochastic Process

Exam-focused notes for Stochastic Process (Statistics II, STA215): what the TU syllabus asks and how it has actually been tested, with 9 solved past questions from this unit.

Stochastic Process in short

A stochastic process models a system whose state changes over time under the influence of chance, and this chapter builds the main families used to model such systems: Markov chains, counting processes, and queues.

Stochastic Process: notes

Definition and classification

A stochastic process is a family of random variables ${X(t), t \in T}$ indexed by a parameter $t$ (usually time), where $T$ is the index set and the values $X(t)$ can take are called states, drawn from the state space. A process is classified along two axes: the index set can be discrete (observations at separate time points, $t=0,1,2,\ldots$) or continuous (observations possible at any instant), and the state space can likewise be discrete or continuous. Familiar examples include a Markov chain (discrete time, discrete state), a Poisson process (continuous time, discrete state, counting arrivals), and a queue length process (discrete state, evolving continuously in time). Every stochastic process is built from the same underlying idea: the future state depends, at least partly, on chance, and the process specifies exactly how.

Markov Process: Markov chain, Matrix approach, Steady-State distribution

A stochastic process has the Markov property if the probability distribution of the next state depends only on the current state, not on the sequence of states that preceded it: $P(X(t+1)=j \mid X(t)=i, X(t-1), \ldots) = P(X(t+1)=j \mid X(t)=i)$. A discrete-time process with this property is a Markov chain, and $P_{ij} = P(X(t+1)=j \mid X(t)=i)$ is the transition probability from state $i$ to state $j$. Collecting every $P_{ij}$ for a state space ${0,1,\ldots,n}$ gives the transition probability matrix $P$, a square matrix in which every row sums to 1, since the chain must move to some state. The matrix approach finds the probability of being in each state after several steps by matrix powers: the $k$-step transition matrix is $P^{(k)} = P^k$, so multiplying the one-step matrix by itself repeatedly projects the chain forward.

A chain's steady-state (limiting) distribution $\pi = (\pi_0, \pi_1, \ldots)$, where it exists, is the row vector satisfying $\pi P = \pi$ and $\sum_i \pi_i = 1$; once reached, the probability of being in each state no longer changes from one step to the next, regardless of the starting state.

Worked example. A simplified two-state weather model has states Sunny (1) and Rainy (2), with transition matrix $$P = \begin{pmatrix} 0.7 & 0.3 \ 0.4 & 0.6 \end{pmatrix}$$ The 2-step transition matrix is $P^{(2)} = P^2 = \begin{pmatrix} 0.61 & 0.39 \ 0.52 & 0.48 \end{pmatrix}$, so starting from a sunny day, there is a 61% chance of sun two days later. Solving $\pi P = \pi$ together with $\pi_1+\pi_2=1$ gives $0.3,\pi_1 = 0.4,\pi_2$, so $\pi_1 = \dfrac{4}{7} = 0.571$ and $\pi_2 = \dfrac{3}{7}=0.429$: in the long run, this location is sunny about 57.1% of days and rainy about 42.9%, regardless of today's weather.

What this unit covers

  • Definition and classification
  • Markov Process: Markov chain, Matrix approach, Steady-State distribution
  • Counting process: Binomial process, Poisson process
  • Simulation of stochastic process
  • Queuing system: Main component of queuing system, Little's law
  • Bernoulli single server queuing process: system with limited capacity
  • M/M/1 system: Evaluating the system performance

M/M/1 system

2081 Ā· 5 marks

Explain briefly the queuing theory. Customers arrive at a one-man barber shop according to Poisson process with mean inter arrival time of 12 minutes. Customer spends an average of 10 minutes in the barber’s chair. What is the expected number of customers in the barber shop in the queue? [5]

Show solved answer

Queuing Theory and Barber Shop Problem

Part 1: Brief Explanation of Queuing Theory

Queuing theory is the mathematical study of waiting lines. It models systems in which customers (or jobs) arrive, possibly wait in a queue, receive service from one or more servers, and then leave. Its aim is to predict system performance measures such as average waiting time, queue length, and server utilization so resources can be optimally designed.

Characteristics of a queuing system (Kendall notation A/B/c):

ElementDescription
Arrival processTypically Poisson arrivals with rate $\lambda$
Service processTypically exponential service with rate $\mu$
Number of servers$c$ (here $c = 1$)
Queue disciplineUsually FCFS
System capacity / populationUsually infinite

Utilization (traffic intensity): $\rho = \dfrac{\lambda}{c\mu}$; stability requires $\rho < 1$.


Part 2: Barber Shop Numerical Solution

Given data

  • Mean inter-arrival time $= 12$ minutes
  • Mean service time (in barber's chair) $= 10$ minutes
  • One server (one-man shop) → M/M/1 model

Step 1: Rates

$$\lambda = \frac{1}{12}\text{ customers/min}, \qquad \mu = \frac{1}{10}\text{ customers/min}$$

Step 2: Traffic intensity

$$\rho = \frac{\lambda}{\mu} = \frac{1/12}{1/10} = \frac{10}{12} = \frac{5}{6} \approx 0.833 \quad (<1,\text{ stable})$$

Step 3: Expected number in queue $L_q$

$$L_q = \frac{\rho^2}{1-\rho} = \frac{(5/6)^2}{1 - 5/6} = \frac{25/36}{1/6} = \frac{25}{6} \approx 4.17 \text{ customers}$$

(Supporting) Expected number in system $L_s$

$$L_s = \frac{\rho}{1-\rho} = \frac{5/6}{1/6} = 5 \text{ customers}$$

Final Answer

$$\boxed{L_q = \frac{25}{6} \approx 4.17 \text{ customers waiting in the queue}}$$

The question specifically asks for customers in the queue, so $L_q \approx 4.17$ is the required answer ($L_s = 5$ is the number in the whole shop).

Open this answer on its own page →

2079 Ā· 5 marks

What are the basic concepts of queuing theory? In a super market, the average arrivals rate of customer is 10 per every 30 minutes following Poisson process. The average time taken by the cashier to list and calculate the customers purchase is 2.5 minutes following exponential distribution. What is the probability that queue length exceeds 6? What is the expected time spent by customer in the system? [5]

  • Arrival: 10 customers per 30 minutes (Poisson process) - Service time: 2.5 minutes per customer (exponential distribution) - Find: $P(\text{queue length} 6)$ and expected time in system $W$ --- Queuing theory is the mathematical study of waiting lines. A queuing system consists of customers arr...
Open this answer on its own page →

Counting process

2080 Ā· 5 marks

Customers of certain Internet service provider connect to the internet at the average rate of 10 new connections per minute. Connections are modelle by binomial counting process. a. What frame length gives the probability 0.1 of an arrival during given frame? b. Find the mean and variance for the number of seconds between two consecutive connections. [5]

  • Arrival rate: $\lambdaA = 10$ connections per minute - Process model: Binomial counting process - Part (a): required frame probability $p = 0.1$ - Part (b): find mean and variance of inter-arrival time in seconds Convert rate to seconds for consistency: $$\lambdaA = 10 \text{ per minute} = \fra...
Open this answer on its own page →

Markov Process

2079 Ā· 5 marks

Define Markov chain and its characteristics. [5]

Show solved answer

Markov Chain and Its Characteristics

Definition of Stochastic Process

A stochastic process is a family of random variables indexed by time as a parameter. It is denoted as {X(t), t ∈ T}, where:

  • T = index set (time parameter)
  • X(t) = random variable at time t
  • I = state space (the set of all possible values assumed by X(t))

The values assumed by the random variable X(t) are called states.


Definition of Markov Chain

A Markov Chain is a stochastic process {X(t), t = 0, 1, 2, ...} that satisfies the Markov property (memoryless property):

$$P[X(t+1) = j \mid X(t) = i,\ X(t-1) = i_{t-1},\ \ldots,\ X(0) = i_0] = P[X(t+1) = j \mid X(t) = i]$$

That is, the future state depends only on the present state, not on the past states.

The probability $P[X(t+1) = j \mid X(t) = i] = p_{ij}$ is called the transition probability from state $i$ to state $j$.


Characteristics of a Markov Chain

1. Markov Property (Memoryless Property)

The conditional probability of any future state depends only on the current state, not on the sequence of states that preceded it. This is the defining characteristic.

2. Transition Probability Matrix (TPM)

The one-step transition probabilities are arranged in a matrix $P = [p_{ij}]$, where:

  • $p_{ij} \geq 0$ for all $i, j$
  • $\sum_{j} p_{ij} = 1$ for each row $i$ (rows sum to 1)

Such a matrix is called a stochastic matrix.

3. Homogeneity (Time Homogeneous)

A Markov chain is said to be homogeneous if the transition probabilities do not depend on time $t$, i.e., $p_{ij}$ remains constant over time.

4. Chapman-Kolmogorov Equation

The $n$-step transition probability satisfies:

$$p_{ij}^{(n)} = \sum_{k} p_{ik}^{(r)} \cdot p_{kj}^{(n-r)}, \quad 0 < r < n$$

In matrix form: $P^{(n)} = P^n$

5. Steady State (Limiting) Distribution

As $n \to \infty$, the $n$-step transition probabilities converge to a steady state distribution $\pi$, such that:

$$\pi_j = \lim_{n \to \infty} P^n(x)$$

The steady state distribution satisfies: $$\pi P = \pi \quad \text{and} \quad \sum_{j} \pi_j = 1$$

6. Irreducibility

A Markov chain is irreducible if every state can be reached from every other state, i.e., all states communicate with each other.

7. Recurrence and Transience

  • A state $i$ is recurrent if the process returns to state $i$ with probability 1.
  • A state $i$ is transient if there is a positive probability of never returning to state $i$.

Summary Table

CharacteristicDescription
Markov PropertyFuture depends only on present
TPMNon-negative entries, rows sum to 1
HomogeneityTransition probs constant over time
Chapman-Kolmogorov$P^{(n)} = P^n$
Steady State$\pi P = \pi$, $\sum \pi_j = 1$
IrreducibilityAll states communicate
Open this answer on its own page →

2078 Ā· 5 marks

Define the Markov chain and introduce its basic notations. Also, explain the characteristics of a Markov chain. [5]

A Markov chain is a stochastic process {X(t), t = 0, 1, 2, ...} that satisfies the Markov property (memoryless property), which states that the future state of the process depends only on the present state and not on the past states. Mathematically, for all states iā‚€, i₁, ..., iₙ₋₁, i, j: $$P[X(t...

Open this answer on its own page →

2077 Ā· 5 marks

Define Markov chain and describe its characteristics. [5]

A Markov Chain is a special type of stochastic process in which the future state of the system depends only on the present state, and not on the past states (history). It is a discrete-time stochastic process {X(t), t = 0, 1, 2, ...} that satisfies the Markov property. Mathematically, the Markov ...

Open this answer on its own page →

2077 Ā· 5 marks

Every day is generally considered as either sunny or rainy. A sunny day is followed by another sunny day with probability 0.8 whereas a rainy day is followed by a sunny day with probability 0.4. Suppose it rains on Monday. Make forecasts for Tuesday and Wednesday. [5]

Given data: - States: Sunny (S), Rainy (R) - P(Sunny Sunny) = 0.8, therefore P(Rainy Sunny) = 0.2 - P(Sunny Rainy) = 0.4, therefore P(Rainy Rainy) = 0.6 - Initial condition: it rains on Monday, so P(Rainy on Monday) = 1 - Required: forecast for Tuesday and Wednesday All required data is present. ...

Open this answer on its own page →

Queuing system

2075 Ā· 5 marks

Define main component of queuing system. [5]

A queuing system is a system designed to perform certain tasks or process certain jobs by one or several servers, where jobs wait in a queue to be processed. The main components of a queuing system are described below: --- - This component describes how customers or jobs arrive into the system. -...

Open this answer on its own page →

Bernoulli single server queuing process

2075 Ā· 5 marks

Jobs are sent to mainframe computer at a rate of 4 jobs per minute. Arrivals are modeled by a binomial process. a. Choose a frame size that makes the probability of a new received during each frame equal to 0.1. b. Using the chosen frame compute the probability of more than 4 jobs received during one minute. c. Compute mean and variance of inter arrival time? [5]

  • Arrival rate: $\lambda = 4$ jobs per minute - Process type: Binomial (Bernoulli frames) - Target frame probability: $p = 0.1$ --- In a binomial process, arrivals occur one per frame with probability $p$, so the rate is: $$\lambda = \frac{p}{\Delta} \implies \Delta = \frac{p}{\lambda} = \frac{0....
Open this answer on its own page →