Atelier des rouesLab FR
Objects/Documentation

temoin_xiv.py

Code, data or reproducible check for the fiabilite dossier.

Download ↓
"""Triangle relations under three independent site types, checked on a finite binomial model."""
from itertools import product
from fractions import Fraction as F
from math import comb,exp
import json


def experiment():
    # Three types, each consisting of two independent fair sites.
    direct=[0]*13
    for s in product((0,1),repeat=6):
        x,y,z=(s[0]+s[1],s[2]+s[3],s[4]+s[5])
        direct[x*y+y*z+z*x]+=1
    via=[0]*13
    for x,y,z in product(range(3),repeat=3):
        via[x*y+y*z+z*x]+=comb(2,x)*comb(2,y)*comb(2,z)

Read in context

Comments

Comments from both language editions appear here.

The discussion is open for reading. I’ll enable submissions once spam protection is configured.