ΨPsychology, Built

Act V · Thinking

Part 25 of 62

Deciding in Time

Graduatestarts at this level41 min of film16 chaptersprerequisites: none

Why does a decision take the time it takes?

In 1943 the Navy asks whether a firing test can stop as soon as the answer is clear, and Abraham Wald answers: add up the evidence until it crosses a line, which needs about half the shots of a fixed test and, as he and Wolfowitz prove, no fewer are possible. Hick's and Fitts's laws put a constant price on each bit; seventeen people told to be careful are all slower and more accurate; and response times are skewed, so the mean misleads. Ratcliff's diffusion model gives accuracy and mean time in closed form and whole distributions by series, and its parameters mostly mean what they claim: speed instructions lower the bound in sixteen of seventeen people, though not only the bound. Variability explains fast and slow errors; neurons in LIP climb to a level, though single neurons may step; and races, stopping and confidence read the same accumulator three ways.

What you need. Part 1's ex-Gaussian and Hick's law, Part 12's signal detection and meta-d', and Part 17's dopamine. Random walks, the normal distribution, logarithms and maximum likelihood.

Hook
a walk to a boundary
Ideas, models and mathematics
Hick and Fitts, the speed–accuracy trade-off, random walks, the drift–diffusion model, optimality (the SPRT), accumulators in the brain, the stop signal, confidence
Psyche gains
a diffusion decision maker
On you
moving dots, fast and then careful

What you will be able to do

Psych 101 and the major

  • Describe Hick's and Fitts's laws and the speed-accuracy trade-off.
  • Explain why mean response times mislead, and what a response-time distribution looks like.
  • Describe accumulation in LIP and the stop-signal task.

Graduate

  • Run Wald's test and compute its average sample number against a fixed test.
  • Fit the diffusion model to speed and accuracy blocks, and compare models by AIC.
  • Estimate a stop-signal reaction time by the integration method.

Research

  • Derive the diffusion model's accuracy and mean decision time.
  • Derive Fitts's law from iterative corrections, and explain fast and slow errors by variability.

Practice

  • Price an interface's targets and menus with Fitts and Hick.
  • Decide whether a slower group is less able or more careful.

Contents

Each chapter has a home level. Choose a track to see what to read and watch: Psych 101 and the major 22 min · Graduate 25 min · Research 41 min · Practice 25 min.

  1. 0Moving dotsPsych 101 and the major3 min
  2. 1Two old lawsPsych 101 and the major2 min
  3. 2The speed-accuracy trade-offPsych 101 and the major2 min
  4. 3The shape of a response timePsych 101 and the major2 min
  5. 4Wald's testResearch3 min
  6. 5The diffusion modelResearch3 min
  7. 6Each parameter, a claimResearch4 min
  8. 7Fast errors and slow errorsResearch2 min
  9. 8Accumulators in the brainPsych 101 and the major3 min
  10. 9Relatives: races, leaks and urgencyResearch3 min
  11. 10StoppingPsych 101 and the major2 min
  12. 11ConfidencePsych 101 and the major2 min
  13. 12The LedgerPsych 101 and the major3 min
  14. 13In practice: menus, brakes and clinicsPractice2 min
  15. 14Frontier: values, attention and traitsResearch2 min
  16. Recap, problems, and the road aheadAll tracks4 min

Also on this page: Lecture · Key results · Try it · Lab · Problems · Notes and sources · Build the film.

Lecture

The text of each chapter is the film's narration, as it is spoken, so you can read along or revise without the film. The pictures are in the film. A dashed box stands for a number the film computes when it is rendered (hover over it to see what is computed); the README's figures for each chapter, where it lists them, follow the chapter's text.

Moving dotsPsych 101 and the major3 min

Let's start on you. In a moment a cloud of dots will appear. Most move at random, but a few drift together, left or right. Decide which way, and say it out loud when you're sure.

Right. They were drifting to the right. Now again, but this time as fast as you can: say the direction the moment you have any idea at all.

Left, this time. The first time, you probably waited, and you were probably right. The second time you answered sooner and felt less sure, and with dots this faint you'd often have been wrong. You traded accuracy for time, and you chose the rate of exchange.

What you just did has a history in three steps. In 1943 the US Navy asked a statistics group at Columbia University whether a firing test of ammunition could be stopped early, once the answer was clear. Milton Friedman and W. Allen Wallis couldn't settle it, and took it to Abraham Wald. He worked out how: add up the evidence, shot by shot, until it crosses a line. Five years later he and Jacob Wolfowitz proved that no test with the same error rates stops sooner on average. In 1978 Roger Ratcliff proposed that a person deciding in half a second does the same, and showed that the proposal accounts for accuracy, speed, and the whole shape of the distribution of response times at once. And around the turn of the century Michael Shadlen, William Newsome and Jamie Roitman recorded neurons in a monkey's parietal cortex that climb toward a level while the monkey watches moving dots, and the monkey answers when they reach it.

So why does a decision take the time it takes? We'll start with two old laws of response time, and the trade between speed and accuracy that every model has to produce. Then what a distribution of response times looks like, and why its mean misleads. Then Wald's test, and the diffusion model it became, fitted to the open data of seventeen people and then of three. Then fast errors and slow errors, and accumulators in the brain. And finally races, stopping, and the feeling of being sure.

This is Part 25 of Psychology, Built, the eighth part of Act Five, on thinking: deciding in time. We'll draw the old laws of choice time and the trade between speed and accuracy. We'll run Wald's test and see why nothing beats it. We'll derive the diffusion model's predictions, compute its distributions, and test, on seventeen people's open data, whether its parameters mean what they claim. We'll look at accumulators in the brain and the dispute over whether they ramp or step, and finish with the race to stop and the balance of evidence we call confidence.

What it does: The dots on you, slow and fast; Wald, Ratcliff and LIP; the questions; objectives

1Two old lawsPsych 101 and the major2 min

The first law is from 1952. William Hick put ten lamps in front of people, each with a key beneath it, and asked them to press the key under whichever lamp lit. The more lamps in play, the longer they took, and the time grew not with the number of lamps but with its logarithm: every doubling added about the same amount. A year later Ray Hyman showed that it's the information that matters, not the count. Make some lamps light more often than others, and the time follows the bits of information in each choice. Why a logarithm? Here is one answer Psyche can compute. Let a separate accumulator gather evidence for each lamp, in a race, and demand ninety percent accuracy. With more rivals, one of them is more likely to reach the line by chance, so the line must be raised, and the time grows almost exactly with the log of the number of alternatives. A constant cost per bit: the first sign that deciding is accumulating.

The second law is about moving. In 1954 Paul Fitts had people tap back and forth between two metal plates as fast as they could. The time per movement grew with the logarithm of twice the distance over the width of the target. Double the distance, or halve the width, and you add the same time. Why a logarithm again? In 1963 Crossman and Goodeve suggested that an aimed movement is a series of corrections. Each one covers most of the remaining distance, leaving a fixed share of it, so after k corrections what's left is D times r to the k. You stop when that's inside half the target, and solving for k gives the logarithm of two D over W. Count the corrections and you get a staircase. Real movements blend their corrections and vary from one to the next, and the staircase smooths into Fitts's straight line, which still guides the design of every screen you touch.

What it does: Hick's law and a race that recovers it; Fitts's law derived from corrections

2The speed-accuracy trade-offPsych 101 and the major2 min

In the moving dots you traded accuracy for time. Here is the same trade in open data. In 2008 Eric-Jan Wagenmakers, Roger Ratcliff, Pablo Gomez and Gail McKoon asked people whether strings of letters were words, in blocks that told them either to be fast or to be accurate. Here are seventeen of them, each a pair of dots joined by a line. Every one was slower when asked to be accurate, and of the were right more often. The median person paid about milliseconds for points of accuracy. Same people, same words. Nothing about the task changed except what they were asked to care about, so the trade is something a person chooses.

