Max Curie
2 min readAug 13, 2023

Markov birth-death process — discrete & continuous

Video is based on the

Markov basic theory: https://youtu.be/WoQXuikYJdY

Markov birth-death process discrete & continuous: https://youtu.be/ZgOGg2q1J54

MIT courses:

Markov Chains I: https://youtu.be/IkbkEtOOC1Y

basic concept, probability flow conservation laws, steady-state calculations

Markov Chains II: https://youtu.be/ZulMqrvP-Pk

periodicity, birth death process discrete

Markov Chains III: https://youtu.be/HIMxdWDLEK8

birth death process continuous, absorption rate, Mean recurrent time

Homework: https://ocw.mit.edu/courses/6-041-probabilistic-systems-analysis-and-applied-probability-fall-2010/resources/mit6_041f10_assn08/

statistics playlist: https://youtube.com/playlist?list=PLgNi5MiqkBWZaC1TYCwbbJPBMURneLo8f

import numpy as np
import matplotlib.pyplot as plt

n_B = 30
lambada_ = 0.002 # probability of starting a phone call
mu = 0.003 # probability of ending of a phone call

n_B_list = np.arange(1, n_B + 1)

# Compute logarithm of factorial
def log_factorial(n):
return sum(np.log(np.arange(1, n + 1)))

# Calculate pi_i in log space
def pi_i_calc_log(lambada_, mu, i):
if i == 0:
return 0 # Log(1) = 0
return i * np.log(lambada_/mu) - log_factorial(i)

# Calculate pi list in log space
def pi_list_calc_log(lambada_, mu, B):
return [pi_i_calc_log(lambada_, mu, i) for i in range(B + 1)]

def pi_B_calc_log(lambada_, mu, B):
log_pi_B = pi_i_calc_log(lambada_, mu, B)
log_sum = np.log(sum(np.exp(pi_list_calc_log(lambada_, mu, B))))
return np.exp(log_pi_B - log_sum)

pi_B_list = [pi_B_calc_log(lambada_, mu, B) for B in n_B_list]

plt.clf()
plt.plot(n_B_list, pi_B_list)
plt.xlabel('B')
plt.ylabel(r'$\pi_B$')
plt.yscale('log')
plt.show()

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

No responses yet

Write a response