Markov Chain Models

These models and simulations have been tagged “Markov Chain”.

Related tagsOlinick

This is an introductory example from Olinick's book  An Introduction to Mathematical Models in the Social and Life Sciences . ​  "A recent study focused on the relationship between the birth weights of English women and the birth weights of their daughters. The weights were split into three categori
This is an introductory example from Olinick's book An Introduction to Mathematical Models in the Social and Life Sciences. ​

"A recent study focused on the relationship between the birth weights of English women and the birth weights of their daughters. The weights were split into three categories: low (below 6 pounds), average (between 6 and 8 pounds), and high (above 8 pounds). Among women whose own birth weights were low, 50 percent of the daughters had low birth weights, 45 percent had average weights, and 5 percent had high weights. Women with average birth weights had daughters with average weights half of the time, while the half was split evenly between low and high categories. Women with high birth weights had female babies with high weights 40 percent of the time, with low and average weights each occuring 30 percent of the time." p. 274-275.

For the Markov chain, you should make sure that you're taking time steps of length 1 in the settings, and Euler. RK-4 effectively looks beyond a single previous step, so it has a sort of memory!

Thanks Mike! Interesting examples, as always....
Andy Long

Next up: an SIR.
This is an introductory example from Olinick's book  An Introduction to Mathematical Models in the Social and Life Sciences . ​  "A recent study focused on the relationship between the birth weights of English women and the birth weights of their daughters. The weights were split into three categori
This is an introductory example from Olinick's book An Introduction to Mathematical Models in the Social and Life Sciences. ​

"A recent study focused on the relationship between the birth weights of English women and the birth weights of their daughters. The weights were split into three categories: low (below 6 pounds), average (between 6 and 8 pounds), and high (above 8 pounds). Among women whose own birth weights were low, 50 percent of the daughters had low birth weights, 45 percent had average weights, and 5 percent had high weights. Women with average birth weights had daughters with average weights half of the time, while the half was split evenly between low and high categories. Women with high birth weights had female babies with high weights 40 percent of the time, with low and average weights each occuring 30 percent of the time." p. 274-275.

For the Markov chain, you should make sure that you're taking time steps of length 1 in the settings, and Euler. RK-4 effectively looks beyond a single previous step, so it has a sort of memory!

Thanks Mike! Interesting examples, as always....
Andy Long

Next up: an SIR.
This is an introductory example from Olinick's book  An Introduction to Mathematical Models in the Social and Life Sciences . ​  "A recent study focused on the relationship between the birth weights of English women and the birth weights of their daughters. The weights were split into three categori
This is an introductory example from Olinick's book An Introduction to Mathematical Models in the Social and Life Sciences. ​

"A recent study focused on the relationship between the birth weights of English women and the birth weights of their daughters. The weights were split into three categories: low (below 6 pounds), average (between 6 and 8 pounds), and high (above 8 pounds). Among women whose own birth weights were low, 50 percent of the daughters had low birth weights, 45 percent had average weights, and 5 percent had high weights. Women with average birth weights had daughters with average weights half of the time, while the half was split evenly between low and high categories. Women with high birth weights had female babies with high weights 40 percent of the time, with low and average weights each occuring 30 percent of the time." p. 274-275.

For the Markov chain, you should make sure that you're taking time steps of length 1 in the settings, and Euler. RK-4 effectively looks beyond a single previous step, so it has a sort of memory!

Thanks Mike! Interesting examples, as always....
Andy Long

Next up: an SIR.
This is an introductory example from Olinick's book  An Introduction to Mathematical Models in the Social and Life Sciences . ​  "A recent study focused on the relationship between the birth weights of English women and the birth weights of their daughters. The weights were split into three categori
This is an introductory example from Olinick's book An Introduction to Mathematical Models in the Social and Life Sciences. ​

"A recent study focused on the relationship between the birth weights of English women and the birth weights of their daughters. The weights were split into three categories: low (below 6 pounds), average (between 6 and 8 pounds), and high (above 8 pounds). Among women whose own birth weights were low, 50 percent of the daughters had low birth weights, 45 percent had average weights, and 5 percent had high weights. Women with average birth weights had daughters with average weights half of the time, while the half was split evenly between low and high categories. Women with high birth weights had female babies with high weights 40 percent of the time, with low and average weights each occuring 30 percent of the time." p. 274-275.

