0

How can I solve this problem?

i want my code not error and please provide easy to understand explanations. this is about stochastic models rickshaw rides.

enter image description here

enter image description here

from scipy.stats import poisson

#Parameter
lamda = 2 #rata-rata turis yang datang per 2 menit
#Menghitung probabilitas untuk jumlah turis yang berbeda
turis = [0,1, 2,3,4]
bobot = poisson.pmf(turis, lamda)
#menghitung bobot untuk setiap jumlah turis
bobot[-1] =1-sum(bobot[:-1]) 
bobot

#Matrix Makrov (Prob Transisi)
p[0,:]=bobot
p[1,:]=bobot
p[2,:]=bobot
p[3,1:]=bobot[:-1]
p[3,-1:]=bobot[-2:]
p[4,:]=bobo
p
James Z
  • 12,209
  • 10
  • 24
  • 44

0 Answers0