Maths PPT (Higher Transition Matrix)
Maths PPT (Higher Transition Matrix)
a na lys is a nd p a tte rn
, a nd e q uilib rium d yna mic s , transition probabilities
re c og nition It e na b le s
. influencing t h e drive innovations in
acc urate forecasting a n d development of efficient q ua ntum me c ha nic s ,
a d v a n c e m e n t s in diverse
te c hnolog ie s .
Higher Transition Probabilities
The entry Pi j, in the transition probability matrix P of the Markov chain, is the probability that the
system changes from the state ai to aj in a single step. That is ai -> aj
The probability that the system changes from the state ai to the state aj in exactly n steps is denoted by
pi j(n)
That is ai ar1 ar2 … arn-1 aj
The matrix formed by the probabilities pi j(n) is called the n-step transition matrix denoted by p(n)
[p(n)] = [pi j(n)] is obviously a stochastic matrix.
It can be proved that the n-step transition matrix is equal to the power of P.
That is P(n) = Pn
Let P be the t.p.m of the Markov chain and let p = (pi) = (p1,p2,….pm) be the probability distribution at
some arbitrary time. Then pP, pP2...pPn respectively are the probabilities of the system after one step,
two steps,... n steps.
Let p(0) = [p(0) 1, p(0) 2,…. p(0)m ] denote the initial probability f=distribution at the start of the process
and let p(n) = [p(n) 1, p(n) 2,…. p(n)m ] denote the nth step probability distribution at the end of n steps.
Thus we have
p(1) = p(0)P , p(2) = p(1)P = p(0)P2,…. p(n) = p(0)Pn.
ILLUSTRATIONS:
3) Three boys A, B, and C are throwing a ball to each other. A always throws the ball to B and B always throws
the ball to C, but C is just as likely to throw the ball to B as to A. If C was the first person to throw the ball find
the probabilities that after three throws
(i) A has the ball (ii) B has the ball (iii) C has the ball.
PYTHON CODE:
1) import numpy as np
def higher_transition_probability(initial_state, transition_matrix, steps):
current_state = np.array(initial_state)
for _ in range(steps):
current_state = np.dot(current_state, transition_matrix)
return current_state.tolist()
# Example usage:
initial_state = [0.2, 0.8] # Initial probabilities of being in each state
transition_matrix = [[0.7, 0.3], [0.4, 0.6]] # Transition matrix
steps = 3 # Number of steps for transition
result = higher_transition_probability(initial_state, transition_matrix, steps)
print("Probability after", steps, "steps:", result)
2) import numpy as np
def higher_transition_probability(current_state, next_state):
# Define your transition matrix
transition_matrix = np.array([[0.7, 0.3],[0.2, 0.8]])
# Example transition matrix
# Define your higher transition probabilities
higher_probabilities = { (0, 1): 0.1, # Transition probability from state 0
to state 1 (1, 0): 0.05 # Transition probability from state 1 to state 0 }