Now one mind, many settings. This is the curve Psyche's decision maker traces, from the model of chapter five, as it moves a single dial, how much evidence it asks for, from low to high. The evidence itself doesn't change. Every point on the curve is the same mind, differing only in caution. Which is why Robert Pachella and Wayne Wickelgren warned in the 1970s against comparing people, or groups, or drugs, by mean response time alone. Put Ann here and Bob here, and Bob looks slow, though he's no worse at the task; he's simply more careful. Any model of choice has to produce accuracy and time together, from one set of parameters, or it isn't a model of choice.

What it does: 17 people's two operating points; one model's whole curve; why mean times mislead comparisons

3The shape of a response timePsych 101 and the major2 min

Before modelling a choice, look at what a response time is. Here's one person from those seventeen, the median one by mean time, and the times they answered correctly when asked to be accurate. A steep rise, a peak, and a long tail to the right. Nearly every response-time distribution ever recorded has this shape. Part 1's ex-Gaussian fits it well: a normal stage plus an exponential one, with most of the spread in the exponential tail. And the tail drags the mean well past the median. That's why modern models aren't fitted to mean times at all, but to the whole distribution, summarized by a few quantiles, for correct answers and errors separately.

Here's why the mean misleads. These two distributions have exactly the same mean. In the blue one every response is a little slow, as if a stage took longer. In the pink one most responses are fast and a few are very slow, as if the person occasionally drifted off, or a few decisions were much harder. A difference in mean response time can't tell these apart. The shapes can. Roger Ratcliff showed in 1979 how to average people without destroying the shape: average their quantiles, not their raw times. Every fit in this part keeps the shape.

What it does: One person's distribution and an ex-Gaussian fit; same mean, different shapes; quantiles

4Wald's testResearch3 min

Here is Wald's idea, worked on a simple case. A new shell either hits seventy percent of the time, or only fifty, and we'll accept a five percent chance of each kind of mistake. After every shot, add the log of how much more likely that shot was under one hypothesis than the other. A hit adds a third; a miss takes away about a half. And set two lines. Wald showed that stopping where the ratio first reaches nineteen to one, either way, keeps both error rates near five percent. In logs, plus and minus two point nine four. Here's a run with a seventy percent shell, the median of a hundred and one. The sum wanders, drifts upward, and leaves the band at shot . Decision: the better shell.

What does stopping early buy? To get the same error rates from a test whose length is fixed in advance, you need shots, every time. Wald's test needs about on average when the shell is the poor one, and about when it's the good one: less than half. The dots are twenty thousand simulated tests each. They run a few shots above Wald's formula, which ignores how far the sum overshoots the line on its last step. There's a price. The hardest shells, in between the two hypotheses, take longest, and any single test can run long. And in 1948 Wald and Jacob Wolfowitz proved that no test with these error rates needs fewer shots on average, under either hypothesis. The military kept the method secret until the war was over.

Psychologists soon wondered whether minds work this way. Mervyn Stone in 1960 and Donald Laming in 1968 proposed that a person choosing between two answers adds up samples of evidence until the total reaches a bound. In a brain, evidence doesn't arrive in shots. Make the steps smaller and more frequent, and the random walk becomes a diffusion: a steady drift, the quality of the evidence, plus noise. Wald's two lines become the person's caution. That's the diffusion model, proposed by Roger Ratcliff in 1978, and the subject of the next chapter.

What it does: The SPRT derived and run; half the shots of a fixed test; from shells to seeing

5The diffusion modelResearch3 min

The diffusion model has four main numbers. Evidence starts at a point z, between two bounds. Every instant it moves a little in the direction the stimulus favours, at a rate v, the drift, and is jostled by noise. Here are twelve trials. The first bound a path touches is the answer, and when it touches is the decision time. The distance between the bounds, a, is how much evidence the person demands: their caution. A response also takes time that isn't deciding: seeing the letters, and moving the finger. That's t zero. Now stack up where thousands of paths end. Above the top bound, the distribution of correct response times, and below the bottom one, the errors. Both skewed, like the real ones.

Two of the model's predictions have exact formulas, and they're worth deriving. Let P of x be the chance of reaching the top bound first, starting from x. In a tiny step the evidence moves by the drift plus a bit of noise, as likely up as down, and P at x must equal the average of P over where that step could land. Expand that average, and you get this equation, with P zero at the bottom and one at the top. Its solution is an exponential, and it gives the probability of the upper answer. It's the gambler's ruin, made continuous. With no drift at all it's simply z over a. For the mean time, Wald found an identity: on average, where the evidence ends equals where it started plus the drift times the time it took. Where it ends is a or zero, with known chances, so the mean decision time follows. Psyche checks both against forty thousand simulated trials. The probabilities agree to three places; the simulated time runs a hundredth of a second long, because steps of half a millisecond overshoot the bound a little.

The whole distributions have no simple formula, but they can be computed exactly. Daniel Navarro and Ian Fuss gave the density of the first passage as two infinite series, one that converges fast for short times and one for long times, so a handful of terms will do. Psyche's curves land on the simulated trials. Notice something odd. The error distribution is just the correct one, scaled down. With the start halfway between the bounds, errors and correct answers take exactly the same time on average. Real errors are often faster than correct answers, or slower. That's the puzzle of chapter seven. First, fit the model to people.

What it does: Four numbers; P(upper) and the mean time derived; the densities computed

6Each parameter, a claimResearch4 min

A model with four numbers makes four claims. The drift is the quality of the evidence, so harder stimuli should lower it. The bound is caution, so asking people to be accurate should widen it. The start is bias, so making one answer likelier, or better paid, should move the start toward it. And t zero is seeing and moving, so a harder movement should lengthen it. The test, called selective influence, is that each manipulation moves its own parameter and leaves the others alone. In 2004 Andreas Voss, Klaus Rothermund and Jochen Voss ran all four manipulations in one experiment, and mostly found exactly that.

Back to the seventeen people told to be fast or accurate. Psyche fits the model to each person's speed blocks and accuracy blocks, letting everything differ. Each dot is a person, with the two bounds as coordinates. All but one fall below the diagonal: when told to be fast, people lowered their bound, to about percent of its careful width. Then Psyche compares four versions of the model, by how well they fit for the parameters they use. One where only the bound differs between the blocks beats one where only the drift does, for all people. But it isn't the whole story. The best fits also let the non-decision time change, for people, or the non-decision time and the drift, for . Told to hurry, people also press faster, and some take in a little less.

A sterner test uses Ratcliff and Rouder's data from 1998. Three observers judged whether patches of pixels came from a light or a dark source, at thirty-three levels of brightness, again in fast and careful blocks, about eight thousand trials each. Top: how often they said light. Bottom: how long they took. Psyche fits each observer with one drift for each level of brightness, the same in both kinds of block, and a bound, a start and a non-decision time for each kind: fourteen numbers for four curves. They fit closely. In careful blocks, times peak at the hardest, most ambiguous patches and fall away on either side, and the model draws that arch from the drifts alone. Every observer's careful bound is between one and a half and two and a half times the fast one. Where it misses is telling: in fast blocks the model expects a small arch that people barely show. Something more than four numbers is at work, as the next chapter shows.

So the parameters mostly mean what they claim, but not purely. In 2014 Benjamin Rae and colleagues found that speed instructions lower the drift as well as the bound: people in a hurry take in less. And in 2019 Gilles Dutilh organized a blind test. Seventeen teams of modellers received fourteen datasets, each with a hidden manipulation, and had to say what had changed. Most of the time they named the right parameter, though their choice of method mattered, and simple methods did about as well as elaborate ones. The parameters are claims about the mind, and claims can be tested. These pass often, not always.

What it does: Selective influence; 17 people fitted under four models; three observers at 33 brightnesses; exceptions

7Fast errors and slow errorsResearch2 min

