Decision Making

Temperature Anomaly – Warming Stripes

We have seen the spiral plot and ridgeline plot visualising the temperature anomaly (compared to the 1961-80 average). Today, we make another fancy plot – Warming Stripes – using R (again, courtesy: Ed Hawkins of the University of Reading). The data used here is the same as that we described in an earlier post.

c_data %>% ggplot(aes(x = Year, y = 1, fill = T_diff)) +
geom_tile()+
scale_y_continuous(expand = c(0, 0)) +
            scale_fill_gradientn(colors = rev(brewer.pal(11, "RdBu")))+
            guides(fill = guide_colorbar(barwidth = 1))+
            labs(title = "",
            caption = "")+
            theme_minimal() +
            theme(axis.text.y = element_blank(),
                       axis.line.y = element_blank(),
                       axis.title = element_blank(),
                       panel.grid.major = element_blank(),
                       legend.title = element_blank(),
                       axis.text.x = element_text(vjust = 3),
                       panel.grid.minor = element_blank(),
                       plot.title = element_text(size = 14, face = "bold"),
                       panel.background = element_rect(fill = "black"), 
                       plot.background = element_rect(fill = "black"),
                       axis.text = element_text(color = "white"),
                       legend.text = element_text(color = "white")
                       )

Temperature Anomaly – Warming Stripes Read More »

IESDS -The Cards Game

Amy and Becky are playing a game. Six cards – numbered 1 through 6 – are placed face down on the table. The cards are shuffled, and each one takes a card at random. The person with the higher number wins. Amy looks at her card and finds it is #2. Becky looks at hers and asks if Amy wants to trade her card. What should Amy’s response be? Note both players are rational.

If Becky had a 6, she wouldn’t ask for a trade, as #6 is guaranteed to win. If she had #5, the only card she benefits from is #6, something Amy would never trade. That eliminates #5 and #6 from the game. By extending the logic, 4 and 3 are also eliminated. That leaves #1 something Becky is happy to offer, but Amy will never accept.

So Amy’s answer to the call is a NO.

These types of games are known as the Iterated Elimination of Strictly Dominated Strategies (IESDS).

IESDS -The Cards Game Read More »

Temperature Anomaly – The Ridgeline plot

We have seen the temperature anomaly distribution visualised through a spiral plot. This time it’s another cool one – the ridge plot.

library(tidyverse)
library(ggridges)

c1_data <- c_data %>% group_by(Year) %>% mutate(T_av = mean(T_diff))

c1_data %>% filter(Year > 1950 & Year < 2022) %>% 
  ggplot(aes(x = T_diff, y = factor(Year, levels = seq(2021, 1950, -1)), fill = T_av )) +
  geom_density_ridges(bandwidth = 0.1, scale = 4, size = 0.1, color = "white") +
  scale_fill_gradient2(low = "darkblue", mid = "white", high = "darkred", midpoint = 0, guide = "none") +
  coord_cartesian(xlim = c(-1, 3)) +  
  scale_x_continuous(breaks = seq(-1, 2, 0.5)) +
  scale_y_discrete(breaks = seq(1950, 2020, 10)) + 
  labs(y = NULL, x = "Temperature Anomaly (\u00B0C)", title = "Temperature Anomaly Distribution") +
  theme(text = element_text(color = "white"), 
        panel.background = element_rect(fill = "black"), 
        plot.background = element_rect(fill = "black"),
        panel.grid = element_blank(),
        axis.text = element_text(color = "white"),
        axis.ticks = element_line(color = "white")) 

For the data and clean-up, see the earlier post.

Ridgeline plot in R with ggridges: Riffomonas Project

Temperature Anomaly – The Ridgeline plot Read More »

The Climate Spiral – The Spiral with Plotly

In the last post, we initiated the plotting of the abnormal temperature differences over the years (from the standardised values) thought to have been arising out of global warming. Today, we will build the famous spiral plot to visualise it.

