Skip to content

Instantly share code, notes, and snippets.

@OrenBochman
Created January 27, 2024 12:33
Show Gist options
  • Save OrenBochman/a1b792159f0c8c0b9d16e7f04a2d8347 to your computer and use it in GitHub Desktop.
Save OrenBochman/a1b792159f0c8c0b9d16e7f04a2d8347 to your computer and use it in GitHub Desktop.
w05

Thinking Electrons: Modelling People

Thinking electrons: modelling people

| "Imagine how hard physics would be if electrons could think." | --- Murray Gell-Mann (1969 Nobel Laureate in Physics)

People are more complicated than electrons because they tend to consider their self interests before acting. This makes people more difficult to model. Humans are modelled according to three basic frameworks:

  1. rational actor models: These models state that people have goals and optimize their goals.
  2. behavioral models: These models are based on real data about choices and actions and made as close as possible to how real people behave.
  3. rule based models: These models assume that people follow rules without deeper motives. These models are the simplest.

Actual models may draw different aspects from each of the above frameworks.

Rational models assume that actors make descions by optimizing some objective function, called their utility that can be loosely viewed as their happiness levels.

==todo:add a people electron sketch here==

The Rational actor model’s main advantage is renders actors more uniform and predictable like electrons and less like people. By using it we are able to use utility to aggregate preferences of many actors in ways that fit well with what we observe in microeconomics.

However, this model is often criticized based on data and neuroscience. Humans in practice are not as rational as the model assumes, particularly when we observe many edge cases. Such as risk aversion as embodied in prospect theory; preferences of present gains over future gains as embodied in the saint Petersburg paradox; inconsistency in keeping track of large numbers of preferences; and issues involving consistency in framing often used in marketing , and so forth. While human Behavior is very complex, the rational actor model presents a suffintly accurate first approximation for modeling in game theory and economics.

Some of the behavioral approaches are listed below attempt to model a more realistic actor. In reality but they have mostly been ignored by economists. The is because of the success of the simpler model, because behavioral models are hard to implement and because in many senses behavioral model are rather incomplete and unsatisfactory in accounting for the psychology of how humans make decisions. For instance how emotions can make an impact.

In game theory there is a similar issue callled bounded rationality and that increasingly sophisticated definitions of rational actor are needed to ensure behavior that produces optimal outcomes under increasingly difficult circumstances encoded in different games. These are called solution concepts and what we see is that there are new types of pathological choices in these games that we expect an optimizing agent to avoid.

Rational Actor model

This is a view of individuals who will act to maximize payoffs and minimize losses. This is also called expected utility theory and is one of the basic assumptions in game theory and economics. The rational actor model has come under increasing criticism because they idealize human rationality in ways that real humans do not and cannot behave in practice. they are not good at predicting actual behavior, the assumption of rationality can be useful for constructing models. Rational actor models can be applied on decisions as well as games. Rational actor models work as follows. These models assume that people, or groups of people such as corporations, have an objective, and that they optimize their choices given that objective.

A firm might maximize profits and an individual might maximize utility. e.g., a firm wants to maximize revenue, and revenue = price * quantity and price is 50 - quantity then the firm will produce 25 and the revenue will be 625. Rationality doesn't have to be selfishness. People may have altruistic preferences. e.g., you want to maximize your utility from spending your income of 40k on consumption C and donations D, your objective you want to maximize is: $√C√D = √C√(40-C) = √(C(40-C))$. With C = 20 and D = 20 this goal is optimized.

Normal form game

With respect to rational actor models, there is a difference between a decision and a game. With a decision, the payoff with regard to achieving the objective depends only on one's own action. In a game, the payoff also depends on the actions of others. If your payoff depends on the actions of others then it may be a good idea to have a model of other people, and often a very good model of other people is that others are rational.

There are normal form games and extensive form games or game trees. The next example is a normal form game. Assume that there are two people, person 1 (options in black) and person 2 (options in green) that are going to decide about going to the city. Person 1 gets a payoff of 1 if he stays at home and 2 if he goes to the city. His payoff doesn't depend on what person 2 does.

