Question

An animal can be in one of two states A or B. An individual in state...

An animal can be in one of two states A or B. An individual in state A will change to state B at an exponential rate α; an individual in stat B divides into two new individuals of type A at an exponential rate β.

Let α =1, β=2. At time 0, there is one cell, and it is type A. Estimate the expected number of cells of each type at time 5 and time 10.

use python/matlab is fine.

Homework Answers

Answer #1

from scipy.stats import expon
import random
t=0
a0=1
b0=0
a1=1
b1=0
while t<5:
a0=a1
b0=b1
if b0==0:
s=expon.rvs(scale=1,size=1)
t=s+t
b1=1
a1=a0-1
elif a0==0:
s=expon.rvs(scale=2,size=1)
t=s+t
b1=b0-1
a1=2
else:
s=expon.rvs(scale=1/3,size=1)
t=s+t
u=random.uniform(0,1)
if u<(1/3):
b1=b0+1
a1=a0-1
else:
b1=b0-1
a1=a0+2
print(a0)
print(b0)

while t<10:
a0=a1
b0=b1
if b0==0:
s=expon.rvs(scale=1,size=1)
t=s+t
b1=1
a1=a0-1
elif a0==0:
s=expon.rvs(scale=2,size=1)
t=s+t
b1=b0-1
a1=2
else:
s=expon.rvs(scale=1/3,size=1)
t=s+t
u=random.uniform(0,1)
if u<(1/3):
b1=b0+1
a1=a0-1
else:
b1=b0-1
a1=a0+2
print(a0)
print(b0)

Output looks something like this

2
1
0
6

Thus at t=5, Number of type A animals = 2, Number of type B animals =1

at t=10, Number of type A animals =0, Number of type B animals =6

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Consider a molecule that can be in one of two different conformation states A or B....
Consider a molecule that can be in one of two different conformation states A or B. These states are two different arrangements of the atoms: e.g., in state B, one part of the molecule could be rotated about a bond with respect to the rest of the molecule. Assume the energies of states A and B are 4e-21 and 8e-21 J respectively. At room temperature, T = 298 K, what is the relative likelihood of the molecule being found in...
Hyundai is considering opening a plant in two neighboring states. Option 1: One state has a...
Hyundai is considering opening a plant in two neighboring states. Option 1: One state has a corporate tax rate of 10 percent. If operated in this state, the plant is expected to generate $1,125,000 pretax profit. Option 2: The other state has a corporate tax rate of 2 percent. If operated in this state, the plant is expected to generate $1,080,000 of pretax profit. a. What is the after state taxes profit in the state with the 10% tax rate?...
Hyundai is considering opening a plant in two neighboring states. Option 1: One state has a...
Hyundai is considering opening a plant in two neighboring states. Option 1: One state has a corporate tax rate of 10 percent. If operated in this state, the plant is expected to generate $1,420,000 pretax profit. Option 2: The other state has a corporate tax rate of 2 percent. If operated in this state, the plant is expected to generate $1,380,000 of pretax profit. a. What is the after state taxes profit in the state with the 10% tax rate?...
Two states, A and B, have the same sales tax rate. State A has decided to...
Two states, A and B, have the same sales tax rate. State A has decided to reduce its sales tax, but state B does not. Assuming that consumers are mobile, the consumers in state B will gain as a result of state A's decision. True False
A hemoglobin molecule can carry one oxygen or one carbon monoxide molecule. Suppose that the two...
A hemoglobin molecule can carry one oxygen or one carbon monoxide molecule. Suppose that the two types of gases arrive at rates 1 and 2 and attach for an exponential amount of time with rates 3 and 4, respectively. Formulate a Markov chain model with state space {+, 0, −} where + denotes an attached oxygen molecule, − an attached carbon monoxide molecule, and 0 a free hemoglobin molecule and find the long-run fraction of time the hemoglobin molecule is...
Boeing is considering opening a plant in one of two neighboring states, Oregon or California. Let’s...
Boeing is considering opening a plant in one of two neighboring states, Oregon or California. Let’s just say, California has a corporate tax rate of 15%. If operated in this state, the plant is expected to generate $1,200,000 pretax profit. In Oregon state has a corporate tax rate of 5% and operation in Oregon state, the plant is expected to generate $1,085,000 of pretax profit. Which state should Boeing choose based upon tax considerations only? Why do you think the...
Boeing is considering opening a plant in one of two neighboring states, Oregon or California. Let’s...
Boeing is considering opening a plant in one of two neighboring states, Oregon or California. Let’s just say, California has a corporate tax rate of 15%. If operated in this state, the plant is expected to generate $1,200,000 pretax profit. In Oregon state has a corporate tax rate of 5% and operation in Oregon state, the plant is expected to generate $1,085,000 of pretax profit. Which state should Boeing choose based upon tax considerations only? Why do you think the...
Suppose the economy can be in one of the following two states: (i) Boom or “good”...
Suppose the economy can be in one of the following two states: (i) Boom or “good” state and (ii) Recession or “bad” state. Both states can occur with a probability of 1/2. Consider a risky asset that would have a price of $30 in the good state and $10 in the bad state. Two investors are evaluating this asset. The asset is currently trading at $20. The utility function of the first investor (A) is u(W) = 2√W , where...
An ion-channel is a transmembrane protein that can be in one of two states: OPEN (which...
An ion-channel is a transmembrane protein that can be in one of two states: OPEN (which allows ions to pass through the membrane) and CLOSED (which does not permit ions to pass through). You have an ion-channel in which the energy of the open state is 600 cal mol-1, the energy of the closed state is 1800 cal mol-1, and the temperature of the system is 300 K. (one cal per mole is equal to 4.18 J per mole, or...
1. a. It’s estimated that each human somatic cell contains two copies (one on each homologous...
1. a. It’s estimated that each human somatic cell contains two copies (one on each homologous chromosome) of about 21,000 genes. If you took a close look at one of these (differentiated cells), would you expect all copies of these 21,000 genes to be actively making proteins at any one time?  If you say yes, explain why (generally) it would be advantageous for a cell to actively express all of its genes.  If you say no, explain why (generally) it would be...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT