Please use D2L to turn in both the DOC or Word output and your R Markdown file in.

### Q1.

Recreate the traveling politician example with seven islands that have the following population totals.

```
population.totals <- c(123,942,234,553,890,1458,99)
library(knitr)
kable(data.frame(island = as.character(1:7), pop = population.totals))
```

1 |
123 |

2 |
942 |

3 |
234 |

4 |
553 |

5 |
890 |

6 |
1458 |

7 |
99 |

#### a. (5 points)

Let your politican walk for 100 steps. Do you think this is an adequate amount of time for the politician to spend time proportional to the population of each island? why or why not?

#### b. (5 points)

Let your politician walk for 100,000 steps and recreate the 4 plots from lecture:

- relative population of islands
- relative time spent in each island
- first 15 steps
- first 100 steps.

#### c. (4 points)

Do you believe 100,000 steps is sufficient for the politician to spend time proportional to the population of each island? why or why not?

#### d. (6 points)

Assume your politician starts on island 1 on day 1, given this algorithm, compute the following probabilities, where \(l(i)\) is the politician location on day \(i\).

- \(Pr[l(1) = 1]\)
- \(Pr[l(2) = 1]\)
- \(Pr[l(2) = 2]\)
- \(Pr[l(3) = 2]\)
- \(Pr[l(3) = 5]\)
- finally take a guess at \(Pr[l(100,000) = 3]\)