Game tree

Person 2 is more complicated. If person 1 doesn't go to the city, she is better off staying at home because her payoff will be 1 if she stays at home and will be 0 if she goes to the city. But if person 1 goes to the city, her payoff will be 4 compared to 1 if she stays at home. What should person 2 do? Here the assumption of rationality is useful. If person 2 is aware of the payoffs of person 1, and assumes that he is rational, she can assume that he goes to the city, so she will go to the city too.

The following example is an extensive form game or game tree. Assume that there is a green person, who makes the first decision, and a blue person. If the green person chooses option 1, both will get a payoff of 0. If the green person chooses option 2, the blue person can choose between option 2.1 and option 2.2.

If the blue person chooses 2.1 he will get a payoff of 3 but the green person will get a payoff of -3. If the blue person chooses option 2.2, both will get a payoff of 2, which is the best choice for both. However, if the green person assumes that the blue person is rational, she will chose option 1, and both will get a payoff of 0.

We likely to see rational behavior in the following cases:

  • when the stakes are large so that people are more likely to take a lot of time evaluating the options and their benefits and drawbacks;
  • with repeated actions so that people can learn from experience;
  • group decisions because typically when more people are involved, decisions tend to be more rational;
  • easy problems because they can be solved with little effort.

The assumption of rationality has the following merits:

  • benchmark: it can be used as a benchmark to evaluate actual behavior;
  • unique: it results in a specific answer as there can be an unlimited ways of being irrational;
  • easiest to solve: you can often use mathematics to find the optional point;
  • people learn: by experience people become closer to rational;
  • mistakes often cancel out: if there is no bias in the mistakes, the average may be close to rational.

Behavioural models

Behavioral models are critical of the rational actor assumption based on evidence of actual behavior and neuroscience and psychology. Data from laboratories and the real world shows that people systematically deviate from the optimal choices. Evidence from neurology regarding how our brain is structured and the way we encode an represent information and how we think causes us to systematically deviate from what a rational actor model would suggest.

In @kahneman2011thinking Daniel Kahneman argues in his book that there are fast thought processes that are based on emotion and quick clues as well as slow thought processes that process information and are more rational. Fast thought processes make us biased in ways the rational actor model assumes that we are not. In @thaler2012nudge, Cass Sunstein and Richard Thaler argue that, because people make systematic mistakes, this has implications for policies.

There are four types of well documented biases that cause behavior to deviate from rational behavior:

  1. prospect theory describes the asymmetry in perception of gains and losses.
  2. hyperbolic discounting arises from valuing future benefits over present ones. A bird in the hand is better than three in the bush
  3. status quo bias is a tendency to stick with what we are currently doing and not make changes;
  4. base rate bias means that we are influenced by what we are currently thinking.

Prospect theory

Prospect theory chalanges the simplicity of expected utility theory that is at the basis of game theory and economics and posits that people tend to be risk averse over gains and risk loving over losses, which explains why people take gambles when they shouldn't. Kahneman came up with the following example.

Suppose you have two options. You can get $400 for sure or you get a 50% chance on winning $1,000 and a 50% chance on gaining $0. A lot of people would choose the $400 for sure. If the amounts get larger, people become more risk averse in gains. However, when there is a choice between a loss of $400 for sure or a 50% of a loss of $1,000 or a loss of $0, people are more willing to take the gamble. Both behaviors are not rational.

Hyperbolic discounting

Hyperbolic discounting means that we discount the near future more than we discount the future that is further away.

e.g., we tend to prefer $1000 now to $1005 tomorrow, but we tend to prefer $1005 over a year and a day to $1000 over a year. Immediate gratification matters a lot to humans. This has often what is called the chocolate cake implication. People want to be healthy, so if you are offered a chocolate cake a week from now, you are more likely to decline the offer, but if the chocolate cake is put in front of you, you are more likely to eat it. This is because fast thinking prevails.

