stats_sfs.py 376B

123456789101112131415161718192021
  1. import math
  2. if __name__ == "__main__":
  3. sfs_folded_hir = {0: 575935, 1: 346313, 2: 220539, 3: 130150, 4: 69989, 5: 33768, 6: 41031}
  4. n = len(sfs_folded_hir.values())
  5. pi = 0
  6. s_prime = 0
  7. for i in range(1, n-1):
  8. pi += i * (n-1) * sfs_folded_hir[i-1] / math.comb(n, 2)
  9. #s_prime += math.comb() * math.comb() / math.comb()
  10. print(pi)