What does Visual Saliency and Interface Cognition conclude, in numbers, about “Practice and a Pre-Registered Test”?

Answer: Chapter 8 gives a four-step checklist (salience, legibility, choice and pointing, evidence) and a pre-registered online randomised trial to be run by independent researchers (single primary outcome the log time to a correct click on the target, smallest effect of interest a 10 % shorter geometric-mean time, 158 analysable and 190 recruited per arm for 90 % power, decision rule written as code). Marked boxes separate published evidence, runnable Python calculations (16 programs), classical sources and the author's models and hypotheses; all pages, brands and data in the book are fictional or simulated.

Scope of the numbers: Marked boxes separate published evidence, runnable Python calculations (16 programs), classical sources and the author's models and hypotheses; all pages, brands and data in the book are fictional or simulated.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 10, 158, 190, 90

assumed sd of the outcome 0.333; implied practice correlation 0.58 (planning value 0.5)
normal approximation, 90 % power, two-sided alpha 0.05, delta = ln 0.90 = -0.1054:
   t-test 210 per arm; ANCOVA (rho 0.5) 158 per arm
simulation check (300 trials of 158 per arm, lognormal tasks, 60 s cap):
   power 0.930; mean estimate -0.1055
allowing 15 % exclusion/attrition: recruit 190 per arm, 380 in total
sensitivity (per arm, ANCOVA):        SESOI  5 %    10 %    15 %
   planning values                      664     158      67
   sd 30 % higher                     1,123     266     112
   no usable covariate                  886     210      89

Key formula

\[n = \frac{2\,(z_{0.975} + z_{0.90})^2\,\sigma^2\,(1-\rho^2)}{\delta^2},\]
Show the full program
# Sample size for the Chapter 8 pre-registered online trial. Two parallel arms, 1:1:
# X = layouts revised by the checklist (salience, contrast, Fitts distance), Y = control
# layouts; 12 find-and-click tasks on fictional shop pages. Single primary outcome: each
# participant's mean of ln(time to the correct click, s), a task not completed within
# 60 s counted as 60 s; analysed by ANCOVA on the mean ln time of 2 neutral practice
# tasks done before the layouts differ. SESOI: 10 % shorter geometric-mean time,
# delta = ln 0.90. PLANNING ASSUMPTIONS (not estimates from data): between-person sd of
# ln time 0.30, within-person task sd 0.50, practice-outcome correlation 0.5.
import math, random, statistics

Z = statistics.NormalDist().inv_cdf
DELTA, SB, SW, RHO, K = math.log(0.90), 0.30, 0.50, 0.5, 12
MU = math.log(8.0)                                 # control geometric mean 8 s per task

def n_arm(delta, sd, rho, power=0.90, alpha=0.05):
    return math.ceil(2 * (Z(1 - alpha / 2) + Z(power)) ** 2 * sd ** 2 * (1 - rho ** 2)
                     / delta ** 2)

def participant(rng, arm):
    b = rng.gauss(0, SB)                           # person effect
    pr = statistics.fmean(MU + b + rng.gauss(0, SW) for _ in range(2))
    shift = DELTA if arm else 0.0
    y = statistics.fmean(min(MU + b + shift + rng.gauss(0, SW), math.log(60.0))
                         for _ in range(K))
    return pr, y

def ancova_t(rows):
    x = [r[1] for r in rows]; g = [r[0] for r in rows]; y = [r[2] for r in rows]
    n = len(y); mx, mg, my = statistics.fmean(x), statistics.fmean(g), statistics.fmean(y)
    sxx = sum((a - mx) ** 2 for a in x); sgg = sum((a - mg) ** 2 for a in g)
    sxg = sum((a - mx) * (b - mg) for a, b in zip(x, g))
    sxy = sum((a - mx) * (c - my) for a, c in zip(x, y))
    sgy = sum((b - mg) * (c - my) for b, c in zip(g, y))
    det = sxx * sgg - sxg ** 2
    bx = (sgg * sxy - sxg * sgy) / det; bg = (sxx * sgy - sxg * sxy) / det
    res = [c - my - bx * (a - mx) - bg * (b - mg) for a, b, c in zip(x, g, y)]
    s2 = sum(r * r for r in res) / (n - 3)
    return bg, math.sqrt(s2 * sxx / det)

if __name__ == "__main__":
    sd = math.sqrt(SB ** 2 + SW ** 2 / K)
    r_pr = SB ** 2 / math.sqrt((SB ** 2 + SW ** 2 / 2) * (SB ** 2 + SW ** 2 / K))
    print(f"assumed sd of the outcome {sd:.3f}; implied practice correlation {r_pr:.2f}"
          f" (planning value {RHO})")
    n0 = n_arm(DELTA, sd, 0.0); n1 = n_arm(DELTA, sd, RHO)
    print(f"normal approximation, 90 % power, two-sided alpha 0.05, delta = ln 0.90"
          f" = {DELTA:.4f}:\n   t-test {n0} per arm; ANCOVA (rho {RHO}) {n1} per arm")
    rng = random.Random(46); hits = 0; sims = 300; est = []
    for _ in range(sims):
        rows = [(arm,) + participant(rng, arm) for arm in (0, 1) for _ in range(n1)]
        b, se = ancova_t(rows); est.append(b)
        hits += b + 1.96 * se < 0                  # CI excludes 0 on the faster side
    print(f"simulation check ({sims} trials of {n1} per arm, lognormal tasks, 60 s cap):"
          f"\n   power {hits / sims:.3f}; mean estimate {statistics.fmean(est):+.4f}")
    rec = math.ceil(n1 / 0.85 / 10) * 10
    print(f"allowing 15 % exclusion/attrition: recruit {rec} per arm, {2 * rec} in total")
    print("sensitivity (per arm, ANCOVA):        SESOI  5 %    10 %    15 %")
    for lab, s_, r_ in (("planning values", sd, RHO), ("sd 30 % higher", 1.3 * sd, RHO),
                        ("no usable covariate", sd, 0.0)):
        row = [n_arm(math.log(1 - e), s_, r_) for e in (0.05, 0.10, 0.15)]
        print(f"   {lab:32s}" + "".join(f"{v:8,d}" for v in row))

Single source and citation

Fan, Y. (2026). Computational Aesthetics, Visual Saliency Maps and Cognitive Ergonomics in User Interface Design (Version 1.0.0), Chapter 8: Practice and a Pre-Registered Test. 5D Library. https://doi.org/10.5281/zenodo.23836258

DOI: 10.5281/zenodo.23836258 · Read the monograph · 5DL-B-046 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026046,
  author    = {Fan, Yafu},
  title     = {Computational Aesthetics, Visual Saliency Maps and Cognitive Ergonomics in User Interface Design},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  doi       = {10.5281/zenodo.23836258},
  url       = {https://doi.org/10.5281/zenodo.23836258}
}

Other chapter answers in this book