<!-- canonical: efficientnewlanguage.org/ai/examples/900-the-average-case-infected-three-and-the-typical-case-none | ai_layer_version: 0.1.0 | updated: 2026-09-18 -->

# Example 900 — The average case infected three and the typical case none

`the_average_case_infected_three_and_the_typical_case_none.eml` - Contact tracing finds that each case infects three others on average, the average is exact, and the quarantine plan reserves three beds per case. How the three are distributed across cases is computed below.

## EML

```eml
# Self-authored for the EML case corpus (no external origin). Contact tracing
# finds that each case infects three others on average, the average is exact,
# and the quarantine plan reserves three beds per case. How the three are
# distributed across cases is computed below.
#
# The plan is careful. The average is the real total of onward infections over
# the real number of cases; every case was traced; the beds are provisioned
# exactly at the average; and the intent is exactly 'capacity for what each case
# will cause'.
#
# Eighty of a hundred cases infect nobody and twenty infect fifteen each, so the
# average of three describes no case: the typical case needs no beds and one in
# five needs fifteen.

100 => cases
80 => cases_infecting_nobody
20 => cases_that_spread
15 => infections_per_spreader

cases_that_spread * infections_per_spreader => total_onward_infections
int(total_onward_infections / cases) => mean_infections_per_case
0 => median_infections_per_case
int(cases_that_spread * 10000 / cases) => share_of_cases_causing_all_spread_per_myriad
int(cases_infecting_nobody * 10000 / cases) => share_of_cases_causing_none_per_myriad
mean_infections_per_case * cases => beds_reserved_at_the_mean
cases_infecting_nobody * mean_infections_per_case => beds_reserved_for_cases_that_need_none
infections_per_spreader - mean_infections_per_case => beds_a_spreader_is_short

"cases traced                    : " + str(cases) ^0
"cases that infected nobody      : " + str(cases_infecting_nobody) + ", " + str(share_of_cases_causing_none_per_myriad) + " per ten thousand" ^0
"cases that spread               : " + str(cases_that_spread) + ", " + str(infections_per_spreader) + " each" ^0
"total onward infections         : " + str(total_onward_infections) ^0
"" ^0
"mean infections per case        : " + str(mean_infections_per_case) ^0
"median infections per case      : " + str(median_infections_per_case) ^0
"cases causing all the spread    : " + str(share_of_cases_causing_all_spread_per_myriad) + " per ten thousand" ^0
"" ^0
"beds reserved, 3 per case       : " + str(beds_reserved_at_the_mean) ^0
"  of them for cases needing none : " + str(beds_reserved_for_cases_that_need_none) ^0
"  short per spreading case      : " + str(beds_a_spreader_is_short) ^0
"" ^0

# ---- what the plan verified ----

"the three-beds-per-case plan" ^0
"  average : real total over real cases, " + str(mean_infections_per_case) ^0
"  tracing : every case" ^0
"  provisioning : exactly the average, per case" ^0
"  intent : capacity for what each case will cause" ^0
"  cases untraced : 0" ^0
"  verdict : EACH CASE INFECTS THREE, RESERVE THREE" ^0
"" ^0
"  tracing every case and taking the exact average is the" ^0
"  part done right here, and it is why " + str(mean_infections_per_case) + " is the true mean" ^0
"" ^0

# ---- how the three are distributed ----

"the shape behind the mean" ^0
"  most cases : " + str(cases_infecting_nobody) + " of " + str(cases) + ", infect nobody" ^0
"  a few cases : " + str(cases_that_spread) + " of " + str(cases) + ", infect " + str(infections_per_spreader) + " each" ^0
"  the mean : " + str(total_onward_infections) + " over " + str(cases) + ", " + str(mean_infections_per_case) ^0
"  cases that infect about three : none" ^0
"  so 'each case infects three' : is a true average of a" ^0
"    distribution with nobody at three" ^0
"  kin to the mean-median split in the corpus, with the" ^0
"    planning consequence made explicit" ^0
"" ^0

# ---- what the planners got ----

"the beds" ^0
"  reserved : " + str(beds_reserved_at_the_mean) ^0
"  reserved for cases that cause nothing : " + str(beds_reserved_for_cases_that_need_none) + ", idle" ^0
"  each spreading case needs : " + str(infections_per_spreader) + ", has " + str(mean_infections_per_case) + ", is short " + str(beds_a_spreader_is_short) ^0
"  is the average wrong : no; it is exact" ^0
"  does any case behave like the average : no; the average" ^0
"    is where nobody is" ^0
"" ^0

# ---- null control ----

# The same plan provisioned on the distribution - most cases need nothing, one
# in five needs fifteen - and aimed at finding the spreaders.
240 => nc_idle_beds_provisioning_at_the_mean
0 => nc_idle_beds_provisioning_on_the_distribution
12 => nc_beds_short_per_spreader_at_the_mean

"null control - provision on the distribution, not the mean" ^0
"  idle beds, provisioning at the mean : " + str(nc_idle_beds_provisioning_at_the_mean) ^0
"  idle beds, provisioning on the distribution : " + str(nc_idle_beds_provisioning_on_the_distribution) ^0
"  beds short per spreader at the mean : " + str(nc_beds_short_per_spreader_at_the_mean) ^0
"  no case and no infection changed; the plan stopped" ^0
"  provisioning for a case that does not exist" ^0
"" ^0

# ---- the rule ----

"what an exact per-case average guarantees" ^0
"  the total onward infections divided by the cases is " + str(mean_infections_per_case) + " :" ^0
"    exactly, every case traced" ^0
"  a case will cause about " + str(mean_infections_per_case) + " : not addressed; " + str(share_of_cases_causing_none_per_myriad) + " per ten" ^0
"    thousand cause none and " + str(share_of_cases_causing_all_spread_per_myriad) + " cause " + str(infections_per_spreader) + " each, so " + str(beds_reserved_for_cases_that_need_none) + " beds idle" ^0
"    and every spreader is " + str(beds_a_spreader_is_short) + " short" ^0
"" ^0

"an average is the total shared out evenly, and a total that a few produce" ^0
"shared out over everyone describes a case nobody is; the plan built for" ^0
"the average is idle where the many are and short where the few are" ^0
"" ^0

"Every case is traced and the mean is exactly " + str(mean_infections_per_case) + " - true. But " + str(cases_infecting_nobody) + " cases" ^0
"infect nobody and " + str(cases_that_spread) + " infect " + str(infections_per_spreader) + " each, so three beds per case leaves " + str(beds_reserved_for_cases_that_need_none) ^0
"idle and every spreader " + str(beds_a_spreader_is_short) + " short, until the plan follows the distribution and" ^0
"not the mean." ^0
```

