### Flowcharts

**Q74.** Sketch a flowchart that represents this bit of logic: “if the balance is less than the minimum alternative payment then just pay the balance, otherwise, pay the minimum alternative payment.”

**Q80.** If A: until B do C and then, do D if E, otherwise do F while G. Otherwise if H, then if I do J else do K. Do L.

**Q87.** Sketch a flow chart to represent the following scenario. The Alameda County Waste Management Authority (ACWMA) has decided to spend some money on a public relations campaign to increase the level of composting ("green bin") recylcing. Data on hand says that current levels are 4 kg per household of four per week. The plan is to spend $10,000 on advertising each month until the level has gone over 6 kg per week for four weeks in a row.

Prefatory concern – what does 4 kg / household of 4 / week mean? The amount of compost likely depends on the number of people in a household. We don't want to get the numbers wrong by failing to take this into account. So, in our data collection, we double the number for households of 2, halve it for households of 8, etc. Why not just express it as "kg/person/week"? That would work fine mathematically. Perhaps the PR folks had wanted to focus on households (and families) so as to induce a greater sense of collective responsibility.

### Decision Trees

**Q92.** What is wrong with the decision tree here? I need to decide whether to work at home or go down to Stanford today. At home, because of distractions, I work at about 75% efficiency. If I go to my research office at Stanford I work at 100% efficiency. If I work at home I will get 8 hours to work. If I decide to drive down to Stanford, I will get 8 hours minus driving time to work. The normal drive is ^0 minutes each way. But about 20% of the time it is extra light and the round trip takes just 90 minutes. About 30% of the time, though, traffic is awful and round trip is 180 minutes. I made a decision tree to figure out where I should work if I am trying to maximize my output, but I did something wrong. Fix the tree and tell me what I should do.

**Q96.** A college enrolls two types of students. Full-pay students pay $40K tuition and half-pay students pay $20K. At present the school spends $1 million per year to recruit 200 students about 75% of whom are half-pay and 25% full-pay. A consultant submits a proposal to shift resources around and use GIS to target recruitment at zip codes that are more likely to yield full-pay students. She says there is a 75% chance that the results will be a slightly smaller class (190) but one with 40% full-pay and 60% half-pay. Unfortunately there is also a risk things won't turn out so well. There's a 25% chance that enrollment will drop to 170 and only 30% will be full pay. Use a decision tree to advise the college as to its best course of action.

**Q106.** She may love you or she may not. It turns out there is a 40% chance she does. You decide to use the buttercup test to find out (hold a buttercup under chin and see if it reflects yellow). The test is 90% accurate. Draw tree and flip to determine what conclusions we can draw from positive and negative buttercup test results.

### Difference Equations

**Q115.** There are no births in a Shaker community, only **R** recruits per year. The death rate is **d**. What is the difference equation that describes this situation?

**Q119.** Mills public policy program recruits **R** new students each fall. In the spring 0.0G (i.e., G%) students graduate. At the end of a typical year 0.0L (i.e., L%) of active students leave for personal or other reasons. Express the current student population, **P**, in terms of these figures.

**Q123.** Suppose I am sitting on $20,000 and I am trying to figure out whether or not to use it to buy a car. I have a very limited life and have determined that if I buy the car I will have to pay $800 insurance and about 10 cents per mile to operate it and I drive 2500 miles per year. If I own a car I'll drive rather than take the bus on approximately 300 local commutes (saving $1000 and 150 hours net). My time is worth $50 per hour. An alternative would be to put the $20,000 into an investment vehicle (so to speak) that would pay me 7.5% annually.

### Markov Models

**Q157.** Sketch the transition matrix that corresponds to the following diagram

