Designing for Minds
Can you predict how long a person will take to use something before it is built?
In the late 1980s a telephone company was about to buy operator workstations expected to save time on every call. Wayne Gray, Bonnie John and Michael Atwood modelled the operators' perception, cognition and keystrokes on paper and predicted the new design would be slower; the field trial agreed. The part builds the Model Human Processor and the keystroke-level model, measures pointing as throughput, steers through tunnels, sets menu depth against breadth, follows an information forager by the marginal value theorem, shows why five users find less than promised, ranks chart encodings, computes contrast, and asks how long a habit takes.
What you need. Part 1's mental chronometry, Part 11's power law, Part 18's search and Part 51's human factors; logarithms and a little probability.
- Hook
- Project Ernestine
- Ideas, models and mathematics
- the Model Human Processor, GOMS and the keystroke-level model, Fitts in the interface, information foraging, usability testing and its sample sizes, graphical perception, accessibility, dark patterns, habit
- Psyche gains
- a keystroke-level predictor
- On you
- your Fitts' law slope; rank the charts
What you will be able to do
Psych 101 and the major
- Predict a skilled user's task time with the keystroke-level model.
- Explain why position and length are read more accurately than angle and area.
Graduate
- Measure pointing throughput with the effective width, and fit Fitts's and the steering law.
- Derive the problem-discovery curve and show how unequal detectability lowers it.
Research
- Design a study of whether a simulated user's verdict on an interface can be trusted.
Practice
- Compare two designs by keystroke-level analysis before testing, and choose the right test for the remaining questions.
- Audit an interface for contrast, target size and dark patterns.
Contents
Each chapter has a home level. Choose a track to see what to read and watch: Psych 101 and the major 14 min · Graduate 26 min · Research 27 min · Practice 20 min.
- 0Two thirds of a secondPsych 101 and the major2 min
- 1On you: point and click, and four numbersPsych 101 and the major1 min
- 2The Model Human ProcessorPsych 101 and the major1 min
- 3GOMS and the keystroke-level modelPsych 101 and the major2 min
- 4Pointing, measuredGraduate2 min
- 5Fitts and Hick in the interfaceGraduate1 min
- 6Information foragingGraduate1 min
- 7Gulfs, affordances and signifiersPsych 101 and the major1 min
- 8How many users?Practice2 min
- 9Seeing dataPsych 101 and the major2 min
- 10Accessibility as psychophysicsPsych 101 and the major2 min
- 11Habit and attention by designPractice2 min
- 12Talking to machinesGraduate1 min
- 13The LedgerGraduate1 min
- 14In practice: a checkout form, predictedPractice2 min
- 15Frontier: simulated usersResearch1 min
- Recap, problems, and the road aheadAll tracks3 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.
Two thirds of a secondPsych 101 and the major2 min
In the late nineteen eighties, a telephone company's operators handle millions of calls a year. A new workstation is offered to them: fewer keystrokes per call, a better screen, and time saved on every call. At that volume, every second per call is worth a great deal of money a year. Wayne Gray, Bonnie John and Michael Atwood model the operators' perception, thinking and keystrokes on paper, before the field trial. Their model says the new workstation will be slower, by about two thirds of a second a call.
Why can fewer keystrokes be slower? Because a call is a schedule. Some steps happen in parallel, and only the longest chain sets the time. This is a toy version of the analysis. The keystrokes the new design saved were made while the customer was still talking, off the critical path. The steps it added fell on the path, where every tenth of a second counts. The field trial agreed with the model. The new workstation was slower, and the company didn't buy it.
So this part asks: can you predict how long a person will take to use something, before it's built? Engineering models of the user: processors, operators, pointing and menus. How people search, act and understand an interface. Testing with users, and reading charts. And accessibility, habits, and machines that talk back.
This is Part 52 of Psychology, Built: designing for minds. We'll build the Model Human Processor and the keystroke-level model, and predict times by adding operators. We'll measure pointing as throughput, and steer through tunnels. We'll design menus, follow foragers, and cross Norman's two gulfs. We'll ask how many users a test needs, and why the famous answer is too small. We'll treat reading a chart and seeing contrast as psychophysics. And we'll look at habits, dark patterns, and machines that talk back.
What it does: Project Ernestine; why fewer keystrokes can be slower; the question; objectives
1On you: point and click, and four numbersPsych 101 and the major1 min
How fast can you hit a target?
First, your own hand. On the course site, targets of four sizes appear at four distances, and you click each as fast as you can. The page fits your own line: time against the index of difficulty, in bits. And it gives your throughput in bits per second, from where your clicks actually landed. Nothing is stored or sent.
Now four numbers. One: to delete a word, you can use a keyboard shortcut, or the mouse and a menu. How much slower is the menu route? Two: a usability test with five users. What share of an interface's problems does it find? Three: reading bar lengths or pie-slice angles. How much larger is the typical error with angles? And four: how many days does it take to form a new daily habit? Pause here, and write them down.
What it does: The pointing task; four predictions
2The Model Human ProcessorPsych 101 and the major1 min
Can a person be drawn as an engineer's diagram?
In 1983 Stuart Card, Thomas Moran and Allen Newell drew a person as an engineer would. Three processors, perceptual, cognitive and motor, each with a cycle time, and memories with capacities and decay rates. Every number came from the experiments of Acts Three and Five, and each is given as typical, fast and slow. The claim wasn't that the mind is built this way. It was that this is accurate enough to design with.
The model predicts by adding cycles. A simple reaction is perceive, decide, move: two hundred and forty milliseconds, with a range from about a hundred to almost five hundred. Asking whether two shapes are the same adds one cognitive cycle: three hundred and ten. Asking whether A and small a are the same letter adds two: three hundred and eighty. That's Part 1's Posner and Donders, as arithmetic. The ranges are wide. The model predicts the order and the scale, not one person's millisecond.
What it does: Three processors, three memories; predictions by adding cycles
3GOMS and the keystroke-level modelPsych 101 and the major2 min
How long will this task take?
Card, Moran and Newell's next step was GOMS. Goals: what the user wants, like deleting a word. Operators: the elementary acts, a keystroke, a point, a look, a moment of thought. Methods: sequences of operators that achieve a goal, like the shortcut or the menu. And selection rules: how a user picks a method. If my hands are on the keys, use the shortcut.
The keystroke-level model is GOMS at its simplest. K, a keystroke: about a quarter of a second for an average typist. P, pointing with the mouse: about a second, Fitts's law averaged. B, a button press or release; a click is two. H, homing the hand between keyboard and mouse: four tenths of a second. And M, mental preparation: one point three five seconds, placed by rules before each new chunk of action. A task's time is the sum of its operators, plus the system's response time.
Here are three ways to delete a word. Write each method as operators, place the mental operators, and add. The keyboard shortcut takes under three seconds. The menu route takes more than eight, three times as long, mostly in pointing and thinking. In Card, Moran and Newell's tests, predictions like these came within about twenty percent of users' times. But the model predicts skilled, error-free work, and nothing about learning or errors.
Skilled people don't do one thing at a time. The keystroke-level model adds operators one after another, but skilled people overlap them. Bonnie John's CPM-GOMS draws each operator on its resource, eyes, hands or cognition, and finds the critical path, the chain that sets the time. In Project Ernestine it predicted each type of call's time, and the new workstation's loss, before a single call was taken on it. The lesson for design: shortening a task means shortening its critical path, not counting its keystrokes.
What it does: GOMS; the operators; three ways to delete a word; CPM-GOMS
4Pointing, measuredGraduate2 min
How many bits per second does a hand deliver?
Part 51 met Fitts's law. Here it's measured the way designers measure it. Psyche points at targets from sixty-four to five hundred and twelve pixels away, and from eight to sixty-four wide: twenty-four movements in each of sixteen conditions. The index of difficulty, the log of distance over width plus one, collapses all sixteen onto one line. About two tenths of a second plus two tenths per bit, with a correlation near one. Distance and size trade exactly. Double both, and nothing changes.
One complication: people trade speed for accuracy. One person aims carefully, another sprays. So measure the width they actually used: four point one three times the spread of their endpoints, which covers ninety-six percent of a normal distribution. Throughput is the effective index of difficulty divided by movement time, in bits per second. Here, about three point eight, within the range reported for a mouse. The international standard uses it to compare devices: a mouse, a touchpad, a joystick, an eye tracker. One number per device and person, comparable across studies. That's why Fitts's law is still in use seventy years on.
Some movements aren't to a target but along a path. Johnny Accot and Shumin Zhai found in 1997 that steering through a tunnel of length A and width W takes a constant plus b times A over W. Not a logarithm but a ratio, because every step of the path must stay inside the walls. Cascading menus are tunnels. A narrow, long path to a submenu is slow and error-prone. The fixes are wider paths, a forgiving delay before a submenu closes, or no cascades at all.
What it does: Sixteen conditions on one line; throughput; the steering law
5Fitts and Hick in the interfaceGraduate1 min
Where should a button go, and how many should a menu hold?
Fitts's law tells you where to put things. A target at the edge of the screen can't be overshot. The cursor stops there, so its effective width is huge, and it's fast to hit. Corners are two edges at once, the fastest places on a screen. Pie menus put every item around the cursor, at the same short distance. And on touch screens, a fingertip is wide. Targets need to be several millimetres across, whatever the law says about distance.
How many items should a menu hold? Take sixty-four commands. They could be six levels of two, three of four, two of eight, or one menu of sixty-four. For a practised user, each level costs a Hick choice and a point. Broad wins, and one menu of sixty-four is fastest. But for an unfamiliar menu, the user scans item by item. The choice grows linearly, and about eight items per level is best. So Hick's law applies only when the user knows what's where. Otherwise it's Part 18's visual search.
What it does: Edges, corners and touch; menu depth against breadth
6Information foragingGraduate1 min
When should a reader leave a page?
In 1999 Peter Pirolli and Stuart Card argued that people looking for information behave like animals foraging for food. It's an idea from behavioural ecology, applied to reading. A page is a patch. Its useful facts come quickly at first, then more slowly. Eric Charnov's marginal value theorem says: leave when the page's rate falls to the best overall rate. Draw the line from the start of the journey that just touches the curve. With twenty seconds of travel, leave after about half a minute. Cheaper travel means shorter stays: ten seconds on a page when the next is two seconds away, fifty when it's eighty seconds away. Fast search engines make readers skim.
Foragers follow scent. Information scent is what a link tells you about what lies behind it: its words, its picture, its place on the page. Users choose the link whose words best match their goal, and they leave a site when the scent fades. So label links with the words users would use, not the organization's own names for its departments. And test it with first-click tests. If the first click is right, the task usually succeeds.
What it does: The marginal value theorem; information scent
7Gulfs, affordances and signifiersPsych 101 and the major1 min
Why can't I open this door?
Donald Norman described what goes wrong between a person and a device as two gulfs. The gulf of execution is the distance between what I want and the actions the system offers. How do I do it? The gulf of evaluation is the distance between what the system shows and what I need to know. Did it work? Part 51's light at Three Mile Island was a gulf of evaluation. A command hidden three menus deep is a gulf of execution. Design narrows both: visible actions, immediate feedback, and a clear mapping between them.
Norman borrowed a word from James Gibson. An affordance is what an object allows a person to do. A flat plate affords pushing, and a handle affords pulling. A signifier is what tells the person the affordance is there: the plate, an underline, a raised button. A door with a handle that has to be pushed has a signifier that lies. People call it a Norman door. A screen affords touching everywhere, so every action needs a signifier, and flat designs that remove them hide the actions.
What it does: Norman's two gulfs; affordances and signifiers
8How many users?Practice2 min
Are five users enough?
How many users does a usability test need? In 1993 Jakob Nielsen and Thomas Landauer wrote the curve. If each user finds each problem with probability p, n users find one minus one minus p to the n of them. With their average p of about a third, five users find eighty-four percent. Hence the advice: test with five users. But problems differ. Some almost everyone hits, and some only one user in twenty. With the same average p, five users find about sixty percent, and twenty users still miss almost a fifth. Later studies, by Jared Spool and Will Schroeder and by Laura Faulkner, found five users missing many problems in real tests. The useful advice survives: iterate with small tests. But don't claim coverage.
So what does a usability team actually use? Think-aloud tests: a user does real tasks and says what they're thinking. They find problems, not rates. Questionnaires like the System Usability Scale: ten items and a score from zero to a hundred, where about sixty-eight is average across many studies. Task metrics: success, time and errors on set tasks, reported with intervals, not just averages. And when the question is whether design B is better than A, an experiment: randomize users and measure.
What it does: The problem-discovery curve; tests, questionnaires and experiments
9Seeing dataPsych 101 and the major2 min
Which chart lets a reader judge a number best? In 1984 William Cleveland and Robert McGill asked people what percentage one mark was of another, with the marks drawn in different ways. Position along a common scale was judged best, then length, then angle, then area, volume and shading. Jeffrey Heer and Michael Bostock repeated it online in 2010 with crowd workers, and found the same order. In Psyche's version, the typical error is about four points for lengths and seven for angles, almost twice as large.
Why does area mislead? Part 11's power law: perceived size grows as physical size to an exponent. For length the exponent is about one. For area it's about zero point seven, and for volume about zero point six. A doubled area looks only about one and a half times as large. So a chart that scales a symbol's side by the data quadruples its area and overstates the change, and one that scales the area understates it. Use positions and lengths for quantities, and area and colour for rough impressions.
Part 18 tells chart designers what pops out. A single feature, a red mark among grey ones, is found in parallel. A conjunction, red and square among red circles and grey squares, needs serial search, and it's slow. So highlight one thing with one feature. Highlighting everything highlights nothing. And use perceptually uniform colour scales, with equal steps in lightness. The rainbow scale invents boundaries that aren't in the data.
What it does: Cleveland and McGill's ranking; why area misleads; what pops out
10Accessibility as psychophysicsPsych 101 and the major2 min
Who can read this?
Accessibility is psychophysics with a standard attached. The web's contrast ratio is computed from each colour's relative luminance, and runs from one to twenty-one. Normal text needs four and a half to one. This mid grey on white just passes. The threshold comes from Part 13. Contrast sensitivity falls with age and with low vision, so the margin is for them. Red on green has almost no luminance contrast, about one point three, and for many colour-blind readers, none at all.
Colour vision differs too. About one man in twelve, and one woman in two hundred, of Northern European descent has a red-green deficiency, from Part 13's cones. A chart that separates its lines only by red and green separates nothing for them. The fix is redundant coding: colour plus shape, position, labels or dashes. And palettes that differ in lightness as well as hue survive both colour deficiency and printing in grey.
Motor and cognitive tolerances follow the same logic. Acuity falls with age, so text should be enlargeable, and layouts should reflow. Fitts's law for a hand with a tremor means larger targets with more space between them. Part 31's slower processing in later life means adjustable time limits, or none. And other routes, keyboard-only use, screen readers and captions, give the same task to another sense. Designs that work at the edges of the population usually work better for everyone.
What it does: Contrast computed; colour-vision deficiency; size, time and motor tolerance
11Habit and attention by designPractice2 min
Can a product be designed to be hard to put down?
How long does a habit take? The popular answer, twenty-one days, traces back to a self-help book of 1960 and a remark about patients adjusting after surgery. In 2010 Phillippa Lally and colleagues had ninety-six people repeat a daily behaviour of their choice and rate how automatic it felt, for twelve weeks. Automaticity rose and levelled off. It reached ninety-five percent of its plateau after a median of sixty-six days, with a range from eighteen to two hundred and fifty-four. Among ninety-six of Psyche's people drawn around that median, about one in twenty gets there within twenty-one days. And in the study, missing a day didn't reset the curve.
Part 16's schedules are in your pocket. A variable-ratio schedule, a reward after an unpredictable number of responses, gives high, steady responding that is slow to extinguish. Pull to refresh, a feed that sometimes holds something good, and notifications at random moments are the same schedule. Part 17's prediction errors explain why: an uncertain reward keeps the signal alive. Whether this amounts to addiction is contested. That it's designed to hold attention is not.
The darker end has a name. In 2019 Arunesh Mathur and colleagues crawled about eleven thousand shopping sites and found dark patterns on more than a tenth of them. False urgency and scarcity, hidden costs, pre-ticked boxes, confirm-shaming, and cancellation made hard. The psychology is the series' own: Part 26's defaults and loss aversion, and Part 34's social proof, turned against the user. Regulators now name several of them as unfair, and a designer can audit their own flows for each one.
What it does: How long a habit takes; variable schedules; dark patterns
12Talking to machinesGraduate1 min
What do people expect from an interface that talks? In 1996 Byron Reeves and Clifford Nass showed that people apply social rules to computers, politeness, flattery and teammates, without believing the computer is a person. A fluent, human-sounding reply raises expectations of competence everywhere. It's Part 35's mind-reading, switched on by language. And the gulf of evaluation widens, because a wrong answer looks exactly like a right one. So the interface has to show what the system can and can't do, and how sure it is. That's Part 51's calibrated trust.
Conversation itself can be designed. Repair: conversations go wrong all the time, and people fix them with a quick you mean? A good system asks, and accepts corrections. Turn-taking: Part 23's gaps between turns are about two hundred milliseconds, so a slow reply feels like hesitation. Anthropomorphism: a name and a personality increase use and trust, whether or not the trust is earned. And measuring it: task success and the cost of errors, not how pleasant the conversation felt. Part 60 returns to minds and machines.
What it does: Expectation; conversation, designed
13The LedgerGraduate1 min
What the four have in common. Two are quantitative models of perception and action, tested against users, and both replicate. Two are rules of thumb that travelled faster than their evidence. One is contested, and one was never a finding at all. A design rule is only as good as the measurement under it. So here's the answer to this part's question. Engineering with psychology works where the psychology is quantitative, and tested.
What it does: Four rows; what they have in common
14In practice: a checkout form, predictedPractice2 min
Which design is faster, before anyone tests it?
Where is this a job? In UX research: interviews, usability tests and diary studies, about what people try to do and where they fail. In quantitative UX research: surveys, logs and experiments at scale, which is Parts 2 to 4, 46 and 47 in daily use. In design systems: shared components with tested sizes, contrast and states, so every team inherits them. And in accessibility and data visualization, with standards to meet and charts that readers judge correctly.
Here's a worked analysis. A checkout form with seven fields: name, email, card number, expiry, code, address, and a button. Design A makes the buyer click into each field. That's nine points, fourteen hand moves and fifteen mental operators: about a minute. Design B lets them tab between fields and press Enter to submit. One point, one hand move, and about thirty-seven seconds: twenty-three seconds saved for every buyer. For a fast typist the saving is even larger, because the hand moves and the thinking dominate, not the typing. The analysis takes an hour, before any user sees either form. Then test the winner with users, for the errors the model can't see.
What does the model leave out? Errors: a mistyped card number costs far more than any operator. Learning: a first-time buyer isn't a skilled user, and the model's mental operators undercount their thinking. Trust and motivation: whether the buyer finishes at all. So the model ranks designs for experts quickly, and a test with real users finds what it can't.
What it does: Where this is a job; two forms by keystroke-level model; what the model leaves out
15Frontier: simulated usersResearch1 min
Can a model of a person test a design for us? Cognitive architectures can now see a screen, move a simulated hand and make errors, and run on a design before anyone builds it. Reinforcement-learning agents, bounded by human limits, an approach called computational rationality, are used to optimize layouts and keyboards. Language models are offered as simulated users, answering surveys or trying an interface. They're cheap, and of unknown fidelity, which was Part 46's warning. And evaluating AI interfaces means measuring the human with the assistant: time, errors and over-reliance, not the model's benchmark score.
And the open problems. Fidelity: how close must a simulated user be before its verdict on a design can be trusted? Errors: models of time are good, and models of errors and learning are much weaker. Long-term use: habits, fatigue and trust over months, not one session. And whose user: simulated users built from one population may design for that population only.
What it does: What is new; open problems
Recap, problems, and the road aheadAll tracks3 min
First, your four numbers. The menu route to delete a word takes about three times as long as the shortcut. Five users find about eighty-four percent of the problems if every problem is equally findable, and about sixty percent if they differ. Angles are misjudged almost twice as much as lengths. And a new habit takes a median of about sixty-six days, with a range from eighteen to two hundred and fifty-four. Where the psychology is quantitative, design can be predicted before it's built.
Part fifty-two in twelve lines. The Model Human Processor: three processors with cycle times. The keystroke-level model: add the operators. When operators overlap, shorten the critical path. Measure throughput from where the clicks land. Steering is a ratio, not a logarithm. Hick's law needs a practised user. Foragers leave a page by the marginal value theorem. There are two gulfs, and affordances need signifiers. Five users find less than promised. Position beats length beats angle beats area. Contrast and colour are psychophysics. And habits take months, while dark patterns turn our biases against us.
Where this comes back. Selection, training and the design of work are Part 53. Learning and practice in classrooms are Part 54. Defaults and nudges at scale are Part 55. And minds and machines return in Part 60.
Seven problems, with full solutions in this part's README. One adds keystroke-level operators. One applies Fitts's law to a button. One computes throughput. One works the problem-discovery curve. One checks the marginal value theorem. One computes a contrast ratio. And the last, with the star, asks you to plan a test of a redesigned page by three methods. Pause here if you'd like to try them.
The books and papers behind this part are listed here and in the README. Card, Moran and Newell's book founded the engineering models; Norman's is the classic on everyday design; and Ware's is the best on perception for visualization.
Two parts of Act Twelve are done. This one designed the interface around the person. The next turns to the people themselves: who to hire, how to train them, and what makes work go well. Can a test predict who will do a job well? Part 53: people at work.
Where it goes next. Part 53 turns from the interface to the people (selection and training); Part 55 scales defaults and nudges; Part 60 returns to minds and machines.
Key results
The part's results in one place, for revision.
Try it
Lab 52 · Designing for Minds
Predict task times by adding operators, measure pointing as throughput, and see why five users find fewer problems than the famous curve promises.
python -m videos.psychology.labs 52
needs numpy, scipy, matplotlib · download lab52.py ·
source on GitHubKLM: shortcut; menu (s) 2.75; 8.35
throughput at three IDs (bit/s) 3.32, 4.10, 4.25; mean 3.89
unfamiliar menu: best breadth for 64 items 8
foraging: leave a page after (travel 20 s) 29.1 s
five users: equal p; unequal p 0.84; 0.63
chart error (log2): position, length, angle, area 1.33, 1.60, 2.39, 3.25
contrast: #767676 on white 4.54 : 1
The keystroke-level model and Fitts's law predict skilled performance well; the five-user rule and the 21-day habit were rules of thumb, and the measured numbers are less flattering.
The code (62 lines; it asserts its own result)
"""Lab 52: designing for minds: the keystroke-level model, pointing throughput, menus, foraging, the
problem-discovery curve, graphical perception and contrast."""
import numpy as np
from videos.coursekit import labs
from explainer.psychology.psyche import work as Wk
TITLE = "Designing for Minds"
GOAL = ("Predict task times by adding operators, measure pointing as throughput, and see why five users find fewer "
"problems than the famous curve promises.")
TASKS = [
"Write a keystroke-level model for logging in with a password manager and without one. Which operators dominate?",
"Make the problems equally findable (a = b large, same mean). How close does the simulated curve come to "
"1 - (1 - p)^n?",
"Find a text colour on white that just passes 4.5 : 1 and one that just fails.",
]
def run(seed=0):
out = labs.Lab()
t = {k: Wk.klm_time(v) for k, v in {"shortcut": "MKKKKK", "menu": "HMPBBMPBBMPBB"}.items()}
assert t["menu"] > 2.5 * t["shortcut"]
out.row("KLM: shortcut; menu (s)", f"{t['shortcut']:.2f}; {t['menu']:.2f}")
f = [Wk.fitts_effective(n=40, distance=d, width=w, a=0.2, b=0.2, seed=seed + i)
for i, (d, w) in enumerate([(64, 32), (256, 16), (512, 8)])]
tp = np.mean([x["throughput"] for x in f])
assert 2.5 < tp < 5.5
out.row("throughput at three IDs (bit/s)", ", ".join(f"{x['throughput']:.2f}" for x in f) + f"; mean {tp:.2f}")
m = Wk.menu_time(practised=False, read=0.25)
out.row("unfamiliar menu: best breadth for 64 items", str(int(m["breadth"][np.argmin(m["time"])])))
lv = Wk.mvt_leave(20.0)
out.row("foraging: leave a page after (travel 20 s)", f"{lv['t']:.1f} s")
d = Wk.discovery(np.array([1, 5, 15]), a=0.6, b=1.34, seed=seed + 7)
assert d["hetero"][1] < d["homog"][1]
out.row("five users: equal p; unequal p", f"{d['homog'][1]:.2f}; {d['hetero'][1]:.2f}")
errs = {e: Wk.graphical_error(e, seed=seed + 9)["log_err"] for e in ("position", "length", "angle", "area")}
assert errs["position"] < errs["angle"] < errs["area"]
out.row("chart error (log2): position, length, angle, area", ", ".join(f"{v:.2f}" for v in errs.values()))
out.row("contrast: #767676 on white", f"{Wk.contrast_ratio((118, 118, 118), (255, 255, 255)):.2f} : 1")
out.note = ("The keystroke-level model and Fitts's law predict skilled performance well; the five-user rule and "
"the 21-day habit were rules of thumb, and the measured numbers are less flattering.")
fig, ax = labs.figure(2, size=(11, 4.0))
n = np.arange(1, 21)
dd = Wk.discovery(n, a=0.6, b=1.34, seed=seed + 3)
ax[0].plot(n, dd["homog"], label="all problems alike")
ax[0].plot(n, dd["hetero"], label="problems that differ")
ax[0].set(title="problems found", xlabel="users", ylabel="share")
ax[0].legend()
mm = Wk.menu_time()
ax[1].plot(mm["breadth"], mm["time"], "o-", label="practised")
ax[1].plot(m["breadth"], m["time"], "o-", label="unfamiliar")
ax[1].set(xscale="log", title="64 items: time by breadth", xlabel="items per menu", ylabel="seconds")
ax[1].legend()
out.fig = fig
return out
if __name__ == "__main__":
print(run())
Now change it
- Write a keystroke-level model for logging in with a password manager and without one. Which operators dominate?
- Make the problems equally findable (a = b large, same mean). How close does the simulated curve come to 1 - (1 - p)^n?
- Find a text colour on white that just passes 4.5 : 1 and one that just fails.
Problems, with solutions
Try each problem before opening its solution.
-
A keystroke-level model. Predict with the keystroke-level model:
H M P B B H M K K K K(K = 0.28 s).Solution
H + M + P + B + B + H + M + 4K = 0.4 + 1.35 + 1.1 + 0.1 + 0.1 + 0.4 + 1.35 + 1.12 = 5.92 s.
-
Fitts's law. Fitts's law \(MT = 0.2 + 0.2\,ID\), \(ID = \log_2(D/W + 1)\): a 20-pixel button 300 pixels away.
Solution
ID = log2(300/20 + 1) = 4 bits; MT = 0.2 + 0.2 x 4 = 1.0 s.
-
Throughput. Endpoints with SD 6 pixels, distance 256, mean time 0.9 s: find \(W_e\), \(ID_e\) and the throughput.
Solution
We = 4.133 x 6 = 24.8 px; IDe = log2(256/24.8 + 1) = 3.50 bits; TP = 3.50/0.9 = 3.9 bit/s.
-
Discovery. Each problem is found by each user with \(p = 0.2\): what share do 5 users find, and how many users for 90%?
Solution
1 - 0.8^5 = 0.67; 1 - 0.8^n >= 0.9 needs n >= ln 0.1/ln 0.8 = 10.3, so 11 users (if every problem really had p = 0.2).
-
The marginal value theorem. A patch gives \(g(t) = 10(1 - e^{-t/30})\) facts; travel takes 20 s. Check that leaving at about 29 s satisfies \(g'(t) = g(t)/(t + 20)\).
Solution
g(29) = 10(1 - e^(-0.967)) = 6.20; g'(29) = (10/30) e^(-0.967) = 0.127; g/(t + 20) = 6.20/49 = 0.127. Equal.
-
Contrast. Relative luminances 0.18 and 1.0: find the contrast ratio. Does it pass AA for normal text?
Solution
(1.0 + 0.05)/(0.18 + 0.05) = 4.57: it passes AA for normal text (4.5), narrowly.
-
★ A test plan. Plan a test of a redesigned settings page: a keystroke-level comparison, a usability test, and an experiment, with what each can and cannot tell you.
Solution
A keystroke-level comparison of the old and new pages for the common tasks (fast, for skilled users, no errors); a think-aloud test with five to eight users per round, iterated, to find problems (not rates); then a randomized experiment on live traffic with a preregistered metric (task completion, time, support contacts) and a sample size from a power analysis. Each answers a different question: how fast an expert could be, what goes wrong, and whether the change helps on average.
Notes and sources
Sources
- W. D. Gray, B. E. John and M. E. Atwood, Project Ernestine: validating a GOMS analysis for predicting and explaining real-world task performance, Human-Computer Interaction 8 (1993) 237-309.
- S. K. Card, T. P. Moran and A. Newell, The Psychology of Human-Computer Interaction (Erlbaum, 1983); S. K. Card, T. P. Moran and A. Newell (1980); J. R. Olson and G. M. Olson (1990); B. E. John and D. E. Kieras (1996).
- P. M. Fitts (1954); I. S. MacKenzie (1992); R. W. Soukoreff and I. S. MacKenzie, Towards a standard for pointing device evaluation, International Journal of Human-Computer Studies 61 (2004) 751-789; J. Accot and S. Zhai, Beyond Fitts' law: models for trajectory-based HCI tasks, Proceedings of CHI 1997, 295-302.
- K. L. Norman, The Psychology of Menu Selection (Ablex, 1991); P. Pirolli and S. Card, Information foraging, Psychological Review 106 (1999) 643-675; E. L. Charnov, Optimal foraging, the marginal value theorem, Theoretical Population Biology 9 (1976) 129-136.
- D. A. Norman, The Design of Everyday Things (revised edition, Basic Books, 2013); J. J. Gibson, The Ecological Approach to Visual Perception (Houghton Mifflin, 1979).
- J. Nielsen and T. K. Landauer (1993); J. Spool and W. Schroeder (2001); L. Faulkner (2003); J. Brooke, SUS: a "quick and dirty" usability scale, in Usability Evaluation in Industry (Taylor and Francis, 1996) 189-194.
- W. S. Cleveland and R. McGill (1984); J. Heer and M. Bostock (2010); S. S. Stevens, Psychophysics (Wiley, 1975); C. Ware, Information Visualization: Perception for Design (Morgan Kaufmann).
- W3C, Web Content Accessibility Guidelines (WCAG) 2.1 (2018), success criterion 1.4.3 and the definitions of relative luminance and contrast ratio.
- P. Lally et al. (2010); M. Maltz (1960); A. Mathur et al., Dark patterns at scale: findings from a crawl of 11K shopping websites, Proceedings of the ACM on Human-Computer Interaction 3 (CSCW, 2019) 81.
- B. Reeves and C. Nass, The Media Equation (Cambridge University Press, 1996).
About this partfrom its README
In the late 1980s a telephone company was about to buy new workstations for its operators, expected to save time on every call. Wayne Gray, Bonnie John and Michael Atwood modelled the operators' perception, thinking and keystrokes on paper and predicted the opposite: the new workstation would be slower, by about two thirds of a second a call, because the keystrokes it saved were made while the customer was talking and the steps it added fell on the critical path. The field trial agreed. Project Ernestine is the claim of this part: enough of psychology is quantitative to do engineering with.
The viewer is offered a pointing task and predicts four numbers. Then the Model Human Processor and predictions by adding cycles; GOMS, the keystroke-level model and CPM-GOMS; pointing measured as throughput with the effective width, and the steering law; edges, corners and menu depth against breadth; information foraging and the marginal value theorem; Norman's gulfs, affordances and signifiers; the problem-discovery curve and why five users find less than promised; Cleveland and McGill's ranking, Stevens's exponents for area and what pops out; contrast, colour-vision deficiency and motor tolerance; habit formation, variable schedules and dark patterns; and conversational machines.
What is computed and built
explainer/psychology/psyche/work.pygains the Model Human Processor's cycle times, the keystroke-level model with a simplified placement of mental operators, pointing with the effective width and throughput, the steering law, a menu model of depth against breadth, the marginal value theorem for an information forager, the problem-discovery curve with equal and unequal detectability, graphical perception as Stevens's law plus noise, WCAG contrast, and habit curves. Tested intests/psychology/test_work.py.- The Ledger gains four rows.
- The course's interactive: eighteen targets to click; the page fits the reader's own Fitts's law line and throughput from where the clicks landed.
Chapter notes
| # | Chapter | What it does |
|---|---|---|
| 0 | Two thirds of a second | Project Ernestine; why fewer keystrokes can be slower; the question; objectives |
| 1 | On you: point and click, and four numbers | The pointing task; four predictions |
| 2 | The Model Human Processor | Three processors, three memories; predictions by adding cycles |
| 3 | GOMS and the keystroke-level model | GOMS; the operators; three ways to delete a word; CPM-GOMS |
| 4 | Pointing, measured | Sixteen conditions on one line; throughput; the steering law |
| 5 | Fitts and Hick in the interface | Edges, corners and touch; menu depth against breadth |
| 6 | Information foraging | The marginal value theorem; information scent |
| 7 | Gulfs, affordances and signifiers | Norman's two gulfs; affordances and signifiers |
| 8 | How many users? | The problem-discovery curve; tests, questionnaires and experiments |
| 9 | Seeing data | Cleveland and McGill's ranking; why area misleads; what pops out |
| 10 | Accessibility as psychophysics | Contrast computed; colour-vision deficiency; size, time and motor tolerance |
| 11 | Habit and attention by design | How long a habit takes; variable schedules; dark patterns |
| 12 | Talking to machines | Expectation; conversation, designed |
| 13 | The Ledger | Four rows; what they have in common |
| 14 | In practice: a checkout form, predicted | Where this is a job; two forms by keystroke-level model; what the model leaves out |
| 15 | Frontier: simulated users | What is new; open problems |
| Recap, problems, and the road ahead | Your numbers; twelve lines; payoffs; problems; references; Part 53 |
NotesWhere the numbers come from
| What | Source |
|---|---|
| The Model Human Processor: perceptual 100 ms (50 to 200), cognitive 70 ms (25 to 170), motor 70 ms (30 to 100); a simple reaction 240 ms (105 to 470), a physical match 310, a name match 380 | Card, Moran and Newell (1983) as reported; Psyche (work.mhp_reaction), item mhp |
| Keystroke-level operators K 0.28 s, P 1.1 s, B 0.1 s, H 0.4 s, M 1.35 s; deleting a word by shortcut 2.75 s, double-click 5.3 s, menu 8.35 s | Card, Moran and Newell (1980) as reported; Psyche (work.klm_time), item klm |
| A toy critical path for the hook: a call of 11.2 s becomes 11.8 s when a step is added to the path and keystrokes are saved off it | illustrative, item ernestine |
| Pointing: 16 conditions (distances 64 to 512, widths 8 to 64), 24 movements each, MT = 0.2 + 0.2 log2(D/W + 1) s with noise; fitted 0.19 + 0.20 ID, r = 0.998; mean throughput 3.8 bit/s | Psyche (work.fitts_effective), item pointing |
| The steering law: a + b A/W with a = 0.2 s, b = 0.08 s (illustrative constants) | Psyche (work.steering_time), item steering |
| Menus for 64 items: depth log_b 64, each level a Hick choice (0.2 + 0.15 log2(b + 1) s) or a linear scan (0.25 s an item) plus a 0.6 s point; practised: fastest at 64 items in one menu; unfamiliar: fastest at 8 | Psyche (work.menu_time), item menus |
| Foraging: a patch gives 10(1 - exp(-t/30)) facts; optimal stays 10, 16, 22, 29, 39 and 50 s for travel times 2, 5, 10, 20, 40 and 80 s | Psyche (work.mvt_leave), item foraging |
| Problem discovery: mean p = 0.31; 1 - (1 - p)^n gives 84% at five users; with problems' p drawn from Beta(0.6, 1.34) (same mean), 63% at five and 82% at twenty (100 problems, 400 replicates) | Psyche (work.discovery), item discovery |
| Graphical perception: perceived ratio = true ratio to the Stevens exponent (position and length 1, angle 0.85, area 0.7, volume 0.6, colour 0.5) times lognormal noise (SD 0.09 to 0.25, ordered as in Cleveland and McGill); mean absolute errors 3.7, 4.3, 7.3, 12.2, 16.5 and 21.0 points | Psyche (work.graphical_error), item charts; the exponents for angle and colour and the noise levels are illustrative |
| WCAG contrast: black on white 21, #767676 on white 4.54, #959595 on white 3.0, red on green 1.3, yellow on white 1.07, white on navy 16.0 | Psyche (work.contrast_ratio), item contrast |
| Habit: automaticity reaching 95% of its plateau at 66 days; 96 simulated people with a lognormal spread around that median (5% within 21 days; range 15 to 260) | Psyche (work.habit_curve, habit_people), item habit, after Lally et al. (2010) |
| Every published number on screen | the studies listed under Sources, quoted as reported |
Notes
| Finding | Original | Status |
|---|---|---|
| Adding standard operator times predicts skilled users' error-free task times to within about 20%. | Card, Moran and Newell 1980 | replicated |
| People judge quantities from charts most accurately by position along a common scale, then length, then angle, then area, volume and shading. | Cleveland and McGill 1984 | replicated |
| A usability test with five users finds about 85% of an interface's usability problems. | Nielsen and Landauer 1993 | contested |
| A new habit forms in about 21 days of repetition. | Maltz 1960 | failed |
Shown without a row, with the reason recorded in explainer/psychology/ledger.py: Gray, John and Atwood; Card, Moran
and Newell (1983). Fitts's law is Part 25's row.
Notes
The web-search budget for this session was spent on earlier parts, so the facts in this part come from the standard literature and were not re-checked online today; each is listed here to be checked against its source: Project Ernestine's details (the company, the size of the predicted and observed differences per call, the cost per second, the trial's length and number of operators, and the decision not to buy); the Model Human Processor's cycle times and ranges; the keystroke-level operator times, Card, Moran and Newell's 1,280 interactions and 21% error; Olson and Olson (1990); John and Kieras (1996); MacKenzie's throughput ranges for the mouse; ISO 9241-9 and the 4.133 factor; Accot and Zhai's steering law; menu depth-breadth findings; Pirolli and Card (1999); Charnov (1976); Norman's gulfs and the "Norman door"; Nielsen and Landauer's average p of 0.31 and the eleven studies; Spool and Schroeder (2001); Faulkner's range; the SUS average of about 68; Cleveland and McGill's ranking and error measure; Heer and Bostock (2010); Stevens's exponents for area and volume; the WCAG contrast thresholds and formula; the prevalence of red-green colour-vision deficiency; Lally et al.'s 96 participants, 66-day median and 18-254 range; Maltz's 21 days; Mathur et al.'s 11,000 sites and the share with dark patterns; Reeves and Nass (1996); the 200 ms gap between conversational turns; and every page range in Sources.
Companion material in this repository
The syllabus's plan for this partfrom SYLLABUS.md, the plan of record
- Hook: Project Ernestine (Gray, John and Atwood 1993).
- The Model Human Processor (Card, Moran and Newell 1983): three processors with cycle times, drawn from Acts III and V.
- GOMS and the keystroke-level model: operators with durations; predicting a task's time by adding them.
- On you: point and click at targets of different sizes and distances. Your Fitts's law line; throughput in bits per second.
- Fitts and Hick in the interface: edges and corners, menu depth against breadth; where Hick's law does not apply.
- Information foraging: users as foragers following scent (Pirolli and Card 1999; the marginal value theorem).
- Gulfs of execution and evaluation; affordances and signifiers (Norman).
- Usability testing: five users and the 1 − (1 − p)ⁿ curve, its assumptions and its critics; standard questionnaires; when to run an experiment instead (link to Computer Science, Built Part 44).
- Seeing data: graphical perception (Cleveland and McGill 1984): position beats length beats angle beats area; Stevens's exponents (Part 11) for area and volume; preattentive features (Part 18).
- Accessibility as psychophysics: contrast (Part 13), colour-vision deficiency, text size, motor tolerances.
- Habit and attention by design: variable-ratio schedules (Part 16) in products; how habits form (a median of about sixty-six days in one study, with a wide range); dark patterns catalogued.
- Conversational and AI interfaces: expectation, trust and repair (to Part 60).
Psyche: psyche.work: a keystroke-level predictor assembled from the Battery's fitted parameters; a Fitts and
steering-law pointing model; an information-foraging agent on a site graph.
On you: the pointing task; rank five chart types by your own estimation error.
Ledger: Fitts's law (replicated; one of the most robust quantitative laws in psychology); the graphical-
perception ranking (replicated, including online); "five users are enough" (contested); the twenty-one-day
habit claim (failed).
In practice: UX research and quantitative UXR, design systems, accessibility standards, data-visualization
practice; a worked keystroke-level analysis of a checkout form.
Frontier: computational models that simulate users end to end; reinforcement-learning users for design
optimization; evaluating interfaces to language models.
Reading: Card, Moran & Newell 1983; Gray, John & Atwood 1993; MacKenzie 1992; Pirolli & Card 1999; Norman,
The Design of Everyday Things; Nielsen & Landauer 1993; Cleveland & McGill 1984; Heer & Bostock 2010; Lally et
al. 2010; Mathur et al. 2019.
Build the film
python -m videos.psychology.psych52.compute # the part's numbers, into .cache/psych52
python tools/build.py psych52 # render and assemble the film
EXPLAINER_TTS=silent python tools/qa_scene.py psych52 Hook # one chapter, silent, with a contact sheet
Scenes: videos/psychology/psych52. Setup: see the course page. Source of these notes: the README and the scenes' narration.
Build it
python -m videos.psychology.psych52.compute # every number (seconds)
python tools/qa_scene.py psych52 Charts # one chapter, silent, at 480p, with a contact sheet
EXPLAINER_TTS=silent python tools/build.py psych52 -q l # the whole part, silent preview
python tools/build.py psych52 # 1080p30 with narration
python tools/qa_scene.py psych52 Usability --lang zh # the Chinese edition of one chapter
python tools/make.py psych52 # both editions, with the checks a long build needs
python -m videos.psychology.labs 52 # the lab: KLM, throughput, menus, foraging, discovery
python tools/check_ledger.py psych52 # every study shown has its Ledger row, or a reason
python -m pytest tests/psychology # Psyche's work 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.