# Day 2 of my computational modeling course

11 Jan 2017### Reflections

I began today’s class with intentions to have two major sections: recapping our Econophysics activity and beginning programming in scratch. We had several new students who had not been there Monday, so it was an opportunity to show them how the game worked by actually playing it instead of just describing it.

When we set up the game, I gave Seth and Tom instructions to give people a variable amount of starting money. I think I said between three and five coins. But, because we were using Nichols as our base Currensy, people ended up starting with $.25, $.30, $.40, and so on.

Trading lasted about four minutes. Then, we talked about reporting out our results. I followed a plan similar to when I substituted yesterday, where after a few students had reported out, we tried to make guesses about what the next student’s values would be.

Like yesterday, we tried to assign some measure of confidence to each of our guesses. And, like yesterday, some of our guesses were very far off the mark. Having new students in the class gave us the opportunity to use them as unknown values we would try to predict after we had everyone else report out. It gave us an opportunity to talk about what things we might or might not be sure of in terms of those remaining agents’ starting money and final money.

I was able to bring up the notion of consistency checking, as in making sure, for example, that the starting money and ending money amounts were equal to each other. As the final data points rolled in, we saw that our total starting money did not equal our total final money. And, the class seemed with me on being unnerved about that and wondering how it was possible that the money supply changed. It might’ve been clerical error on my part, it might’ve been clerical error on the students park, somebody could’ve brought in change, we just don’t know. But, it was such an awesome opportunity to bring up the notion of consistency checks, and of expectations about a system and when it violates them.

All of our wonderful discussion about guessing, confidence, and updating guessing in light of new information lasted longer than I thought it would. We started discussing the notion of estimators, and the notation for estimators being having a hat on top. The students discovered that two of the parameters we were trying to estimate, namely the number of rounds played in the final money, seemed to be coupled together in someway. As in, if you finish with zero money, there seem to be a greater chance that you played fewer rounds than if you finished with some money.

We also talked about the logic that drove particular estimators, like whether we thought someone was risk-averse or was in bracing risk could determine how many rounds they played. The popular notion in the room was the players who played more risky had the potential to blow out early and us were more likely to a place you were rounds and finished with zero. Because we allowed people to bet some or even all of their current cash holdings, there was a sense that people who are risky would try to go all in and that many all and that’s what fail, or at least some all and that’s what fail, and if they were early that got people out.

So, in trying to estimate three quantities—starting money, final money, and number of rounds played—we had different estimators for each based on potentially different logic. Our starting money estimator came from trying to get a sense of what the most common starting value was. Because none of us knew exactly how many pennies Tom and Seth gave to each player, we had to keep estimating down to the very end.

And, when we were down to the last agent, we went through different stages of feeling like we had absolute certainty in our predictions or feeling like we had no certainty at all. We felt it when we knew all but one person starting money, we could predict that final person starting money simply by looking at the difference between the final money and our current sum of initial money. But, we realize that potential he, the last unknown agents parameters could be anything, because they have could have finished with exactly as much money they started with. And, if that were the only constraint, then starting with $.20 or starting with $4.00 were both possible states this last agent could have had. To say nothing of her finishing with less or more money than she had before.

At that point, I thought the ground had been set to talk about degrees of freedom. Specifically, as something that might have seemed abstract or hard to remember from high school math, but was very concrete with the data in front of us. If we knew her starting value, then we could predict with absolute certainty what her final value was, assuming money was constant. And vice versa. If we knew how much money she finished with, we would exactly know her starting money, because it would be the difference between the current some of starting money and the total sum of all final money. Knowing one gives us the other, which is what degrees of freedom is all about. If we know neither, it’s still the case that exactly one value will be determined by the other’s.

By the time we finished degrees of freedom, it was 430. I didn’t want to cram scratch into the final 20 minutes of class so I made it on the fly decision to wait until Monday for scratch. And, I used the remaining time instead to have all students get set up on the Slack we created. Slack set up was surprisingly easy, and I think in total it took less than five minutes. As of now, we are certain that 90% or more of our class has successfully joined our Slack.

Because we still had time, I choose to use the last 10 minutes to build outward from the activity we had done today to how it fits into the larger scheme of the entire course. I showed the students that just about every single learning objective was something we touched on in the past two class days: creating a toy system, getting data from that system, determining the shape of our data, augmenting that data with additional information if it’s available, using numerical summaries to run consistency checks, predicting values based on past history, updating a prediction engine in light of new evidence/data, visualizing data, performing math on data, considering different types of data such as geospatial data (where trades happened in the classroom). And, this can serve as an anchoring point later down the line when we talk about different data types. We’re now already familiar with one column data, which is effectively a one dimensional list or one dimensional array. We are familiar with collections like a dictionaries, because each student had the round codename, and that codename corresponded to a real person’s name, but those weren’t in any particular order. So, when I would call that a codename, exactly one person would respond, and that’s indexing/subscripting a dictionary.

Finally, I brought it all home by drawing an abstract representation of our game on the board. I think it was two squares which represented agents, and triangles that moved between them which represented money. I pointed out that we could replace the entities in our system with other things, like making agents particles, and making money momentum. And if we made one rule change—allowing broke agents to still trade and potentially earn money back— then our toy game was an effective model for particle collisions in the real world. I stressed that that notion, the creating a game with changeable entities that mimics something in the real world, is where so much of the power lies in modeling. It *is* modeling. And I tried to stress to them they had now done everything that this course was about.

I told him I was excited to see them next week when we begin programming, and I let the class go at 4:50

### Action Items

- Tom/Seth and Brian will model going through Scratch and making predictions, observing the outcome, then reconciling.
- Give students individual time to do that themselves Have Tom call IT in class on Wednesday when students are working in Scratch
- Have the class define what they think a “distribution” is(?)
- The Jargon Buzzer
- When we “kick the tires” on Scratch, we should really encourage them to imagine they’ve got hardhats and clipboards. “Bang on this. Move that. Try shoving these things together. But be reflective!”
- Stem and leaf plot in Tokyo train stations

stem and leaf image By Eliazar - Own work, CC BY-SA 3.0, (https://commons.wikimedia.org/w/index.php?curid=8699465)

#cmse201 #journal #spring2017