Check box to contribute
Check box to contribute

status quo bias

The status quo bias means that people tend to keep things the way they are. e.g., if people have to check a box to contribute to the pension fund, most of them won't check the box, but if they have to check a box to not contribute to the pension fund, most of them still won't check the box. This probably is because checking the box seems to imply a change. In England people have to check a box to donate organs, and 25% checked. In the rest of Europe people have to check a box to not donate organs, and 10% checked.

Base rate bias

The base rate bias means that people are influenced by what they are currently thinking. e.g., when people are asked when a box is made, and how much it costs, the answers are often close to each other. e.g., you may think that the box may is made in 1950 (50), and then you probably estimate price close to that number, for instance 52. This is because you were already thinking of a number, so if you have to think of another number, this number probably is close to the first number.

  • There are lots of biases, and they are well documented. - There are also criticisms.
    • For instance, most of those biases are found in Western Educated Industrialised Rich Developed (WEIRD) countries. So the question is how many of them apply to other countries as well? Furthermore, people learn so that they may overcome their biases. Finally, it can be computationally difficult to account for all kinds of biases, so many models assume people are rational. One way to deal with this, is to use simple rules. A more sophisticated way is to start assuming that people are rational, and then look for the biases that are relevant, and include them in the model.

Types of rules

Rule based models

Rule based models assume that people simply follow some rules. e.g., the Schelling model presumes that people will move as soon as the percentage of similar people falls below a certain threshold. There are four types of rules based behaviors in two dimensions. There are fixed and adaptive rules in a decision context or a game context where the payoff depends on what other people do. In a game context a rule is often called a strategy.

  1. fixed decision rules. An example of a fixed decision rule is random choice. Random choice, like optimal choice, can be used as a benchmark. You can compare optimal choice and random choice and see how the model behaves under those assumptions to get more understanding about what might happen and what could happen. Another example of a fixed rule is taking the most direct route, which is the route closest to the right direction. This may not be the shortest or the fastest route, so this rule may not be optimal.

Tit for tat Moore Machine
Tit for tat Moore Machine

  1. fixed strategies. An example of a fixed strategy is divide evenly. e.g., if heirs divide an asset, they might decide to divide it evenly. Another fixed strategy is tit for tat. e.g., person A starts out acting nice to person B, and he continues to act nice as long as person B acts nice, but if person B acts mean, person A will act mean too. But if person B starts acting nice again, person A will act nice too.

Grim trigger Moore Machine
Grim trigger Moore Machine

Tit for tat can be encoded in a model called the Moore Machine. Assume that you start being nice as indicated by the yellow circle. You will only move to the mean state as indicated by the green circle if the other person acts mean as indicated by the green arrow. Once you are in the mean state, you can only go back to the nice state if the other person starts acting nice, as indicated by the yellow arrow. The star indicates that the initial state is being nice.

Grim trigger is another fixed strategy that can be encoded in a Moore Machine. The initial state is being nice, until the other person start acting mean, the state changes to mean, and it remain mean even when the other person starts acting nice again.

  1. adaptive decision rules. The gradient-based method is an adaptive rule that means that you keep trying things in directions that are working. e.g., suppose that you are baking cookies, and start adding one spoon full of honey, and it turns out that the cookies are very good. The next time you might try adding two spoons full of honey. If the cookies taste even better, you might add another spoon full of honey. You might go on until the cookies start to taste too sweet. Another adaptive rule is random behavior or changing what you are doing until you find something better. With regard to cookies, you might try adding raisins, chocolate or walnuts.

  2. adaptive strategies. Adaptive behavior makes the most sense in strategies because other persons might try to take advantage of me so that I will change may behavior to take this into account. One adaptive strategy is called best response. Assume that there is some strategic situation, and the other person is taking some action, you could act like a rational choice person, and give the best possible response. Another option is mimicry, which is copying the behavior of other people around you, or more specifically, people that are doing well. This option may be chosen if you do not understand the situation well enough, e.g. with stock market investing.