For the Markov chain, you should make sure that you're taking time steps of length 1 in the settings, and Euler. RK-4 effectively looks beyond a single previous step, so it has a sort of memory!

Thanks Mike! Interesting examples, as always....
Andy Long

Next up: an SIR.
This is an introductory example from Olinick's book  An Introduction to Mathematical Models in the Social and Life Sciences . ​  Galla age distribution  Next up: an SIR.
This is an introductory example from Olinick's book An Introduction to Mathematical Models in the Social and Life Sciences. ​

Galla age distribution

Next up: an SIR.
This is an introductory example from Olinick's book  An Introduction to Mathematical Models in the Social and Life Sciences . ​  Next up: and SIR, and his interesting model of female birth weights.
This is an introductory example from Olinick's book An Introduction to Mathematical Models in the Social and Life Sciences. ​

Next up: and SIR, and his interesting model of female birth weights.
A simple ABM to model voters switching party allegiances in US elections using a Markov chain.
A simple ABM to model voters switching party allegiances in US elections using a Markov chain.
This is an introductory example from Olinick's book  An Introduction to Mathematical Models in the Social and Life Sciences . ​  "A recent study focused on the relationship between the birth weights of English women and the birth weights of their daughters. The weights were split into three categori
This is an introductory example from Olinick's book An Introduction to Mathematical Models in the Social and Life Sciences. ​

"A recent study focused on the relationship between the birth weights of English women and the birth weights of their daughters. The weights were split into three categories: low (below 6 pounds), average (between 6 and 8 pounds), and high (above 8 pounds). Among women whose own birth weights were low, 50 percent of the daughters had low birth weights, 45 percent had average weights, and 5 percent had high weights. Women with average birth weights had daughters with average weights half of the time, while the half was split evenly between low and high categories. Women with high birth weights had female babies with high weights 40 percent of the time, with low and average weights each occuring 30 percent of the time." p. 274-275.

For the Markov chain, you should make sure that you're taking time steps of length 1 in the settings, and Euler. RK-4 effectively looks beyond a single previous step, so it has a sort of memory!

Thanks Mike! Interesting examples, as always....
Andy Long

Next up: an SIR.
This is an introductory example from Olinick's book  An Introduction to Mathematical Models in the Social and Life Sciences . ​  "A recent study focused on the relationship between the birth weights of English women and the birth weights of their daughters. The weights were split into three categori
This is an introductory example from Olinick's book An Introduction to Mathematical Models in the Social and Life Sciences. ​

"A recent study focused on the relationship between the birth weights of English women and the birth weights of their daughters. The weights were split into three categories: low (below 6 pounds), average (between 6 and 8 pounds), and high (above 8 pounds). Among women whose own birth weights were low, 50 percent of the daughters had low birth weights, 45 percent had average weights, and 5 percent had high weights. Women with average birth weights had daughters with average weights half of the time, while the half was split evenly between low and high categories. Women with high birth weights had female babies with high weights 40 percent of the time, with low and average weights each occuring 30 percent of the time." p. 274-275.

For the Markov chain, you should make sure that you're taking time steps of length 1 in the settings, and Euler. RK-4 effectively looks beyond a single previous step, so it has a sort of memory!

Thanks Mike! Interesting examples, as always....
Andy Long

Next up: an SIR.
This is an introductory example from Olinick's book  An Introduction to Mathematical Models in the Social and Life Sciences . ​  Next up: and SIR, and his interesting model of female birth weights.
This is an introductory example from Olinick's book An Introduction to Mathematical Models in the Social and Life Sciences. ​

Next up: and SIR, and his interesting model of female birth weights.
This is an introductory example from Olinick's book  An Introduction to Mathematical Models in the Social and Life Sciences . ​  "A recent study focused on the relationship between the birth weights of English women and the birth weights of their daughters. The weights were split into three categori
This is an introductory example from Olinick's book An Introduction to Mathematical Models in the Social and Life Sciences. ​

