Question: How to do I go about solving this Python question. This is how I started it: import numpy as np M = np.array([[0.8,0.1,0.05,0.05],[0,0.6,0.2,0.2],[0,0.2,0.7,0.1],[0,0,0,1.0]]) examenol =

How to do I go about solving this Python question.

This is how I started it:

import numpy as np

M = np.array([[0.8,0.1,0.05,0.05],[0,0.6,0.2,0.2],[0,0.2,0.7,0.1],[0,0,0,1.0]])

examenol = 0

metaboliteA = 1

metaboliteB = 2

excreta = 3

examenolAmount = 100

metaboliteAAmount = 0

metaboliteBAmount = 0

excretaAmount = 0

hours = 0

while(excretaAmount

How to do I go about solving this Python question. This is

HW7.22. Drug Metabolism Drug Metabolism Markov Model Researchers are investigating a new drug "examenol" and have discovered the following about its metabolization: - Each hour 10% of examenol changes to metabolite A and 5% changes to metabolite B. Another 5% is excreted. - Each hour 20% of metabolite A changes to metabolite B and 20% of metabolite A is excreted. - Each hour 20% of metabolite B changes to metabolite A and 10% of metabolite B is excreted. Determine the number of hours it takes for 75% of one dose of examenol to be excreted. Hint: The metabolization can be modeled using a Markov chain with four states (examenol, metabolite A, metabolite B, excreted). At the beginning, all dosage is in the examenol state. Your code snippet should define the following variables: m _2d numpy array the transition matrix representing the Markov chain. -positive integer the number of hours needed to excrete 75% of the dose user_code.py

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!