## Python (deterministic transpilation)

```python
cases = 100
cases_infecting_nobody = 80
cases_that_spread = 20
infections_per_spreader = 15
total_onward_infections = cases_that_spread * infections_per_spreader
mean_infections_per_case = int(total_onward_infections / cases)
median_infections_per_case = 0
share_of_cases_causing_all_spread_per_myriad = int(cases_that_spread * 10000 / cases)
share_of_cases_causing_none_per_myriad = int(cases_infecting_nobody * 10000 / cases)
beds_reserved_at_the_mean = mean_infections_per_case * cases
beds_reserved_for_cases_that_need_none = cases_infecting_nobody * mean_infections_per_case
beds_a_spreader_is_short = infections_per_spreader - mean_infections_per_case
print("cases traced                    : " + str(cases))
print("cases that infected nobody      : " + str(cases_infecting_nobody) + ", " + str(share_of_cases_causing_none_per_myriad) + " per ten thousand")
print("cases that spread               : " + str(cases_that_spread) + ", " + str(infections_per_spreader) + " each")
print("total onward infections         : " + str(total_onward_infections))
print("")
print("mean infections per case        : " + str(mean_infections_per_case))
print("median infections per case      : " + str(median_infections_per_case))
print("cases causing all the spread    : " + str(share_of_cases_causing_all_spread_per_myriad) + " per ten thousand")
print("")
print("beds reserved, 3 per case       : " + str(beds_reserved_at_the_mean))
print("  of them for cases needing none : " + str(beds_reserved_for_cases_that_need_none))
print("  short per spreading case      : " + str(beds_a_spreader_is_short))
print("")
print("the three-beds-per-case plan")
print("  average : real total over real cases, " + str(mean_infections_per_case))
print("  tracing : every case")
print("  provisioning : exactly the average, per case")
print("  intent : capacity for what each case will cause")
print("  cases untraced : 0")
print("  verdict : EACH CASE INFECTS THREE, RESERVE THREE")
print("")
print("  tracing every case and taking the exact average is the")
print("  part done right here, and it is why " + str(mean_infections_per_case) + " is the true mean")
print("")
print("the shape behind the mean")
print("  most cases : " + str(cases_infecting_nobody) + " of " + str(cases) + ", infect nobody")
print("  a few cases : " + str(cases_that_spread) + " of " + str(cases) + ", infect " + str(infections_per_spreader) + " each")
print("  the mean : " + str(total_onward_infections) + " over " + str(cases) + ", " + str(mean_infections_per_case))
print("  cases that infect about three : none")
print("  so 'each case infects three' : is a true average of a")
print("    distribution with nobody at three")
print("  kin to the mean-median split in the corpus, with the")
print("    planning consequence made explicit")
print("")
print("the beds")
print("  reserved : " + str(beds_reserved_at_the_mean))
print("  reserved for cases that cause nothing : " + str(beds_reserved_for_cases_that_need_none) + ", idle")
print("  each spreading case needs : " + str(infections_per_spreader) + ", has " + str(mean_infections_per_case) + ", is short " + str(beds_a_spreader_is_short))
print("  is the average wrong : no; it is exact")
print("  does any case behave like the average : no; the average")
print("    is where nobody is")
print("")
nc_idle_beds_provisioning_at_the_mean = 240
nc_idle_beds_provisioning_on_the_distribution = 0
nc_beds_short_per_spreader_at_the_mean = 12
print("null control - provision on the distribution, not the mean")
print("  idle beds, provisioning at the mean : " + str(nc_idle_beds_provisioning_at_the_mean))
print("  idle beds, provisioning on the distribution : " + str(nc_idle_beds_provisioning_on_the_distribution))
print("  beds short per spreader at the mean : " + str(nc_beds_short_per_spreader_at_the_mean))
print("  no case and no infection changed; the plan stopped")
print("  provisioning for a case that does not exist")
print("")
print("what an exact per-case average guarantees")
print("  the total onward infections divided by the cases is " + str(mean_infections_per_case) + " :")
print("    exactly, every case traced")
print("  a case will cause about " + str(mean_infections_per_case) + " : not addressed; " + str(share_of_cases_causing_none_per_myriad) + " per ten")
print("    thousand cause none and " + str(share_of_cases_causing_all_spread_per_myriad) + " cause " + str(infections_per_spreader) + " each, so " + str(beds_reserved_for_cases_that_need_none) + " beds idle")
print("    and every spreader is " + str(beds_a_spreader_is_short) + " short")
print("")
print("an average is the total shared out evenly, and a total that a few produce")
print("shared out over everyone describes a case nobody is; the plan built for")
print("the average is idle where the many are and short where the few are")
print("")
print("Every case is traced and the mean is exactly " + str(mean_infections_per_case) + " - true. But " + str(cases_infecting_nobody) + " cases")
print("infect nobody and " + str(cases_that_spread) + " infect " + str(infections_per_spreader) + " each, so three beds per case leaves " + str(beds_reserved_for_cases_that_need_none))
print("idle and every spreader " + str(beds_a_spreader_is_short) + " short, until the plan follows the distribution and")
print("not the mean.")
```

## stdout (executed)

```text
cases traced                    : 100
cases that infected nobody      : 80, 8000 per ten thousand
cases that spread               : 20, 15 each
total onward infections         : 300

mean infections per case        : 3
median infections per case      : 0
cases causing all the spread    : 2000 per ten thousand

beds reserved, 3 per case       : 300
  of them for cases needing none : 240
  short per spreading case      : 12

the three-beds-per-case plan
  average : real total over real cases, 3
  tracing : every case
  provisioning : exactly the average, per case
  intent : capacity for what each case will cause
  cases untraced : 0
  verdict : EACH CASE INFECTS THREE, RESERVE THREE

  tracing every case and taking the exact average is the
  part done right here, and it is why 3 is the true mean

the shape behind the mean
  most cases : 80 of 100, infect nobody
  a few cases : 20 of 100, infect 15 each
  the mean : 300 over 100, 3
  cases that infect about three : none
  so 'each case infects three' : is a true average of a
    distribution with nobody at three
  kin to the mean-median split in the corpus, with the
    planning consequence made explicit

the beds
  reserved : 300
  reserved for cases that cause nothing : 240, idle
  each spreading case needs : 15, has 3, is short 12
  is the average wrong : no; it is exact
  does any case behave like the average : no; the average
    is where nobody is

null control - provision on the distribution, not the mean
  idle beds, provisioning at the mean : 240
  idle beds, provisioning on the distribution : 0
  beds short per spreader at the mean : 12
  no case and no infection changed; the plan stopped
  provisioning for a case that does not exist

what an exact per-case average guarantees
  the total onward infections divided by the cases is 3 :
    exactly, every case traced
  a case will cause about 3 : not addressed; 8000 per ten
    thousand cause none and 2000 cause 15 each, so 240 beds idle
    and every spreader is 12 short

an average is the total shared out evenly, and a total that a few produce
shared out over everyone describes a case nobody is; the plan built for
the average is idle where the many are and short where the few are

Every case is traced and the mean is exactly 3 - true. But 80 cases
infect nobody and 20 infect 15 each, so three beds per case leaves 240
idle and every spreader 12 short, until the plan follows the distribution and
not the mean.
```

## Round-trip

`ok: true` — round-trip fixpoint reached (python1 == python2)

## Trace event types

eml:run:start · eml:assign · eml:output · eml:run:done
