Evidence

s843.py

Download source fileOpen in research workspace
from research import *
s=begin(843,'Build the complete Esau joint-category table','What cell structure lies beneath the equal490/60 marginals?',{},['File58 §13.1 nine printed rows'])
p=json.loads((ROOT/'model/list_inputs.json').read_text());rows=p['tables']['esau']['rows'];joint=[[0,0],[0,0]];data=[]
for x in rows:
    species,purity,sex,count=x['cells'];count=int(count);i=int(purity=='unclean');j=int(sex=='male');joint[i][j]+=count
    data.append({'species':species,'purity':purity,'sex':sex,'count':count})
out={'rows':data,'joint_clean_unclean_by_female_male':joint,'purity_totals':[sum(x) for x in joint],'sex_totals':[sum(x[j] for x in joint) for j in range(2)]}
a=artifact('model/Esau_joint_measurements.json',json.dumps(out,indent=2)+'\n')
finish(s,{'joint_table':a,**{k:v for k,v in out.items() if k!='rows'}},'The complete joint table is[[440,50],[50,10]]. Equal490/60 marginals arise because the two off-diagonal cells agree, while purity and sex remain different classifications.','Identify the exact constraint and freedom behind that equality.',{'joint':joint==[[440,50],[50,10]],'both_marginals':out['purity_totals']==out['sex_totals']==[490,60]})

Linked sources and evidence

Edition and provenance

s843.py

SHA-256 dea39b921d713937f5a65112894daa5f5c97f73ae787fea06de00a25080dc162

C480–C1634/Research_Cycles/C0832_C0931/evidence/s843.py