What does The Sandbox, Determinism and Active Inference conclude, in numbers, about “Markov Blankets and the Boundary of the Individual”?
Answer: The internal and external states are correlated at 0.228: the inside "knows" something about the outside. Controlling for the current sensory state alone is not enough (partial correlation \(-0.045\)), because the internal state's past carries information about the external state's past; once the internal state's own past is counted as part of the blanket, the partial correlation falls to \(-0.001\). The same holds on the other side: the internal state and the next external state are correlated at \(-0.174\) (action pushes back on the world), and almost zero once action and the current external state are controlled for. Two things follow: in this model the blanket does separate inside from outside, and in a dynamic system the "blanket" must include time; it cannot be read off the sensory input of a single instant.
Scope of the numbers: Marked boxes separate published evidence, runnable Python calculations (15 programs, all checked), classical sources and the author's hypotheses. This book is not psychotherapy or diagnosis; its account of old priors driving repeated setbacks is a hypothesis and a cross-disciplinary analogy and never implies that victims are responsible for what happened to them.
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: -0.001, -0.045, -0.174, 0.228
| samples: 59000 | |
| corr(mu, eta) | = +0.228 |
| corr(mu, eta | s) | = -0.045 |
| corr(mu, eta | s, mu_prev) | = -0.001 |
| corr(mu, eta_next) | = -0.174 |
| corr(mu, eta_next | a, eta) | = -0.002 |
Key formula
Show the full program
# A Markov blanket in a linear-Gaussian loop (a toy model). External state eta, sensory state s,
# internal state mu, active state a:
# s_t = eta_t + e1; mu_t = 0.9 mu_{t-1} + 0.3 s_t + e2; a_t = mu_t + e3;
# eta_{t+1} = 0.95 eta_t - 0.5 a_t + e4 (action pushes back on the world)
# Test: is mu_t independent of eta_t once the blanket (s_t and mu's own past) is known?
import random, math
rng = random.Random(7)
T = 60000
eta, mu = 0.0, 0.0
rows = []
for t in range(T):
s = eta + rng.gauss(0, 0.5)
mu_prev = mu
mu = 0.9 * mu + 0.3 * s + rng.gauss(0, 0.5)
a = mu + rng.gauss(0, 0.5)
eta_next = 0.95 * eta - 0.5 * a + rng.gauss(0, 0.5)
rows.append((eta, s, mu_prev, mu, a, eta_next))
eta = eta_next
rows = rows[1000:]
col = {k: [r[i] for r in rows] for i, k in enumerate(("eta", "s", "mu_prev", "mu", "a", "eta_next"))}
def residual(y, xs):
"""Ordinary least squares of y on xs (with intercept); returns the residuals."""
X = [[1.0] + [x[i] for x in xs] for i in range(len(y))]
p = len(X[0])
XtX = [[sum(r[i] * r[j] for r in X) for j in range(p)] for i in range(p)]
Xty = [sum(r[i] * yy for r, yy in zip(X, y)) for i in range(p)]
for i in range(p): # Gauss-Jordan elimination
piv = XtX[i][i]
XtX[i] = [v / piv for v in XtX[i]]; Xty[i] /= piv
for j in range(p):
if j != i:
f = XtX[j][i]
XtX[j] = [vj - f * vi for vj, vi in zip(XtX[j], XtX[i])]; Xty[j] -= f * Xty[i]
return [yy - sum(b * v for b, v in zip(Xty, r)) for r, yy in zip(X, y)]
def corr(x, y):
mx, my = sum(x) / len(x), sum(y) / len(y)
sxy = sum((a - mx) * (b - my) for a, b in zip(x, y))
return sxy / math.sqrt(sum((a - mx) ** 2 for a in x) * sum((b - my) ** 2 for b in y))
def pcorr(x, y, given):
g = [col[k] for k in given]
return corr(residual(col[x], g), residual(col[y], g)) if g else corr(col[x], col[y])
print(f"samples: {len(rows)}")
for x, y, given in (("mu", "eta", []), ("mu", "eta", ["s"]), ("mu", "eta", ["s", "mu_prev"]),
("mu", "eta_next", []), ("mu", "eta_next", ["a", "eta"])):
label = f"corr({x}, {y}" + (f" | {', '.join(given)})" if given else ")")
print(f"{label:34s} = {pcorr(x, y, given):+.3f}")Single source and citation
Fan, Y. (2026). The Sandbox, Determinism and Active Inference (Version 1.0.0), Chapter 3: Markov Blankets and the Boundary of the Individual. 5D Library. https://doi.org/10.5281/zenodo.23738794
DOI: 10.5281/zenodo.23738794 · Read the monograph · 5DL-B-015 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026015,
author = {Fan, Yafu},
title = {The Sandbox, Determinism and Active Inference},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
doi = {10.5281/zenodo.23738794},
url = {https://doi.org/10.5281/zenodo.23738794}
}Other chapter answers in this book
- Chapter 1 · The Bayesian Brain and the Self-Fulfilling Prophecy
- Chapter 2 · Two Routes: Change the Mind, or Change the World
- Chapter 4 · Escaping the Local Optimum: Exploration and Exploitation
- Chapter 5 · Structured Sandboxes and the Reshaping of Priors
- Chapter 6 · Determinism, Chaos and Agency
- Chapter 8 · Practice and a Pre-Registered Trial