Reasonable People (DRAFT)

Exploring ways to understand group behavior

Duane Le & Costa Michailidis -

Why does the stock market go up... or down?

The news sometimes publishes headlines like Stock Market Rallys on Hopes of Vaccine! or Scandal Causes Candidate to Lose Ground in the Polls! The media outlets here are saying that the stock market prices changed because of positive vaccine news, or that a candidate is less liked because a scandal broke out about them.

Really? The stock market went up for this singular reason?

No joke? Everyone you polled cited the scandal as the reason for their response?

Of course not. Millions of people buy and sell stocks every day for a myriad of reasons. Our opinions about candidates are shaped on many factors, and likely vary from person to person.

What is really going on?

We decided to do a little research and write a little computer simulation to explore how group behavior might work.

Setting the Stage

Brian Arthur in his paper, Inductive Reasoning and Bounded Rationality, proposed a simple question that we adapted for our little project: Should I go to the bar tonight?

Our program will simulate individual people deciding whether or not to go the bar over many evenings and explore how many individuals' choices combine to form the behavior of the group.

For starters let's look at a few possible algorithms, ways to decide, whether one might go to the bar or not (the code here will be basic enough for most non-programers to follow, but feel free to skip over the code blocks).

The condition we're using for if one should go to the bar is how many people will be there. Less than 45 makes for a boring night, more than 60 is too crowded. In between 45 and 60 is a great time.

function wasItGoodLastWeek (barAttendanceHistory) {
  // Was last week good?
  if (45 < barAttendanceHistory < 60) {
    return true
  }
}

A simple way to decide if one should go to the bar is to just check how many people went last week, and assume this week is most likely to be the same is last.

On the other hand, there's always the contrarian.

function wasItGoodLastWeek (barAttendanceHistory) {
  // If last week was bad, this week will be great.
  if (45 < barAttendanceHistory < 60) {
    return false
  }
}

Then there's the traditionalists.

function wasItGoodBackInTheDay (barAttendanceHistory) {
  // Remember that awesome bar? I bet it's still great!
  var firstSeven = average( barAttendanceHistory.slice(0,7) )
  if (45 < firstSeven < 60) {
    return true
  }
}

And, the nerds.

DUANE, this needs your edit.

function whatsTheTrend (barAttendanceHistory) {
  // What's the linear regression of attendance?
  var bestFit = linearRegression(barAttendanceHistory)
  if (45 < bestFit < 60) {
    return true
  }
}

We tried out best to mimic how people actually decide these things.

Feed in 3 attendance numbers

Conclusion