Case 974
One in twenty five carried what one in twenty five hundred had
one_in_twenty_five_carried_what_one_in_twenty_five_hundred_had.eml - A screening planner reads that a recessive condition affects one person in 2500 and reasons that its carriers - people with a single copy of the gene - must be rare as well, a handful in a town of 10000, not worth a carrier screen. How common the carriers really are is computed below.
ok: true — round-trip fixpoint reached (python1 == python2)updated 2026-09-23
EML
eml# Self-authored for the EML case corpus (no external origin). A screening planner
# reads that a recessive condition affects one person in 2500 and reasons that
# its carriers - people with a single copy of the gene - must be rare as well,
# a handful in a town of 10000, not worth a carrier screen. How common the
# carriers really are is computed below.
#
# The reasoning is careful. The rate of one in 2500 is accurate; the condition
# really is recessive, needing two copies; carriers really do have one; and the
# intent is exactly 'how many carriers are there'.
#
# An affected person needs a copy from each parent, so the rate of the condition
# is the square of the gene's frequency: one in 2500 means the gene is one copy
# in 50. A carrier needs only one, and that happens about twice in every 50
# people - so in 10000 people there are 4 affected and 392 carriers, 98 carriers
# for every affected person, and 980 of every 1000 copies of the gene sit in
# people who show nothing.
2500 => people_per_affected_person
50 => gene_copies_per_variant_copy
10000 => people_in_the_town
gene_copies_per_variant_copy * gene_copies_per_variant_copy => square_of_the_gene_rarity
int(people_in_the_town / people_per_affected_person) => affected_in_the_town
int(2 * (gene_copies_per_variant_copy - 1) * people_in_the_town / (gene_copies_per_variant_copy * gene_copies_per_variant_copy)) => carriers_in_the_town
int(carriers_in_the_town / affected_in_the_town) => carriers_per_affected_person
int(people_in_the_town / carriers_in_the_town) => one_person_in_this_many_is_a_carrier
carriers_in_the_town + 2 * affected_in_the_town => copies_in_the_town
int(carriers_in_the_town * 1000 / copies_in_the_town) => copies_carried_silently_per_mille
"condition : 1 person in " + str(people_per_affected_person) ^0
"gene, one copy in : " + str(gene_copies_per_variant_copy) + ", since " + str(gene_copies_per_variant_copy) + " squared is " + str(square_of_the_gene_rarity) ^0
"" ^0
"town : " + str(people_in_the_town) + " people" ^0
"affected : " + str(affected_in_the_town) ^0
"carriers : " + str(carriers_in_the_town) + ", one person in " + str(one_person_in_this_many_is_a_carrier) ^0
"carriers per affected person : " + str(carriers_per_affected_person) ^0
"copies of the gene in the town : " + str(copies_in_the_town) + ", " + str(copies_carried_silently_per_mille) + " per mille of them in carriers" ^0
"" ^0
# ---- what the planner verified ----
"the rare-means-rare reasoning" ^0
" rate : 1 in " + str(people_per_affected_person) + ", accurate" ^0
" inheritance : recessive, two copies needed" ^0
" carriers : people with one copy" ^0
" intent : how many carriers are there" ^0
" facts wrong : 0" ^0
" verdict : A RARE CONDITION HAS RARE CARRIERS" ^0
"" ^0
" taking the rate from a sound source is the part done right" ^0
" here, and it is why " + str(affected_in_the_town) + " affected people in " + str(people_in_the_town) + " is exactly what" ^0
" the town has" ^0
"" ^0
# ---- how common the carriers are ----
"two copies against one" ^0
" what an affected person needs : a copy from each parent, so the" ^0
" rate is the gene's frequency squared" ^0
" what one in " + str(people_per_affected_person) + " says about the gene : one copy in " + str(gene_copies_per_variant_copy) ^0
" what a carrier needs : one copy, from either parent, which" ^0
" happens about twice in every " + str(gene_copies_per_variant_copy) + " people" ^0
" the town : " + str(carriers_in_the_town) + " carriers against " + str(affected_in_the_town) + " affected, " + str(carriers_per_affected_person) + " to 1" ^0
" where the gene lives : " + str(copies_carried_silently_per_mille) + " per mille of its copies in people who" ^0
" show nothing" ^0
"" ^0
# ---- what the planner got ----
"the screening plan" ^0
" believed : a handful of carriers, not worth a screen" ^0
" actual : " + str(carriers_in_the_town) + " carriers in the town, one person in " + str(one_person_in_this_many_is_a_carrier) ^0
" is the rate wrong : no; " + str(affected_in_the_town) + " affected in " + str(people_in_the_town) ^0
" are carriers as rare as the condition : no; the condition is" ^0
" the square of the gene's rarity, and the carriers are not" ^0
"" ^0
# ---- null control ----
# The same town counted from the gene's frequency instead of by taking the
# carriers to be about as rare as the condition.
4 => nc_carriers_read_as_rare_as_the_condition
392 => nc_carriers_from_the_gene_frequency
388 => nc_carriers_the_square_root_reveals
"null control - count from the gene, not from the condition" ^0
" carriers, read as rare as the condition : " + str(nc_carriers_read_as_rare_as_the_condition) ^0
" carriers, from the gene's frequency : " + str(nc_carriers_from_the_gene_frequency) ^0
" carriers the square root reveals : " + str(nc_carriers_the_square_root_reveals) ^0
" no rate and no town changed; the rate was traced back to the" ^0
" gene before the carriers were counted" ^0
"" ^0
# ---- the rule ----
"what an accurate rate of 1 in " + str(people_per_affected_person) + " guarantees" ^0
" 1 person in " + str(people_per_affected_person) + " has two copies : exactly" ^0
" carriers are about as rare : not addressed; two copies is the" ^0
" square of the gene's frequency, the gene is one copy in " + str(gene_copies_per_variant_copy) + "," ^0
" and one person in " + str(one_person_in_this_many_is_a_carrier) + " carries one copy - " + str(carriers_per_affected_person) + " carriers for every" ^0
" affected person" ^0
"" ^0
"a rare pair is made of common halves; square a small number and it gets much" ^0
"smaller, so a condition that needs two copies hides a gene that is not rare" ^0
"at all" ^0
"" ^0
"The rate is right: " + str(affected_in_the_town) + " affected in " + str(people_in_the_town) + ". But two copies is the square of the" ^0
"gene's frequency, so the gene is one copy in " + str(gene_copies_per_variant_copy) + " and the town holds " + str(carriers_in_the_town) + " carriers," ^0
"" + str(carriers_per_affected_person) + " for every affected person, with " + str(copies_carried_silently_per_mille) + " per mille of the gene's copies in people" ^0
"who show nothing, until the carriers are counted from the gene and not from the condition." ^0Python (deterministic transpilation)
pythonpeople_per_affected_person = 2500
gene_copies_per_variant_copy = 50
people_in_the_town = 10000
square_of_the_gene_rarity = gene_copies_per_variant_copy * gene_copies_per_variant_copy
affected_in_the_town = int(people_in_the_town / people_per_affected_person)
carriers_in_the_town = int(2 * (gene_copies_per_variant_copy - 1) * people_in_the_town / (gene_copies_per_variant_copy * gene_copies_per_variant_copy))
carriers_per_affected_person = int(carriers_in_the_town / affected_in_the_town)
one_person_in_this_many_is_a_carrier = int(people_in_the_town / carriers_in_the_town)
copies_in_the_town = carriers_in_the_town + 2 * affected_in_the_town
copies_carried_silently_per_mille = int(carriers_in_the_town * 1000 / copies_in_the_town)
print("condition : 1 person in " + str(people_per_affected_person))
print("gene, one copy in : " + str(gene_copies_per_variant_copy) + ", since " + str(gene_copies_per_variant_copy) + " squared is " + str(square_of_the_gene_rarity))
print("")
print("town : " + str(people_in_the_town) + " people")
print("affected : " + str(affected_in_the_town))
print("carriers : " + str(carriers_in_the_town) + ", one person in " + str(one_person_in_this_many_is_a_carrier))
print("carriers per affected person : " + str(carriers_per_affected_person))
print("copies of the gene in the town : " + str(copies_in_the_town) + ", " + str(copies_carried_silently_per_mille) + " per mille of them in carriers")
print("")
print("the rare-means-rare reasoning")
print(" rate : 1 in " + str(people_per_affected_person) + ", accurate")
print(" inheritance : recessive, two copies needed")
print(" carriers : people with one copy")
print(" intent : how many carriers are there")
print(" facts wrong : 0")
print(" verdict : A RARE CONDITION HAS RARE CARRIERS")
print("")
print(" taking the rate from a sound source is the part done right")
print(" here, and it is why " + str(affected_in_the_town) + " affected people in " + str(people_in_the_town) + " is exactly what")
print(" the town has")
print("")
print("two copies against one")
print(" what an affected person needs : a copy from each parent, so the")
print(" rate is the gene's frequency squared")
print(" what one in " + str(people_per_affected_person) + " says about the gene : one copy in " + str(gene_copies_per_variant_copy))
print(" what a carrier needs : one copy, from either parent, which")
print(" happens about twice in every " + str(gene_copies_per_variant_copy) + " people")
print(" the town : " + str(carriers_in_the_town) + " carriers against " + str(affected_in_the_town) + " affected, " + str(carriers_per_affected_person) + " to 1")
print(" where the gene lives : " + str(copies_carried_silently_per_mille) + " per mille of its copies in people who")
print(" show nothing")
print("")
print("the screening plan")
print(" believed : a handful of carriers, not worth a screen")
print(" actual : " + str(carriers_in_the_town) + " carriers in the town, one person in " + str(one_person_in_this_many_is_a_carrier))
print(" is the rate wrong : no; " + str(affected_in_the_town) + " affected in " + str(people_in_the_town))
print(" are carriers as rare as the condition : no; the condition is")
print(" the square of the gene's rarity, and the carriers are not")
print("")
nc_carriers_read_as_rare_as_the_condition = 4
nc_carriers_from_the_gene_frequency = 392
nc_carriers_the_square_root_reveals = 388
print("null control - count from the gene, not from the condition")
print(" carriers, read as rare as the condition : " + str(nc_carriers_read_as_rare_as_the_condition))
print(" carriers, from the gene's frequency : " + str(nc_carriers_from_the_gene_frequency))
print(" carriers the square root reveals : " + str(nc_carriers_the_square_root_reveals))
print(" no rate and no town changed; the rate was traced back to the")
print(" gene before the carriers were counted")
print("")
print("what an accurate rate of 1 in " + str(people_per_affected_person) + " guarantees")
print(" 1 person in " + str(people_per_affected_person) + " has two copies : exactly")
print(" carriers are about as rare : not addressed; two copies is the")
print(" square of the gene's frequency, the gene is one copy in " + str(gene_copies_per_variant_copy) + ",")
print(" and one person in " + str(one_person_in_this_many_is_a_carrier) + " carries one copy - " + str(carriers_per_affected_person) + " carriers for every")
print(" affected person")
print("")
print("a rare pair is made of common halves; square a small number and it gets much")
print("smaller, so a condition that needs two copies hides a gene that is not rare")
print("at all")
print("")
print("The rate is right: " + str(affected_in_the_town) + " affected in " + str(people_in_the_town) + ". But two copies is the square of the")
print("gene's frequency, so the gene is one copy in " + str(gene_copies_per_variant_copy) + " and the town holds " + str(carriers_in_the_town) + " carriers,")
print("" + str(carriers_per_affected_person) + " for every affected person, with " + str(copies_carried_silently_per_mille) + " per mille of the gene's copies in people")
print("who show nothing, until the carriers are counted from the gene and not from the condition.")stdout (executed)
textcondition : 1 person in 2500
gene, one copy in : 50, since 50 squared is 2500
town : 10000 people
affected : 4
carriers : 392, one person in 25
carriers per affected person : 98
copies of the gene in the town : 400, 980 per mille of them in carriers
the rare-means-rare reasoning
rate : 1 in 2500, accurate
inheritance : recessive, two copies needed
carriers : people with one copy
intent : how many carriers are there
facts wrong : 0
verdict : A RARE CONDITION HAS RARE CARRIERS
taking the rate from a sound source is the part done right
here, and it is why 4 affected people in 10000 is exactly what
the town has
two copies against one
what an affected person needs : a copy from each parent, so the
rate is the gene's frequency squared
what one in 2500 says about the gene : one copy in 50
what a carrier needs : one copy, from either parent, which
happens about twice in every 50 people
the town : 392 carriers against 4 affected, 98 to 1
where the gene lives : 980 per mille of its copies in people who
show nothing
the screening plan
believed : a handful of carriers, not worth a screen
actual : 392 carriers in the town, one person in 25
is the rate wrong : no; 4 affected in 10000
are carriers as rare as the condition : no; the condition is
the square of the gene's rarity, and the carriers are not
null control - count from the gene, not from the condition
carriers, read as rare as the condition : 4
carriers, from the gene's frequency : 392
carriers the square root reveals : 388
no rate and no town changed; the rate was traced back to the
gene before the carriers were counted
what an accurate rate of 1 in 2500 guarantees
1 person in 2500 has two copies : exactly
carriers are about as rare : not addressed; two copies is the
square of the gene's frequency, the gene is one copy in 50,
and one person in 25 carries one copy - 98 carriers for every
affected person
a rare pair is made of common halves; square a small number and it gets much
smaller, so a condition that needs two copies hides a gene that is not rare
at all
The rate is right: 4 affected in 10000. But two copies is the square of the
gene's frequency, so the gene is one copy in 50 and the town holds 392 carriers,
98 for every affected person, with 980 per mille of the gene's copies in people
who show nothing, until the carriers are counted from the gene and not from the condition.Trace event types
eml:run:starteml:assigneml:outputeml:run:done