Chapter five ended with a puzzle. With the start halfway between the bounds, the model gives errors and correct answers exactly the same time. Here is the difference, error minus correct, for each of the seventeen people, in each kind of block. Told to be fast, of them made their errors faster than their correct answers. Told to be accurate, made them slower. Same people, same words, and the pattern flips with the instruction. Four numbers can't do that.

The answer is that trials aren't all alike. In 1978 Ratcliff already let the drift vary from trial to trial, because attention wanders and some items are harder than others. Errors then come mostly from the weak trials, which wander for a long time before going wrong, so errors are slow. Twenty years later Ratcliff and Jeffrey Rouder let the starting point vary as well. Now some trials begin near the wrong bound and slip across it quickly, so errors are fast. Psyche's simulations show both: equal times with no variability, slow errors when the drift varies, fast errors when the start does. And the instruction decides which shows. A low bound, under speed, makes a starting offset matter a great deal: fast errors. A wide bound, under accuracy, washes out the start and leaves the weak trials: slow errors. With variability in drift, start and non-decision time, the model has seven numbers. That's the standard full diffusion model, and it fits both patterns at once.

What it does: The data's flip with the instruction; variability in drift and in start

8Accumulators in the brainPsych 101 and the major3 min

Can you watch a decision form? From the late 1980s William Newsome and his colleagues trained monkeys on the task you did at the start: a cloud of dots, some drifting one way, and the answer given with the eyes, by looking at one of two targets. Michael Shadlen and Newsome recorded neurons in a region of parietal cortex called LIP, each of which responds when the eyes are about to move to one place. During the dots, such a neuron fires more and more when the evidence favours its target. In 2002 Jamie Roitman and Shadlen showed that the rise is steeper when the motion is stronger, and that the monkey answers when the firing reaches about the same level, whatever the motion was. A drift, and a bound, in a neuron.

Here is what that looks like, using Psyche's accumulators in place of neurons. Psyche averages its trials the way Roitman and Shadlen averaged their neurons: only trials that chose this neuron's side, and only up to the moment of the answer. Lined up on the start of the motion, the averages rise faster the stronger the drift. Lined up on the answer instead, they all converge on the same level just before it. The neurons' averages look remarkably like this. But an average can hide what single trials do.

Is each single neuron really ramping? In 2015 Kenneth Latimer, Jonathan Pillow, Alexander Huk and colleagues fitted models to single trials, and found that about three quarters of the LIP neurons were better described as jumping, once, from low to high firing at a random moment, than as ramping. Psyche shows why the averages couldn't tell: steps at random times average to a smooth ramp. Shadlen and colleagues replied that the data didn't show one-time steps, and the dispute went on for years. In 2024 Natalie Steinemann, Shadlen and colleagues recorded up to two hundred and three LIP neurons at once. A weighted sum of their activity, read out on single trials, drifted and diffused toward a bound, much as the model says. Single neurons may step; the population seems to accumulate. The Ledger keeps the single-neuron question open.

What it does: LIP and the moving dots; averages aligned two ways; ramp or step

9Relatives: races, leaks and urgencyResearch3 min

Diffusion isn't the only way to accumulate. In 2008 Scott Brown and Andrew Heathcote stripped the idea to its bones. Give each answer its own accumulator and let them race, with no noise within a trial at all. Each accumulator starts at a random height below A and rises in a straight line, at a rate drawn afresh on every trial. The first to reach the threshold b gives the answer. Because the lines are straight, the densities have a closed form, and Psyche's curves match its simulation. This linear ballistic accumulator fits most data about as well as diffusion does, and it extends to any number of answers. The variability between trials, not the noise within them, does the work.

Brains, though, are noisy, and neurons forget. In 2001 Marius Usher and Jay McClelland proposed accumulators that leak, as neurons do, and that inhibit each other. The leak lets old evidence fade. The inhibition turns the race into a contest: as one rises, it pushes the other down. In 2006 Rafal Bogacz and colleagues showed what ties these models together. When leak and inhibition balance, the difference between the two accumulators behaves exactly like a diffusion. The diffusion model may be what such a circuit computes. And with many accumulators, the bound that keeps accuracy fixed has to rise with the number of rivals, which is where chapter one's logarithm came from.

One more relative changes the bound itself. Paul Cisek and colleagues argued in 2009 that an urgency signal grows as a trial goes on, so that less and less evidence is needed: a bound that falls with time. Jan Drugowitsch and colleagues showed in 2012 that a falling bound is actually the best policy when time costs something, or when hard and easy trials are mixed and a slow trial is probably a hopeless one. A collapsing bound trims the slow tail of the distribution and makes it less skewed, at some cost in accuracy. But do people do it? In 2015 Guy Hawkins and colleagues compared fixed and collapsing bounds on data from humans and monkeys in three kinds of task. The data mostly favoured fixed bounds, with exceptions in monkeys trained for a long time. Urgency is optimal under some conditions, and those are not the ones most experiments create.

What it does: The linear ballistic accumulator; leaky competing accumulators; collapsing bounds

10StoppingPsych 101 and the major2 min

Some decisions are to not act. In the stop-signal task you respond as fast as you can to a go signal, but on a few trials a second signal follows after a short delay, telling you to stop. In 1984 Gordon Logan and William Cowan modelled this as a race between two independent processes. The grey and red bars are the go times: how long the response would take if nothing opposed it. The stop process starts at the stop signal and takes a time of its own, the stop-signal reaction time. Any go process that finishes before the stop process does escapes, and the person responds: the red area. You can never observe a stop time directly, because a successful stop leaves no response to time. But the race lets you solve for it. The share of stop trials with a response, here about , picks out a point on the go distribution, and subtracting the delay gives the stop time.

Vary the delay and you get the whole picture. The later the stop signal comes, the less time the stop process has, and the more often the response escapes: the inhibition function. At every delay where between ten and ninety percent escape, the integration method recovers the stop time Psyche was given, milliseconds, to within a few milliseconds. In healthy adults stop times are typically around two hundred to two hundred and fifty milliseconds, and they're used to study impulse control, attention deficit disorder, addiction and the effects of drugs. Two cautions. In 2019 Frederick Verbruggen and colleagues from many laboratories published a consensus guide to running and analysing the task, because small choices change the answer. And in 2021 Patrick Bissett, Gordon Logan and colleagues showed that the race's central assumption, independence, is badly violated at short delays, so estimates that lean on them are biased.

What it does: The stop-signal race derived; the inhibition function; the stop time recovered; independence

11ConfidencePsych 101 and the major2 min

You felt more sure about the first cloud of dots than the second. Where does that feeling come from? In a race, Douglas Vickers suggested in 1979, the answer is in the loser. When one accumulator reaches its bound, how far behind the other is tells you how close the race was. That gap, the balance of evidence, is confidence. In 2009 Roozbeh Kiani and Michael Shadlen gave monkeys a third option: a small reward that was certain. The monkeys took it most when the evidence was weak, as if they knew when they were unsure, and the same LIP neurons carried that confidence in their firing. And Timothy Pleskac and Jerome Busemeyer argued in 2010 that evidence keeps arriving after the answer is given. Confidence reads it, which is why people sometimes change their minds a moment after choosing.

The balance of evidence makes a distinctive prediction. Run Psyche's race at many strengths of evidence and average its confidence. On correct answers, confidence rises with the strength of the evidence. On errors it falls. An error on an easy trial is a fluke: the loser was nearly at the bound too, and it feels like a fluke. In 2016 Joshua Sanders, Balázs Hangya and Adam Kepecs found the same folded X in people's confidence. Part 12 measured how well confidence tracks accuracy, with meta d prime. Here is a mechanism that could produce it.

What it does: The balance of evidence; Kiani and Shadlen; the folded X

12The LedgerPsych 101 and the major3 min

Five rows today; Hick's law already has its row, from Part 1. The first: the time of an aimed movement grows with the logarithm of twice the distance over the width. The original: Fitts, 1954, with the tapping plates. The record: Fitts and Peterson's single movements in 1964, and decades of pointing studies with hands, feet, mice and fingers, summarized by Scott MacKenzie and colleagues. One of the most reliable laws in psychology, and an international standard for testing pointing devices. Replicated.

The second: instructions to be fast or accurate act on the diffusion model's bound. The original: Ratcliff and Rouder, 1998. The record: Voss and colleagues' four manipulations in 2004, Wagenmakers and colleagues' seventeen people in 2008, refitted in this part, and Rae and colleagues in 2014, who found the drift moving too. The bound moves every time; it isn't the only thing that moves. Replicated.

The third: errors are faster than correct answers when speed is stressed, and slower when accuracy is. The original: Ratcliff and Rouder, 1998. The record: the seventeen people refitted in this part, thirteen with fast errors under speed and fourteen with slow errors under accuracy, and Ratcliff and McKoon's review of two-choice tasks in 2008. A regular pattern that four numbers can't produce, and the full model can. Replicated.

The fourth: single neurons in LIP accumulate evidence, ramping to a bound. The original: Roitman and Shadlen, 2002. The record: Latimer and colleagues' steps in 2015, Shadlen and colleagues' reply in 2016, and Steinemann and colleagues' population recordings in 2024. The population looks like diffusion; whether single neurons ramp or step is unsettled. Contested.

And the fifth: stopping is a race between independent go and stop processes, from which the stop time can be read. The original: Logan and Cowan, 1984. The record: Verbruggen and colleagues' consensus guide in 2019, and Bissett and colleagues in 2021, who found independence badly violated at short delays. The race predicts the inhibition function well; its central assumption fails where the delays are short. Contested.

The tally. Three rows replicated: the old laws of choice and movement time hold, seventy years on. The diffusion model's parameters mostly mean what they claim, and where they don't, the exceptions have been measured. What's contested lies where models meet neurons, and where assumptions meet data: whether single neurons ramp or step, and whether going and stopping really race independently.

What it does: Fitts's law; speed and the bound; fast and slow errors; LIP ramping; the stop-signal race

13In practice: menus, brakes and clinicsPractice2 min

These laws earn their living in design. On a screen, Fitts's law prices every target. Make a button four times wider and you save about two bits, a few hundred milliseconds at a typical slope, on every press. An edge or corner of the screen can't be overshot, so its effective width is infinite, which is why menus and close buttons live there. Hick and Hyman price the choice itself: one broad menu often beats a deep tree of small ones, and frequent choices should cost the fewest bits. An international standard tests mice, trackpads and touchscreens by Fitts's law. Designing for minds is Part 52.

On the road, decision time is distance. Marc Green reviewed studies of how long drivers take to start braking. About three quarters of a second when they expect the event, about one and a quarter when it's unexpected, and about one and a half for a true surprise. At a hundred kilometres an hour, each second is almost twenty-eight metres, travelled before the brakes do anything at all. Road engineers assume two and a half seconds when they set how far ahead a driver must be able to see. That's a design for the slow tail of the distribution, not its mean, which is exactly the lesson of chapter three.

And in the clinic, the diffusion model turns slower into a question with three answers. Older adults respond more slowly, and from 2001 onward Roger Ratcliff, Anjali Thapar and Gail McKoon found that in many tasks it's mainly because they set wider bounds and take longer to see and move. The quality of their evidence is often about the same as the young. They're more careful, not worse. The same question is asked of groups with attention deficit disorder, anxiety or depression: is the difference in the evidence, the caution, or the motor stage? And of treatments. A drug that makes people faster by lowering their caution isn't one that sharpens their evidence, so the drift is a better outcome measure than the mean time.

What it does: Fitts and Hick at the interface; braking distances; slower or more careful

14Frontier: values, attention and traitsResearch2 min

The model was built for dots and letters. Does it reach any further? In 2010 Ian Krajbich, Carrie Armel and Antonio Rangel asked hungry people to choose between pairs of snacks while a camera tracked their eyes. Their model is a diffusion whose drift depends on where you're looking: evidence builds for the item you're looking at, and the other one counts only partly. Here's one trial: green while looking left, red while looking right. Psyche runs the model with two snacks of equal value. Look longer at one, and you're far more likely to choose it, and the last item looked at wins of the time, just as the people's choices did. Attention doesn't just follow preference; it shapes it. Judgement and choice are the subject of the next part.

The last frontier is you. Is your drift, or your caution, a trait, like your height? To use these numbers to compare people rather than conditions, they have to be stable within a person. Psyche tests a hundred simulated people twice. With twenty trials a session, their fitted drifts correlate only from one session to the next. With five hundred, . Precision costs trials. And Craig Hedge, Gareth Powell and Petroc Sumner showed in 2018 a paradox: the tasks whose effects replicate best across people are often the worst at telling people apart, because everyone shows the effect to a similar degree. Veronika Lerche and Andreas Voss found diffusion parameters moderately stable over a week, given enough trials. Measuring individual differences is Part 59.

What it does: Gaze and value in the attentional diffusion model; reliability of decision parameters

Recap, problems, and the road aheadAll tracks4 min

Part twenty-five in ten lines. With the moving dots, you chose your own rate of exchange between speed and accuracy. Hick's and Fitts's laws put a constant price on each bit, for choosing and for moving. Seventeen people were all slower, and nearly all more accurate, when told to be careful. Response times are skewed, so the mean misleads and the quantiles don't. Wald's test adds up evidence to a line, and needs about half the shots of a fixed test. The diffusion model has four main numbers, and gives accuracy and mean time in closed form. Telling people to hurry lowered the bound for sixteen of seventeen, though not only the bound. Fast and slow errors come from variability in where a trial starts and how strong its evidence is. In LIP, a population diffuses, while single neurons may step. And races, stopping and confidence are the same accumulator, read three ways.

Kant's wager. The first objection, that mathematics can't apply to the mind, met Wald's test and the diffusion model, derived, computed and fitted to two sets of open data. The second, that the mind can't be experimented on, met an experiment that changes only an instruction and finds a single parameter, caution, moving in sixteen of seventeen people. And the third, that looking inward disturbs what you look at, met a part that never asked anyone to look inward: choices and times, and neurons recorded while a decision forms.

Where this comes back. Choices between values, risks and frames are the next part. Whether the brain's readiness to move is just an accumulator is Part 27, on consciousness. Fitting these models properly is Part 48. Fitts and Hick at the interface are Part 52. Whether decision parameters are traits is Part 59. And when a machine should stop thinking is Part 60.

Seven problems, with full solutions in this part's README. Two derive the diffusion model's limits and its mean time with an unbiased start. One finds the shortest possible run of Wald's test. One counts corrections in an aimed movement. One connects two ways of estimating the stop time. One fits EZ diffusion to the seventeen people's open data. And the last, with the star, asks you to design an experiment that tells a collapsing bound from variable evidence. Pause here if you'd like to try them.

The books and papers behind this part are listed here and in the README. Duncan Luce's Response Times is still the deepest single book on the subject, and Forstmann, Ratcliff and Wagenmakers's review is the best short way into sequential sampling models today.

Today the mind decided against the clock. Next time, it chooses between values. In 1981 Amos Tversky and Daniel Kahneman described a disease expected to kill six hundred people, and two programmes to fight it. Described in lives saved, most people chose the safe programme. Described in lives lost, most chose the gamble, though the outcomes were identical. Why? It's Part 26: judgment and choice.

Where it goes next. Judgement and choice is Part 26, the readiness potential Part 27, model fitting Part 48, interface design Part 52, individual differences Part 59, and machines that decide when to stop Part 60.

Key results

The part's results in one place, for revision.

Wald's bounds\(\displaystyle A = \log\frac{1-\beta}{\alpha}, \quad\allowbreak B = \log\frac{\beta}{1-\alpha}\)
Hick's law\(\displaystyle \text{RT} = a + b \log_2 n\)
Fitts's law\(\displaystyle MT = a + b \log_2 \frac{2D}{W}\)
Accuracy\(\displaystyle P(\text{upper}) = \frac{1 - e^{-2vz/s^2}}{1 - e^{-2va/s^2}}\)
Mean decision time\(\displaystyle \mathbb{E}[T] = \frac{a\,P(\text{upper}) - z}{v}\)
Stop-signal race\(\displaystyle \text{SSRT} = F_{\text{go}}^{-1}\big(P(\text{respond})\big) - \text{SSD}\)

Try it

Lab 25 · Deciding in time

Run Wald's test and count the shots it saves; check the diffusion model's formulas against simulated trials; fit 17 people's speed and accuracy blocks by EZ diffusion; and recover a stop time from a race.

Figure produced by Lab 25: Deciding in time
Produced by the lab below, seed 0, in 0.5 s.
python -m videos.psychology.labs 25 needs numpy, scipy, matplotlib · download lab25.py · source on GitHub
Wald's test, p = 0.5 against 0.7: average shots (Wald) under each  30.4, 32.2
simulated under p = 0.7: accepts 0.7; average shots                0.960; 34.0
a fixed test with the same error rates                             67 shots
P(upper): formula, simulation                                      0.843, 0.851
mean decision time, s: formula, simulation                         0.400, 0.411
EZ recovers v, a, t0 (true 1.2, 1.4, 0.3)                          1.22, 1.43, 0.297
17 people: EZ bound lower under speed                              17 of 17; median ratio 0.59
EZ drift, speed against accuracy: median ratio                     1.09
stop race, delays 0.1, 0.2, 0.3 s: P(respond)                      0.03, 0.32, 0.66
stop time by the integration method (true 0.220 s)                 0.220, 0.220, 0.220

Wald's test needs about half the shots of a fixed test; the diffusion model's formulas match its simulation; telling people to hurry lowers their bound in all 17 by EZ (16 of 17 in the full fits); and a stop time you never observe can be read off the race.
The code (81 lines; it asserts its own result)
"""Lab 25: Wald's test against a fixed sample; the diffusion model's closed forms against simulation; EZ diffusion
on 17 people's speed and accuracy blocks; the stop-signal race and the stop time recovered."""

import numpy as np

from videos.coursekit import labs
from explainer.psychology import opendata
from explainer.psychology.psyche import decide as D

TITLE = "Deciding in time"
GOAL = ("Run Wald's test and count the shots it saves; check the diffusion model's formulas against simulated "
        "trials; fit 17 people's speed and accuracy blocks by EZ diffusion; and recover a stop time from a race.")
TASKS = [
    "Change Wald's error rates to alpha = beta = 0.01. How many more shots does the sequential test need on average, "
    "and how many more the fixed test?",
    "Give the simulated decision maker a start that varies from trial to trial (sw = 0.6 in D.simulate). Are its "
    "errors now faster or slower than its correct answers, and does EZ still recover the drift?",
    "Fit EZ separately to word and non-word trials in the open data. Is the drift for non-words lower, and does "
    "the bound change between them?",
]


def run(seed=0):
    out = labs.Lab()

    # 1. Wald's test
    oc0, n0 = D.sprt_oc_asn(0.5, 0.5, 0.7)
    oc1, n1 = D.sprt_oc_asn(0.7, 0.5, 0.7)
    nf = D.fixed_n(0.5, 0.7)
    sim = D.sprt_simulate(0.7, 0.5, 0.7, reps=4000, seed=seed)
    out.row("Wald's test, p = 0.5 against 0.7: average shots (Wald) under each", f"{n0:.1f}, {n1:.1f}")
    out.row("simulated under p = 0.7: accepts 0.7; average shots", f"{sim['accept_h1']:.3f}; {sim['mean_n']:.1f}")
    out.row("a fixed test with the same error rates", f"{nf} shots")
    assert max(n0, n1) < 0.6 * nf

    # 2. the diffusion model
    v, a, w = 1.2, 1.4, 0.5
    rt, up = D.simulate(v, a, w, 0.3, n=20000, seed=seed + 1, dt=0.0005)
    out.row("P(upper): formula, simulation", f"{D.p_upper(v, a, w):.3f}, {up.mean():.3f}")
    out.row("mean decision time, s: formula, simulation", f"{D.mean_dt(v, a, w):.3f}, {np.nanmean(rt) - 0.3:.3f}")
    e = D.ez(up.mean(), np.var(rt[up]), np.mean(rt[up]), s=1.0)
    out.row("EZ recovers v, a, t0 (true 1.2, 1.4, 0.3)", f"{e['v']:.2f}, {e['a']:.2f}, {e['t0']:.3f}")

    # 3. EZ on the open data
    d = opendata.speed_acc()
    ids = sorted(set(d["id"]), key=int)
    ab = np.zeros((len(ids), 2))
    vb = np.zeros((len(ids), 2))
    for k, i in enumerate(ids):
        for j, sp in enumerate((True, False)):
            m = (d["id"] == i) & (d["speed"] == sp)
            c, r = d["correct"][m], d["rt"][m]
            f = D.ez(c.mean(), np.var(r[c]), np.mean(r[c]), s=1.0)
            ab[k, j], vb[k, j] = f["a"], f["v"]
    out.row("17 people: EZ bound lower under speed", f"{int((ab[:, 0] < ab[:, 1]).sum())} of {len(ids)}; median "
            f"ratio {np.median(ab[:, 0] / ab[:, 1]):.2f}")
    out.row("EZ drift, speed against accuracy: median ratio", f"{np.median(vb[:, 0] / vb[:, 1]):.2f}")

    # 4. stopping
    rng = np.random.default_rng(seed + 2)
    go = 0.25 + rng.gamma(4.0, 0.06, 50000)
    ssds = np.array([0.1, 0.2, 0.3])
    r = D.stop_race(go, ssds, 0.22, seed=seed + 3)
    est = [D.ssrt_integration(go, s_, p) for s_, p in zip(ssds, r["p_respond"])]
    out.row("stop race, delays 0.1, 0.2, 0.3 s: P(respond)", ", ".join(f"{p:.2f}" for p in r["p_respond"]))
    out.row("stop time by the integration method (true 0.220 s)", ", ".join(f"{x:.3f}" for x in est))

    out.note = ("Wald's test needs about half the shots of a fixed test; the diffusion model's formulas match its "
                "simulation; telling people to hurry lowers their bound in all 17 by EZ (16 of 17 in the full fits); and a "
                "stop time you never observe can be read off the race.")

    fig, ax = labs.figure(2, size=(11, 4.2))
    ag = np.linspace(0.3, 2.6, 60)
    ax[0].plot(D.mean_dt(1.5, ag) + 0.3, D.p_upper(1.5, ag), color=labs.GOLD)
    ax[0].set(title="One mind, every caution", xlabel="mean response time (s)", ylabel="proportion correct")
    ax[1].scatter(ab[:, 1], ab[:, 0], color=labs.BLUE)
    lim = [0, max(ab.max(), 0.1) * 1.05]
    ax[1].plot(lim, lim, ls="--", color="#888888")
    ax[1].set(title="17 people: EZ bound", xlabel="accuracy blocks", ylabel="speed blocks")
    out.fig = fig
    return out

Now change it

  1. Change Wald's error rates to alpha = beta = 0.01. How many more shots does the sequential test need on average, and how many more the fixed test?
  2. Give the simulated decision maker a start that varies from trial to trial (sw = 0.6 in D.simulate). Are its errors now faster or slower than its correct answers, and does EZ still recover the drift?
  3. Fit EZ separately to word and non-word trials in the open data. Is the drift for non-words lower, and does the bound change between them?

Problems, with solutions

Try each problem before opening its solution.

1. No drift. Show that with no drift the chance of the upper bound is \(z/a\), and that the general formula tends to it as \(v \to 0\).

Solution

With v = 0 the equation is P'' = 0 with P(0) = 0 and P(a) = 1, so P(z) = z/a. In the general formula, write k = 2v/s²: (1 − e^{−kz})/(1 − e^{−ka}) ≈ (kz)/(ka) = z/a to first order in k.

2. The mean time with an unbiased start. With the start halfway, show that the mean decision time is \(\frac{a}{2v}\tanh\!\big(\frac{va}{2}\big)\) (unit noise), and that it tends to \(a^2/4\) as \(v \to 0\).

Solution

With z = a/2 and unit noise, P(upper) = (1 − e^{−va})/(1 − e^{−2va}) = 1/(1 + e^{−va}). Then a P − a/2 = (a/2)(1 − e^{−va})/(1 + e^{−va}) = (a/2) tanh(va/2), and dividing by v gives E[T] = (a/2v) tanh(va/2). As v → 0, tanh(va/2) ≈ va/2 and E[T] → a²/4, which is z(a − z) at z = a/2.

3. The shortest run of Wald's test. In Wald's test of \(p = 0.5\) against \(p = 0.7\) with \(\alpha = \beta = 0.05\), what is the smallest number of shots that can end the test, each way?

Solution

A hit adds log(0.7/0.5) = 0.336 and a miss adds log(0.3/0.5) = −0.511; the bounds are ±2.944. Accepting p = 0.7 needs the sum to reach 2.944, which takes at least nine hits in a row (8 × 0.336 = 2.69 is short). Accepting p = 0.5 takes at least six misses (5 × 0.511 = 2.55 is short; 6 × 0.511 = 3.07).

4. Corrections. With corrections that each leave a share \(r\) of the distance, how many does a 5-bit movement need when \(r = 0.25\)? When \(r = 0.5\)?

Solution

After k corrections the remaining distance is D r^k, and the movement ends when it is below W/2: r^k < W/(2D) = 2^{−5}, so k > 5/log₂(1/r). With r = 0.25, k > 2.5: three corrections. With r = 0.5, k > 5: six. Coarser corrections (smaller r) need fewer of them, and each bit costs 1/log₂(1/r) corrections.

5. Two estimates of the stop time. Show that the integration estimate of the stop time equals mean go time minus mean delay when half the stop trials escape and the go distribution is symmetric.

Solution

The integration method sets SSRT = F⁻¹(p) − SSD, with p the share of stop trials that escape. When p = 0.5 the quantile is the go distribution's median, and for a symmetric distribution the median is the mean, so SSRT = mean go time − SSD; averaged over the delays a staircase visits, mean go time minus mean delay. With a skewed go distribution, or p far from a half, the two differ, which is why the integration method is preferred.

6. EZ on the open data. With `explainer.psychology.opendata': fit EZ diffusion to each of the 17 people's two kinds of block. Does EZ also put the bound lower under speed?

Solution

For each person and block, take the proportion correct, and the mean and variance of correct times, and apply decide.ez (with s = 1). EZ assumes an unbiased start and no variability between trials; it puts the bound lower under speed for all 17 people, at a median 59% of the careful bound (the full fits: 16 of 17, at 70%). Three summary statistics recover the main finding; the ratios differ because EZ assumes no variability between trials and uses correct responses only.

7. ⋆ A collapsing bound or variable drift? Design an experiment whose response times could tell a collapsing bound from variability in drift, and say what each predicts.

Solution

Both can make errors slow and both shorten tails relative to some alternatives, so use the joint shape of correct and error distributions across difficulty. A collapsing bound predicts that the slowest responses are the least accurate at every difficulty and that the right tail's shape is nearly the same across difficulties (it is cut by the bound); variability in drift predicts slow errors that grow with difficulty and tails that lengthen for hard conditions. A design: many difficulty levels, randomly mixed, with enough trials per level for conditional accuracy functions (accuracy by RT quantile); fit both models and compare them on held-out quantiles, as Hawkins et al. (2015) did.

Notes and sources

Sources

  • W. E. Hick, On the rate of gain of information, Quarterly Journal of Experimental Psychology 4 (1952) 11-26; R. Hyman, Journal of Experimental Psychology 45 (1953) 188-196; R. W. Proctor and D. W. Schneider, Quarterly Journal of Experimental Psychology 71 (2018) 1281-1299.
  • P. M. Fitts, Journal of Experimental Psychology 47 (1954) 381-391; P. M. Fitts and J. R. Peterson, Journal of Experimental Psychology 67 (1964) 103-112; E. R. F. W. Crossman and P. J. Goodeve, Feedback control of hand-movement and Fitts' law (1963; Quarterly Journal of Experimental Psychology 35A (1983) 251-278); I. S. MacKenzie, Human-Computer Interaction 7 (1992) 91-139.
  • R. G. Pachella, The interpretation of reaction time in information-processing research, in Human Information Processing (1974); W. A. Wickelgren, Speed-accuracy tradeoff and information processing dynamics, Acta Psychologica 41 (1977) 67-85.
  • R. Ratcliff, Group reaction time distributions and an analysis of distribution statistics, Psychological Bulletin 86 (1979) 446-461; R. D. Luce, Response Times (1986).
  • A. Wald, Sequential tests of statistical hypotheses, Annals of Mathematical Statistics 16 (1945) 117-186; Sequential Analysis (1947); A. Wald and J. Wolfowitz, Optimum character of the sequential probability ratio test, Annals of Mathematical Statistics 19 (1948) 326-339; W. A. Wallis, The Statistical Research Group, 1942-1945, Journal of the American Statistical Association 75 (1980) 320-330.
  • M. Stone, Models for choice-reaction time, Psychometrika 25 (1960) 251-260; D. R. J. Laming, Information Theory of Choice-Reaction Times (1968).
  • R. Ratcliff, A theory of memory retrieval, Psychological Review 85 (1978) 59-108; R. Ratcliff and J. N. Rouder, Psychological Science 9 (1998) 347-356; R. Ratcliff and G. McKoon, Neural Computation 20 (2008) 873-922; D. J. Navarro and I. G. Fuss, Fast and accurate calculations for first-passage times in Wiener diffusion models, Journal of Mathematical Psychology 53 (2009) 222-230; S. Blurton, M. Kesselmeier and M. Gondan, Journal of Mathematical Psychology 56 (2012) 470-475.
  • E.-J. Wagenmakers, R. Ratcliff, P. Gomez and G. McKoon, Journal of Memory and Language 58 (2008) 140-159; A. Heathcote and J. Love, Frontiers in Psychology 3 (2012) 292; E.-J. Wagenmakers, H. L. J. van der Maas and R. P. P. P. Grasman, An EZ-diffusion model for response time and accuracy, Psychonomic Bulletin & Review 14 (2007) 3-22.
  • A. Voss, K. Rothermund and J. Voss, Memory & Cognition 32 (2004) 1206-1220; B. Rae, A. Heathcote, C. Donkin, L. Averell and S. Brown, Journal of Experimental Psychology: Learning, Memory, and Cognition 40 (2014) 1226-1243; G. Dutilh and colleagues, Psychonomic Bulletin & Review 26 (2019) 1051-1069.
  • M. N. Shadlen and W. T. Newsome, Motion perception: seeing and deciding, PNAS 93 (1996) 628-633; Neural basis of a perceptual decision in the parietal cortex (area LIP) of the rhesus monkey, Journal of Neurophysiology 86 (2001) 1916-1936; J. D. Roitman and M. N. Shadlen, Journal of Neuroscience 22 (2002) 9475-9489; K. W. Latimer and colleagues, Science 349 (2015) 184-187; M. N. Shadlen and colleagues, Science 351 (2016) 1406; N. A. Steinemann and colleagues, eLife 12 (2024) RP90859.
  • S. D. Brown and A. Heathcote, The simplest complete model of choice response time: linear ballistic accumulation, Cognitive Psychology 57 (2008) 153-178; M. Usher and J. L. McClelland, Psychological Review 108 (2001) 550-592; R. Bogacz, E. Brown, J. Moehlis, P. Holmes and J. D. Cohen, The physics of optimal decision making, Psychological Review 113 (2006) 700-765; P. Cisek, G. A. Puskas and S. El-Murr, Journal of Neuroscience 29 (2009) 11560-11571; J. Drugowitsch and colleagues, Journal of Neuroscience 32 (2012) 3612-3628; G. E. Hawkins, B. U. Forstmann, E.-J. Wagenmakers, R. Ratcliff and S. D. Brown, Journal of Neuroscience 35 (2015) 2476-2484.
  • G. D. Logan and W. B. Cowan, Psychological Review 91 (1984) 295-327; F. Verbruggen and colleagues, eLife 8 (2019) e46323; P. G. Bissett, H. M. Jones, R. A. Poldrack and G. D. Logan, Science Advances 7 (2021) eabf4355.
  • D. Vickers, Decision Processes in Visual Perception (1979); R. Kiani and M. N. Shadlen, Science 324 (2009) 759-764; T. J. Pleskac and J. R. Busemeyer, Psychological Review 117 (2010) 864-901; J. I. Sanders, B. Hangya and A. Kepecs, Neuron 90 (2016) 499-506; B. Maniscalco and H. Lau, Consciousness and Cognition 21 (2012) 422-430.
  • M. Green, How long does it take to stop?, Transportation Human Factors 2 (2000) 195-216; R. Ratcliff, A. Thapar and G. McKoon, Psychology and Aging 16 (2001) 323-341.
  • I. Krajbich, C. Armel and A. Rangel, Nature Neuroscience 13 (2010) 1292-1298; C. Hedge, G. Powell and P. Sumner, The reliability paradox, Behavior Research Methods 50 (2018) 1166-1186; V. Lerche and A. Voss, Psychological Research 81 (2017) 629-652.
  • B. U. Forstmann, R. Ratcliff and E.-J. Wagenmakers, Sequential sampling models in cognitive neuroscience, Annual Review of Psychology 67 (2016) 641-666.
About this partfrom its README

A cloud of moving dots: which way? You can wait and be right, or answer now and risk being wrong, and you choose the rate of exchange. This part asks why a decision takes the time it takes, and answers with one idea in many forms: evidence added up, noisily, until it crosses a line. Wald found it was the fastest reliable way to decide, Ratcliff found it fits people's choices and times together, and Shadlen found it, or something like it, in neurons.

Moving dots on you, slow and then fast; Hick's law, with a race of accumulators that recovers the logarithm, and Fitts's law derived from iterative corrections; the speed–accuracy trade-off in 17 people's open data and as a curve traced by one model; the shape of a response-time distribution, an ex-Gaussian fit and why the mean misleads; Wald's sequential probability ratio test run on a shell's hits and misses, its bounds and average sample number against a fixed test, and its optimality; the diffusion model's four numbers, P(upper) and the mean decision time derived, and the first-passage densities computed by Navarro and Fuss's series and checked by simulation; selective influence, tested on the 17 people (fitted per person under four models) and on Ratcliff and Rouder's three observers at 33 brightnesses; fast and slow errors, in the data and from variability in start and in drift; accumulators in LIP, averaged as Roitman and Shadlen averaged them, and the ramping–stepping dispute; the linear ballistic accumulator, leaky competing accumulators and urgency; the stop-signal race and the integration method; and confidence as the balance of evidence, with its folded X. The practice chapter is interfaces, braking and clinics; the frontier is attention in value-based choice and whether decision parameters are traits.

What is computed and built
  • explainer/psychology/psyche/decide.py: Wald's test on Bernoulli data with its bounds, operating characteristic, average sample number, a simulator and the exact fixed-sample comparison; the diffusion model's closed forms, Navarro and Fuss's first-passage densities with drift variability integrated out, response-time densities with t0 variability, conditional mean times, vectorized simulators with every variability and with any time-varying bound; maximum-likelihood fits for one condition or several sharing parameters, and EZ diffusion; the linear ballistic accumulator; a race of n accumulators held to a fixed accuracy (Hick's law); stimulus- and response-aligned averages and a stepping model; the stop-signal race with the integration and mean methods; the balance of evidence; the attentional drift-diffusion model; test–retest reliability of fitted drifts. Tested in tests/psychology/test_decide.py.
  • explainer/psychology/opendata.py gains the two rtdists datasets (read by rdata.py, nothing evaluated).
  • The Ledger gains five rows; the Archive two datasets. Hick's law keeps its row from Part 1.
  • The course's interactive is the moving dots on you, in fast and careful blocks: your accuracy, your times, and your two bounds by EZ diffusion.
Chapter notes
# Chapter What it does
0 Moving dots The dots on you, slow and fast; Wald, Ratcliff and LIP; the questions; objectives
1 Two old laws Hick's law and a race that recovers it; Fitts's law derived from corrections
2 The speed-accuracy trade-off 17 people's two operating points; one model's whole curve; why mean times mislead comparisons
3 The shape of a response time One person's distribution and an ex-Gaussian fit; same mean, different shapes; quantiles
4 Wald's test The SPRT derived and run; half the shots of a fixed test; from shells to seeing
5 The diffusion model Four numbers; P(upper) and the mean time derived; the densities computed
6 Each parameter, a claim Selective influence; 17 people fitted under four models; three observers at 33 brightnesses; exceptions
7 Fast errors and slow errors The data's flip with the instruction; variability in drift and in start
8 Accumulators in the brain LIP and the moving dots; averages aligned two ways; ramp or step
9 Relatives: races, leaks and urgency The linear ballistic accumulator; leaky competing accumulators; collapsing bounds
10 Stopping The stop-signal race derived; the inhibition function; the stop time recovered; independence
11 Confidence The balance of evidence; Kiani and Shadlen; the folded X
12 The Ledger Fitts's law; speed and the bound; fast and slow errors; LIP ramping; the stop-signal race
13 In practice: menus, brakes and clinics Fitts and Hick at the interface; braking distances; slower or more careful
14 Frontier: values, attention and traits Gaze and value in the attentional diffusion model; reliability of decision parameters
Recap, problems, and the road ahead Ten lines; Kant's three objections; payoffs; problems; references; Part 26
NotesWhere the numbers come from
What Source
Wald's bounds ±2.94 (19 to 1) for p = 0.5 against 0.7 with α = β = 0.05; a hit adds 0.34, a miss subtracts 0.51; the median run of 101 stopped at shot 32 Psyche (decide.sprt_bernoulli, wald_bounds), item sprt
Average shots about 30 under p = 0.5 and 32 under p = 0.7 (Wald's approximation), simulated 33 and 34; a fixed exact binomial test needs 67 Psyche (decide.sprt_oc_asn, sprt_simulate, fixed_n), item sprt
A race of 2, 4, 8 and 16 accumulators held to 90% accuracy: mean decision time 0.61, 1.12, 1.52, 1.88 (model units), about 0.42 per bit Psyche (decide.race_hick), item hick
Corrections leaving a share 0.25 of the distance: 3 for a 5-bit movement Psyche, item fitts (Crossman and Goodeve's model)
17 people, 31,351 kept trials: told to be accurate, all 17 slower and all 17 more accurate; the median person paid 223 ms for 8 points of accuracy Wagenmakers, Ratcliff, Gomez and McKoon (2008), with Heathcote and Love's two extra participants, as packaged in the R package rtdists (GPL ≥ 3), fetched by explainer.psychology.opendata and checked by SHA-256; item selective
The median person by mean time (person 3): 928 correct times in accuracy blocks, mean 0.76 s, median 0.69 s; ex-Gaussian μ 0.54 s, σ 0.07 s, τ 0.23 s the same data; Part 1's chronometry.fit_exgauss, item shape
v = 1.5, a = 1.2, z = a/2: P(upper) 0.858 (simulated 0.861), mean decision time 0.287 s (simulated 0.297 s, Euler steps of 0.5 ms); the same conditional mean for both bounds Psyche (decide.p_upper, mean_dt, fpt_density, simulate), item ddm
Per-person fits with w fixed at 0.5: bound lower under speed for 16 of 17, to a median 70% of its careful width; bound-only beats drift-only by AIC for all 17; best model bound and t0 for 7, bound, t0 and drift for 10 Psyche (decide.fit_conditions), item selective
Errors faster than correct answers (medians) for 13 of 17 under speed; slower for 14 of 17 under accuracy the same data, item selective
Three observers, 23,848 kept trials, 33 brightnesses in 8 bins: careful bounds 1.89, 1.92, 1.66 against fast bounds 0.83, 0.79, 1.07 Ratcliff and Rouder (1998), as packaged in rtdists; Psyche's stimulus-coded fit (compute._fit_rr98), item rr98
Mean decision time correct/error: no variability 0.334/0.340 s; drift varies (sd 1.2) 0.297/0.341; start varies (width 0.6 a) 0.308/0.280 Psyche (decide.simulate, 60,000 trials each), item variability
Accumulators averaged by drift, aligned to the stimulus and to the response Psyche (decide.aligned_means), item brain
About three quarters of LIP neurons better fitted by steps Latimer, Yates, Meister, Huk and Pillow (2015)
Up to 203 LIP neurons recorded at once Steinemann et al. (2024)
LBA with rates 1.2 and 0.8: the faster accumulator wins 78% Psyche (decide.lba_defective, lba_simulate), item lba
A collapsing bound: skew 1.9 to 1.2, accuracy 83% to 74%, mean time 1.15 s to 0.73 s Psyche (decide.simulate_bound), item urgency
The integration method recovers a 220 ms stop time to within 4 ms at every delay where 10–90% escape Psyche (decide.stop_race, ssrt_integration), item stop
Confidence (share of the bound) on correct trials 0.67 to 0.74, on errors 0.63 to 0.35, as drift rises from 0.2 to 3.2 Psyche (decide.race_confidence), item confidence
Two equally good snacks: P(choose left) from 0.26 to 0.70 with gaze advantage; the last item looked at chosen 71% Psyche (decide.addm), item addm
Test–retest correlation of EZ drift: 0.35 with 20 trials a session, 0.90 with 500 Psyche (decide.retest), item traits
Perception–brake times about 0.75, 1.25 and 1.5 s; road design 2.5 s Green (2000); AASHTO stopping sight distance
Notes
Finding Original Status
The time of an aimed movement grows linearly with the logarithm of twice the distance over the width of the target Fitts 1954 replicated
Instructions to be fast or accurate act on the diffusion model's boundary separation Ratcliff and Rouder 1998 replicated
Errors are faster than correct responses when speed is stressed, and slower when accuracy is stressed Ratcliff and Rouder 1998 replicated
Single neurons in the lateral intraparietal area accumulate evidence for a choice, ramping to a bound Roitman and Shadlen 2002 contested
Stopping is a race between independent go and stop processes, from which the stop-signal reaction time can be estimated Logan and Cowan 1984 contested

Shown without a row, with the reason recorded in explainer/psychology/ledger.py: the history the part tells (Wallis, Wald, Ratcliff), the sequential-sampling tradition (Stone, Laming), the selective-influence studies described beside the row (Ratcliff, Voss et al.), Shadlen and Newsome's recordings (in the LIP row's original), Usher and McClelland and Bogacz et al. (models), Vickers, Kiani and Shadlen and Pleskac and Busemeyer (confidence, described), and the practice and frontier chapters' studies.

Notes

Before the narrated master:

  • Hick's lamps and Fitts's tapping are described from the papers' abstracts and standard summaries; Fitts's "16 men" is from the 1954 paper's method and should be rechecked against it.
  • Green's braking times (0.75, 1.25, 1.5 s) are as usually quoted from his 2000 review; the 2.5 s design value is the AASHTO stopping-sight-distance assumption.
  • The story of 1943 (the Navy's question, Friedman and Wallis, Wald) follows Wallis (1980).
  • The LIP averages, the stepping trials, the urgency bounds, the confidence race, the attentional model and the reliability simulation are Psyche's, and say so on screen; no neuron's data are shown.
  • The rtdists files (GPL ≥ 3) are fetched on first use, checked by SHA-256 and never committed.

Companion material in this repository

The syllabus's plan for this partfrom SYLLABUS.md, the plan of record
  1. Hook and On you: moving dots. Which way? Now faster.
  2. Two old laws: Hick (1952), reaction time grows with the logarithm of the number of alternatives; Fitts (1954), movement time with the logarithm of distance over width. Information theory in the 1950s laboratory.
  3. The speed–accuracy trade-off, drawn. Any model of choice must produce it.
  4. What a reaction-time distribution looks like: the skew, the ex-Gaussian, why means mislead.
  5. A random walk between two bounds: the sequential probability ratio test, and Wald's result that it is optimal.
  6. The drift–diffusion model (Ratcliff 1978): drift, bound, start point, non-decision time. Accuracy and mean RT in closed form (derived); the distributions (computed).
  7. Each parameter is a psychological claim: difficulty moves drift, instructions move the bound, payoffs move the start. The selective-influence experiments.
  8. Fast errors and slow errors: across-trial variability.
  9. The brain: Shadlen and Newsome's recordings in LIP; ramping to a bound; the stepping-against-ramping dispute.
  10. Relatives: the linear ballistic accumulator, leaky competing accumulators, urgency signals; many alternatives and Hick's law recovered.
  11. Stopping: the stop-signal task as a race (Logan and Cowan 1984); the stop-signal reaction time, derived.
  12. Confidence: reading the losing accumulator; meta-d′ (Part 12 continued).

Psyche: decide: the SPRT; the diffusion model with its closed forms and a fast simulator; hierarchical fits to open random-dot data; the LBA; the stop-signal race. On you: Battery task 7 under speed and accuracy instructions; your two fitted bounds. Ledger: Hick's and Fitts's laws (replicated); selective influence in the diffusion model (replicated, with exceptions); the readiness potential as accumulation (Part 27); ramping in LIP (contested at the single-trial level). In practice: interface latency and menu design (Part 52), driver reaction models, cognitive screening by RT decomposition, drift rates as trial outcome measures. Frontier: collapsing bounds; decisions between values and attention-weighted accumulation; whether parameters are stable traits (Part 59). Reading: Wald 1947; Hick 1952; Fitts 1954; Ratcliff 1978; Ratcliff & McKoon 2008; Bogacz et al. 2006; Gold & Shadlen 2007; Brown & Heathcote 2008; Logan & Cowan 1984; Luce, Response Times.

Build the film

python -m videos.psychology.psych25.compute        # the part's numbers, into .cache/psych25
python tools/build.py psych25                  # render and assemble the film
EXPLAINER_TTS=silent python tools/qa_scene.py psych25 Hook   # one chapter, silent, with a contact sheet

Scenes: videos/psychology/psych25. Setup: see the course page. Source of these notes: the README and the scenes' narration.

Build it
python -m videos.psychology.psych25.compute            # every number (a few minutes; fetches the open data once)
python tools/qa_scene.py psych25 Selective             # one chapter, silent, at 480p, with a contact sheet
EXPLAINER_TTS=silent python tools/build.py psych25 -q l   # the whole part, silent preview
python tools/build.py psych25                          # 1080p30 with narration
python tools/qa_scene.py psych25 Diffusion --lang zh   # the Chinese edition of one chapter
python tools/make.py psych25                           # both editions, with the checks a long build needs
python -m videos.psychology.labs 25                    # the lab: Wald's test to the diffusion model on open data
python tools/check_ledger.py psych25                   # every study shown has its Ledger row, or a reason
python -m pytest tests/psychology                      # Psyche's decision module, the Ledger, the Archive

The Chinese edition is zh_lines.py (the narration, line by line) and the series table videos/psychology/psychology_text_zh.json (the text on screen); the terms are in PSYCHOLOGY_ZH_GUIDE.md.