Question: For this assignment do not upload R code or output. Please summarize your findings on paper, scan and upload the pdf , for the following
For this assignment do not upload R code or output.
Please summarize your findings on paper, scan and upload the pdf for the following two questions:
Use the pieces of code below to create the transition matrix for a Ladder Chain with k
states, and then run some experiments run at least times with new lists of random numbers to estimate how far back in time would the ProppWilson algorithm have to start for at time
to be only one state occupied.
What would be your estimate if the Ladder Chain had k
states? Explain your reasoning for the answer.
Transition matrix
Copy
k
Pmatrixncol nrow
P
Pkk
fori in :kPii
Pii
Preparatory function
Copy
ppsi functionxp
cumprob cumsump
for j in :lengthp
if x cumprobj
j
break
returnj
Update function
Copy
phifunctionsxppsixPs
List of random numbers
Copy
n
Ulrunifn
Run the ProppWilson algorithm
Copy
forj in :nts:k
Os:k
fori in j:
tslapplytsphi,xUli
OscbindOsts
printOs
iflengthuniquets
Xunlistuniquets
printX
break
## Os ts
##
##
##
##
##
## Os ts ts
##
##
##
##
##
## Os ts ts ts ts
##
##
##
##
##
## Os ts ts ts ts ts ts ts ts
##
##
##
##
##
##
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