First, we transform the data to polar coordinates.

c_data <- c_data %>% select(Year, all_of(month.abb)) %>% 
  pivot_longer(-Year, names_to = "Month", values_to = "T_diff") %>%
  mutate(Month = factor(Month, levels = month.abb)) %>%
  mutate(Month_no = as.numeric(Month), radius = T_diff + 1.5, theta = 2*pi*(Month_no-1)/12, x = radius * sin(theta), y = radius * cos(theta), z = Year)

The input (the original table) and the output (the transformed table) are presented below.

Plotly

Plotly is an open-source graphing library, which also has one for R (plotly).

plot_ly(c_data, x = ~x, y = ~y, z = ~z, type = 'scatter3d', mode = 'lines',
        opacity = 1, line = list(width = 6, color = ~T_diff, reverscale = FALSE))

The Climate Spiral – The Spiral with Plotly Read More »

The Climate Spiral

Let’s construct a visualisation of global temperature change – from 1880 – similar to what the British climate scientist Ed Hawkins did. The data used in the exercise has been downloaded from the GitHub channel of Riffomonas. He tabulated the deviation in the annual global mean from the data normalized between the temperatures 1951 – 1980.

The first step is to pivot the data into the following format:

c_data <- read.csv("./climate.csv")

c_data <- c_data %>% select(Year, all_of(month.abb)) %>% 
  pivot_longer(-Year, names_to = "Month", values_to = "T_diff") %>%
  mutate(Month = factor(Month, levels = month.abb)) %>%
  mutate(Month_no = as.numeric(Month))

Next, we plot the data we built.

c_data %>% ggplot(aes(x = Month_no, y = T_diff, group = Year, color = Year)) +
  geom_line() + 
  scale_x_continuous(breaks = 1:12, labels = month.abb) +
  scale_y_continuous(breaks = seq(-2, 2, 0.2)) +
  coord_cartesian()

Add a line to change to polar coordinates.

c_data %>% ggplot(aes(x = Month_no, y = T_diff, group = Year, color = Year)) +
  geom_line() + 
  scale_x_continuous(breaks = 1:12, labels = month.abb) +
  scale_y_continuous(breaks = seq(-2, 2, 0.2)) +
  coord_polar()

Climate data: Riffomonas

Riffomonas Project: Youtube

Climate spiral: Wiki

The Climate Spiral Read More »

Social Cost of Carbon – The Stern Review

The Stern Review has been one of the most influential economic reports on climate change. It is an independent review commissioned by the chancellor of the exchequer of the UK to assess climate change and its economics.

The report acknowledges the urgency required to control climate change. According to the report, the loss due to climate change is about 5% of GDP each year. He recommends carbon taxes, about 1% of the GDP, as the way to finance mitigation strategies.

Social Cost of Carbon – The Stern Review Read More »

Einstein’s 10% Brain

Make a guess: how much brain did Einstein use? Then, how much does an average human use? Here is a clue, Einstein used the same quantity as most of us use – 100%. But, many of us believe we don’t use all of it and can improve its utilisation through regular training.

As per a survey made by Dekker et al., 48% of teachers in the UK and 46% in the NL believed in this myth. Interestingly, people maintain this belief despite their knowledge that even a tiny brain injury can inflict significant impairment on human functions.

Myths such as these appeal to us because we know the human potential, like memory, may be enhanced and attribute providing some ‘intelligence’ is the only function of the brain. The brain does a lot more than this. And seats for all body functions – vision, hearing, smell, language, number, touch, motor functions, tear production, blinking, blood flow, coughing, and countless others – are placed all over it.

References

Neuromyths in education: Prevalence and predictors of misconceptions among teachers, Front. Psychol., 18 October 2012
10 Percent Brain Myth: Wired
Do People Only Use 10 Percent of Their Brains?: Scientific American

Einstein’s 10% Brain Read More »

Scope Neglect 

Scope neglect is a cognitive bias in which a person fails to comprehend the difference in the magnitude of numbers. A simple example is the difference between 1 billion and 1 trillion. Most people know a trillion is different, but it is difficult to imagine it is 1000 times bigger than a billion.

Scope neglect or insensitivity occurs because we are unable to visualise large numbers. When one can’t picture large numbers, they remain in abstract form, failing to create the expected level of emotional reaction.

In one study, the participants were asked what they would contribute to saving 2000, 20000 or 200,000 birds from drowning in oil-contaminated ponds. The answers were $80, $78 and $88, respectively!

Scope Neglect  Read More »

Car with No Rear View

Imagine you get a chance to buy a coffee shop. Here is what the owner tells you.
The current sales = $ 74,000 /yr
Shop rent = $30,000 /yr
Employee salary = $25,000 /yr
Coffee beans = $15,000 /yr
The cost of furniture and coffee machine = $45,000

How much are you willing to pay?

Market value

A simple valuation shows the shop can generate $4,000 a year (74,000 – 30,000 – 25,000 – 15,000) after paying for the rent, salaries and the purchase of the coffee beans. If you feel the shop will generate the same forever, you can do a simple (perpetuity) formula of 4000 / 0.1 = 40,000; 0.1 represents the discount rate of 10%. So you are willing to pay a maximum of $40,000.

The owner reminds you that she spent 45,000 just a few weeks ago to renovate. Will you change your mind? Sadly, it shouldn’t. The cost the owner sunk in the past can’t change the value it generates in the future. The buyer politely replies that she could get $500 more ($4,500) every year if she invested that 45,000 in the market at a 10% return. So what the owner spent (the book value) is immaterial to the buyer who calculated the market value.

Movie or football

Mat bought a ticket for a movie by paying $25. Just before he starts, he gets a phone call from John, who invites him to watch a football match. Mat likes football and John’s company, yet declines the invite because he has already spent the ticket price of the movie.

The money Mat spent is sunk, and what matters now is what gives him a good time (movie vs football with friends). But Mat falls for the sunk cost fallacy, the bad feeling for the loss on things that have already been spent against a better return in the future.

The concord of failures

The fallacy of sunk cost is common in big projects. Companies often hesitate to shut down projects midway when even they realise that it’s getting expensive and the product won’t make any economic benefit. They rationalise they invested too much to quit.

Social scientists hypothesise three reasons for this fallacy

  1. The loss aversion
  2. Desire not to appear wasteful
  3. To force one to do things that otherwise won’t happen

Psychology of decision making

The sunk cost fallacy is a powerful force that impacts decision-making. The issue with sunk costs is that they are the things of the past, but we pay too much attention to them. It’s the same feeling that keeps you attending the whole show of a terrible movie, eating everything ordered even when you are full, or continuing a nonfunctional relationship solely because the couple spent four years of their life together.

Reference

Sunk Costs: The Big Misconception About Most Investments: Sprouts

Car with No Rear View Read More »

Night Light and Myopia

A well-known case for confounding was the finding of night lighting casing myopia in young children.

In 1999 Quinn et al. published an article in the prestigious journal Nature that reported a strong association between exposure to nighttime light before the age of two years and myopia and created wide publicity in the media. As axial myopia is caused by excessive eyeball growth during childhood, the researchers rationalised that nighttime lighting in young children could stimulate the condition.

However, multiple studies that repeated the investigation found no association between the exposure (night light) and the outcome (myopia).

Myopic parents

It turned out that the fault was from those myopic parents of those infants who had the habit of keeping the lights on at night for better vision and created the confounder. As myopic parents tend to have myopic children, the association now looked easier to understand.

References

Myopia and ambient lighting at night: Quinn et al.
Continuous ambient lighting and eye growth in primates: Smith et al.
Myopia and night lighting in children in Singapore: Saw et al.

Night Light and Myopia Read More »