**Q153.** A criminologist and an activist decide to collaborate on a project designed to reduce prison population. In the spirit of starting simple, they identify 4 states in which people can find themselves: never imprisoned; incarcerated; on parole; post-parole. The period of time in their analysis will be one year. Suppose 70% of the population has never been incarcerated. Each year 2% of these people are imprisoned. Of those currently incarcerated, 20% are released each year onto parole. Average parole is 5 years so that a person on parole has a 20% chance of finishing parole. Those on parole have a 10% chance of finding themselves back in prison in any given year. Individuals who are post parole have a 4% chance of returning to prison in any given year. Draw a state diagram and matrix representing this information.

**Q158.** Suppose the following statements are true about the local housing market.

- On a month to month basis, 90% of mortgage payments are on time, 10% are late or missed.
- Of all the late/missed payments, 25% are back on track the following month. 65% are late again. 10% go into default.
- Of all mortgages in default in a given month, 20% have a work-out and return to good standing. 70% remain in default and 10% move into foreclosure.
- Of all houses in foreclosure each month, the banks manage to get 20% back on the market and resold.

Draw the transition diagram and write out the transition matrix.

### Sorting and Peer Effects

**Q172.** Consider this data on the thresholds in a population. Draw a frequency histogram and cumulative frequency diagram. If news reports suggest participation will be at 20 people, how many people's threshold is met or exceeded? How about if the number is 70?

**Q175.** Consider this data on the thresholds in a population. Draw a frequency histogram and cumulative frequency diagram. Plot the cumulative distribution on a chart with a 45 degree line.

**Q179.** Which of the cumulative frequency distributions below corresponds to this frequency distribution

A. | B. | C. |

D. | E. |

### Aggregation

**Q167.** Suppose we have a diffusion process in which all susceptibles who are in contact with an infected in a given time period become infected in the next time period. On the grids below color in squares to indicate what happens over the first six time periods beginning with one infected. Then fill in the table and chart the data.

**Q168.** Suppose we have a diffusion process in which susceptibles who are in contact with an infected in a given time period have a 50% chance of becoming infected in the next time period. Now play the “game” again except this time flip a coin each time (or use a random number chart for probabilities other than 50:50) to see whether neighbors become infected or not. Note: You might not want to play all the way out to time period 5! On the grids below color in squares to indicate what happens over the first six time periods beginning with one infected. Then fill in the table and chart the data.

**Q169.** Consider the 12 block neighborhood bounded by parks on the north and south and major thoroughfares on the east and west. Green houses are supporting Obama, purple houses Romney.

Using the facing blocks delineated by the red dashed lines as units (it yields 15 of them), calculate the index of dissimilarity.

### Cellular Automata

**Q165.** What's the difference between an "equation-based model" and an "agent model"? What are some other synonyms we might hear for these terms?

**Q166.**Consider a one dimensional cellular automata that looks like this:

Generation 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |

Generation 2 |

Show what the next few generations would look like subject to "rule 93":

Rule 93 | ||||||||||||||||||||||||||||||

0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

0 | 1 | 0 | 1 | 1 | 1 | 0 | 1 |

New Question: Look at these patterns generated by cellular automata. Do they represent stable, oscillating, or unstable/disorderly rules?

### Tipping Models

**Q164.** Sketch a flowchart that represents the logic of setting up a Schelling "tipping model":

To Create Schelling Model

- Set up the model.
- Run the model until everyone is content to stay where they are.

To Set Up

- Start with an NxN grid.
- Identify a number of type A residents and a number of type B residents such that A+B is less than N
^{2}. - Randomly place As and Bs on grid.

To Run the Model

- For each resident, evaluate move/stay choices
- For each resident, find new location for all those that choose move.

To Evaluate choice

- Identify the resident
- Count all neighbors
- Count similars
- Compute ratio
- If larger than threshold, mark as stay, otherwise mark as move

To Move

- Select a random square
- If empty, move there. Otherwise try again.

**Q171.** A common phrase to describe processes in which people engage in imitative behavior is "bandwagon effect." Explain the appropriateness of this metaphor.

New Question: A percolation problem to be created by Dan :)