There are a few observations:

  • sometimes optimal rules are simple. e.g., your happiness might depend on chocolate and movies only, so that it is easy to maximize happiness by following a simple optimizing rule, so that following a simple rule is a good thing to do.
  • simple rules can often be exploited. e.g., in a bargaining situation you might start by accepting only if you get 60%, and if you fail you demand 1% less every round. If the other party is aware of this, it is possible that you will end up with nothing.

There are reasons to model people using rules:

  • they are simple and therefore easy to model and to compute;
  • it is possible to capture the main effects;
  • models are ad hoc because people are different and no model is able to explain everything;
  • rules can be exploited in a strategic situation, so if people follow rules, you can take advantage of that.

When does behavior matter?

An important question is does it matter which rules we write down? This depends on the situation. One reason we model is to figure out how much it matters how accurately we model. This can be demonstrated using two examples, which are a two sided market and a race to the bottom. In a two sided market it doesn't matter much how me model behavior, but in a race to the bottom it matters a lot.

The first example is a two sided market of buyers and sellers. Assume that buyers are willing to pay prices ranging from $0 to $100. Assume that sellers are willing to sell at prices ranging from $50 to $150. What would rational people do? Rational buyers would bid somewhat less than the price at which they will make zero profit and sellers ask a little bit more than the price at which they will make zero profit.

The relevant buyers and sellers are willing to make deals between $50 and $100. If the prices are evenly distributed, the price may end up being around $75, and those who are willing to buy for $75 or more and those who are willing to sell for $75 or less will make a deal. This happens when everyone is acting rationally.

Assume now that buyers and sellers are not so informed, and are biased to bid at rounded prices like $40, $60, $75 or $100. A rational buyer might bid $72, but a less sophisticated buyer might then go for $75. However, the outcome probably will not differ much, and the market price is likely to settle around $75.

Assume now that buyers and sellers and completely uninformed and show zero intelligent behaviour, which means that they pick some random price that is below their zero profit value for buyers and above their zero profit value for sellers. Even in this case the price ends up being close to $75.

In markets there is little difference between completely rational and informed behaviour and zero intelligent behaviour, so in models of markets behaviour is largely irrelevant. This is completely different in games, like for instance, a race to the bottom.

An example of a race to the bottom is that people pick a random number between 0 and 100, and that the person who is the closest to 2/3 of the mean, wins. Assume that everyone is rational and knows that all the others are rational too. The result is that they will come up with 0. This can be explained as follows. Suppose everybody picks 6, 2/3 of the mean is 4, so everyone should pick 4, but then the mean would be 8/3, so everyone should pick 8/3. This goes on until 0.

In many cases people are biased. And in this race to the bottom game, a significant number of people will start out with the number 50. How might a rule based model work in this case? Some may think that people should guess 50, so they will come up with the number 33. A lot of people guess 33. But some other people think that people should guess 33, so they will come up with 2/3 of 33, which is 22. In real world experiments, you often see 50, 33 and 22, and sometimes even 14, which is 2/3 of 22.

These rules are a mix of a bias and rational behaviour assumptions. If the game is repeated many times, the answers come closer to 0. This is because people go for the adaptive strategy of best responding after the previous results.

Assume now that you have two rational people in this game and one irrational person. The rational persons know nothing about the irrational person, only that he is new to the game. What is going to happen? The two rational person are going to pick some number R. Suppose that both the rational persons assume that the irational person is going to pick number X. Then: R = (2/3)(R + R + X)/3 => 5R = 2X => R = 2X/5. If the other person is expected to choose 50, then R = 20.

The lesson from these examples is that rational behaviour is a good benchmark, but that it is also important to include biases in a model. It is also important to consider simple rules. Then we have to consider how much the outcome of each model differs from the other models. If the differences are small, then the result might not depend much on behaviour. If the differences are big, then we may have to consider which class of model is the most appropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment