Decision Mechanics

Insight. Applied.

  • Services
    • Decision analysis
    • Big data analysis
    • Software development
  • Articles
  • Blog
  • Privacy
  • Hire us

JavaScript for data science?

June 4, 2021 By editor

Arquero is a data manipulation library written in JavaScript. It’s modelled on the excellent R dyplr library.

JavaScript isn’t known as a data science language. However, it’s probably the best language for data visualisation—and Google’s relentless optimisation of the V8 engine means it has better performance that Python or R.

The JavaScript ecosystem lacks extensive data science libraries, but Arquero coupled with, say, D3.js makes for a capable data visualisation platform.


Photo by Anton Darius

Filed Under: Data analysis, Data science Tagged With: Arquero, javascript

Human brains hate probability

June 4, 2021 By editor

There was a great article published last month discussing risk communication.

Statistician Regina Nuzzo is quoted as saying

Human brains hate probability, they hate ambiguity, they hate the uncertainty. We’re just not wired to deal with this sort of thing very well.

Science journalist Tara Haelle explains that it’s difficult to separate reporting from influence. She notes that covering polls about willingness to take a vaccine set behavioural norms.

The more people question vaccines, the more people question vaccines. Vaccine hesitancy is contagious.

So, in summary, we find it difficult to think about probabilities, but are easily lead by opinion. This is why it’s increasingly essential for everyone to develop a degree of statistical literacy. With so much data flying around, and so many people commandeering it to promote their own view, we all need to be able to come to our own informed conclusions.


Photo by Naser Tamimi on Unsplash

Filed Under: Data science, Decision science Tagged With: probability, risk, risk communication, statistics

Decision fatigue

May 31, 2021 By editor

This Economist has an article this week on the dangers of decision fatigue.

Research suggests that people fall back into making "default" decisions when they are tired. Examples are cited from finance, law and medicine.

One thing that isn’t discussed is the obvious benefits of automated decision-making—computers don’t suffer from exhaustion. The more we can have computers advise decision-makers on routine decisions, the more humans can devote their limited energy to more complex cases.

The article notes that there may be value using software to monitor decisions and nudging people when the pattern of their decision-making changes. This is an interesting approach—have the computer critique the decision-making process rather than the decision itself.


Photo by Luis Villasmil on Unsplash

Filed Under: Artificial intelligence, Decision science Tagged With: decision fatigue

Statistical intuition

May 23, 2021 By editor

splash

The Monty Hall problem is a probability puzzle based on an old US game show. You are shown three doors. One contains a car, while the other two contains goats. The game show host invites you to pick a door. He then opens one of the doors containing a goat and asks, "Do you want to stick with your original selection or switch to the remaining door?"

What should you do…assuming that you don’t wish to own a goat?

I’ll take all the fun out of it. You should switch. It doubles your chances of getting the car.

Convinced? Probably not. Even when presented with the solution, many people struggle to accept it. It’s not particularly intuitive.

Martin Johnsson recently discussed this on his blog. He used paper simulation, computer modelling and mathematics to try and satisfy himself of the wisdom of switching. He concluded

…I’m not sure I have convinced myself of the solution to the generalised problem yet.

Reasoning about probabilities is hard. It’s very easy to be led astray by our "gut". As the eminent statistician Sir David Spiegelhalter has noted

…when asked a basic school question using probability, I have to […] try it a few different ways, and finally announce what I hope is the correct answer.

This dereliction of our instincts means that it’s essential to draw on the formal methods of statistics and Monte Carlo simulation when making important decisions.


Photo by Sergiu Vălenaș on Unsplash

Filed Under: Data science Tagged With: intuition, monty hall problem, probability, statistics

R now has native pipes

May 18, 2021 By editor

The latest release of R introduces an F#-style pipe operator.

Pipes have been available in R for a while, via the magrittr package. However, with the release of R 4.1.0, pipes are supported in base R.

The syntax has changed from that used in magrittr. The magrittr pipe operator is %>%. The new base R pipe operator is |>.

So, instead of

df %>% head()

we have

df |> head()

R 4.1.0 also introduces a lightweight, lambda-style function syntax, which can be usefully combined with the new pipe operator when piping to an argument other than the first one.

iris |> {\(x) lm(Sepal.Width ~ Sepal.Length, data = x)}()

Filed Under: Data analysis Tagged With: magrittr, pipe, R

  • « Previous Page
  • 1
  • …
  • 3
  • 4
  • 5
  • 6
  • 7
  • …
  • 59
  • Next Page »

Copyright © 2026 · Decision Mechanics Limited · info@decisionmechanics.com