"A recent study focused on the relationship between the birth weights of English women and the birth weights of their daughters. The weights were split into three categories: low (below 6 pounds), average (between 6 and 8 pounds), and high (above 8 pounds). Among women whose own birth weights were low, 50 percent of the daughters had low birth weights, 45 percent had average weights, and 5 percent had high weights. Women with average birth weights had daughters with average weights half of the time, while the half was split evenly between low and high categories. Women with high birth weights had female babies with high weights 40 percent of the time, with low and average weights each occuring 30 percent of the time." p. 274-275.

For the Markov chain, you should make sure that you're taking time steps of length 1 in the settings, and Euler. RK-4 effectively looks beyond a single previous step, so it has a sort of memory!

Thanks Mike! Interesting examples, as always....
Andy Long

Next up: an SIR.
This is an introductory example from Olinick's book  An Introduction to Mathematical Models in the Social and Life Sciences . ​  Next up: and SIR, and his interesting model of female birth weights.
This is an introductory example from Olinick's book An Introduction to Mathematical Models in the Social and Life Sciences. ​

Next up: and SIR, and his interesting model of female birth weights.
This is an introductory example from Olinick's book  An Introduction to Mathematical Models in the Social and Life Sciences . ​  Next up: and SIR, and his interesting model of female birth weights.
This is an introductory example from Olinick's book An Introduction to Mathematical Models in the Social and Life Sciences. ​

Next up: and SIR, and his interesting model of female birth weights.
This is an introductory example from Olinick's book  An Introduction to Mathematical Models in the Social and Life Sciences . ​  Next up: and SIR, and his interesting model of female birth weights.
This is an introductory example from Olinick's book An Introduction to Mathematical Models in the Social and Life Sciences. ​

Next up: and SIR, and his interesting model of female birth weights.
This is an example I thought of after reading Olinick's book  An Introduction to Mathematical Models in the Social and Life Sciences . ​  It's an SIR-type model, but one where the equilibrium (ws,wi,wr) is always the same, even as the weights in the transition matrix change.  Actually it might be be
This is an example I thought of after reading Olinick's book An Introduction to Mathematical Models in the Social and Life Sciences. ​

It's an SIR-type model, but one where the equilibrium (ws,wi,wr) is always the same, even as the weights in the transition matrix change.

Actually it might be better to think of this as a poisoning model: the rate of infection is constant, and independent of the existence of an infected population. That's more like disease due to an environmental effect (e.g. lead-poisoning from smelters, or mercury poisoning from the burning of coal). So infected would mean "effected", and "recovered" might be "treated" -- and ultimately released, to be exposed again.

This shows that the equilibrium does not determine the transition probabilities: two different transition matrices can have the same ultimate equilibrium.

There is a constraint on the infection rate that I haven't figured out how to build in:

InfectionRate < Min[1,wi/ws, wr/ws]

I can allow InfectionRate to vary up to 1 if I take
ws < wi
and
ws < wr
However if you violate that, you'll get interesting solutions with negative values of populations. The dynamics are pretty interesting in that case, however! If you want to see them, you'll have to remove the constraints that I put on the parameters in the Recover and LossOfImmunity parameters.

Thanks Mike! Interesting examples, as always....
Andy Long

This is an example I thought of after reading Olinick's book  An Introduction to Mathematical Models in the Social and Life Sciences . ​  It's an SIR-type model, but one where the equilibrium (ws,wi,wr) is always the same, even as the weights in the transition matrix change.  Actually it might be be
This is an example I thought of after reading Olinick's book An Introduction to Mathematical Models in the Social and Life Sciences. ​

It's an SIR-type model, but one where the equilibrium (ws,wi,wr) is always the same, even as the weights in the transition matrix change.

Actually it might be better to think of this as a poisoning model: the rate of infection is constant, and independent of the existence of an infected population. That's more like disease due to an environmental effect (e.g. lead-poisoning from smelters, or mercury poisoning from the burning of coal). So infected would mean "effected", and "recovered" might be "treated" -- and ultimately released, to be exposed again.

This shows that the equilibrium does not determine the transition probabilities: two different transition matrices can have the same ultimate equilibrium.

There is a constraint on the infection rate that I haven't figured out how to build in:

InfectionRate < Min[1,wi/ws, wr/ws]

I can allow InfectionRate to vary up to 1 if I take
ws < wi
and
ws < wr
However if you violate that, you'll get interesting solutions with negative values of populations. The dynamics are pretty interesting in that case, however! If you want to see them, you'll have to remove the constraints that I put on the parameters in the Recover and LossOfImmunity parameters.

Thanks Mike! Interesting examples, as always....
Andy Long

This is an introductory example from Olinick's book  An Introduction to Mathematical Models in the Social and Life Sciences . ​  Next up: and SIR, and his interesting model of female birth weights.
This is an introductory example from Olinick's book An Introduction to Mathematical Models in the Social and Life Sciences. ​

Next up: and SIR, and his interesting model of female birth weights.
This is an introductory example from Olinick's book  An Introduction to Mathematical Models in the Social and Life Sciences . ​  Next up: and SIR, and his interesting model of female birth weights.
This is an introductory example from Olinick's book An Introduction to Mathematical Models in the Social and Life Sciences. ​

Next up: and SIR, and his interesting model of female birth weights.
This is an introductory example from Olinick's book  An Introduction to Mathematical Models in the Social and Life Sciences . ​  Next up: and SIR, and his interesting model of female birth weights.
This is an introductory example from Olinick's book An Introduction to Mathematical Models in the Social and Life Sciences. ​

Next up: and SIR, and his interesting model of female birth weights.
This is an introductory example from Olinick's book  An Introduction to Mathematical Models in the Social and Life Sciences . ​  Next up: and SIR, and his interesting model of female birth weights.
This is an introductory example from Olinick's book An Introduction to Mathematical Models in the Social and Life Sciences. ​

Next up: and SIR, and his interesting model of female birth weights.
This is an introductory example from Olinick's book  An Introduction to Mathematical Models in the Social and Life Sciences . ​  Next up: and SIR, and his interesting model of female birth weights.
This is an introductory example from Olinick's book An Introduction to Mathematical Models in the Social and Life Sciences. ​

Next up: and SIR, and his interesting model of female birth weights.
This is an example I thought of after reading Olinick's book  An Introduction to Mathematical Models in the Social and Life Sciences . ​  It's an SIR-type model, but one where the equilibrium (ws,wi,wr) is always the same, even as the weights in the transition matrix change.  Actually it might be be
This is an example I thought of after reading Olinick's book An Introduction to Mathematical Models in the Social and Life Sciences. ​

It's an SIR-type model, but one where the equilibrium (ws,wi,wr) is always the same, even as the weights in the transition matrix change.

Actually it might be better to think of this as a poisoning model: the rate of infection is constant, and independent of the existence of an infected population. That's more like disease due to an environmental effect (e.g. lead-poisoning from smelters, or mercury poisoning from the burning of coal). So infected would mean "effected", and "recovered" might be "treated" -- and ultimately released, to be exposed again.

This shows that the equilibrium does not determine the transition probabilities: two different transition matrices can have the same ultimate equilibrium.

There is a constraint on the infection rate that I haven't figured out how to build in:

InfectionRate < Min[1,wi/ws, wr/ws]

I can allow InfectionRate to vary up to 1 if I take
ws < wi
and
ws < wr
However if you violate that, you'll get interesting solutions with negative values of populations. The dynamics are pretty interesting in that case, however! If you want to see them, you'll have to remove the constraints that I put on the parameters in the Recover and LossOfImmunity parameters.

Thanks Mike! Interesting examples, as always....
Andy Long

This is an introductory example from Olinick's book  An Introduction to Mathematical Models in the Social and Life Sciences . ​  Next up: and SIR, and his interesting model of female birth weights.
This is an introductory example from Olinick's book An Introduction to Mathematical Models in the Social and Life Sciences. ​

Next up: and SIR, and his interesting model of female birth weights.