From d00d580a209ffa10733497e53397713f0fec4511 Mon Sep 17 00:00:00 2001 From: orosmatthew Date: Wed, 7 Feb 2024 11:17:57 -0500 Subject: [PATCH] Print more for binomial --- binomial_coeffs.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/binomial_coeffs.py b/binomial_coeffs.py index d84b7e0..2eaacd1 100644 --- a/binomial_coeffs.py +++ b/binomial_coeffs.py @@ -19,6 +19,8 @@ normalized_coeffs = coeffs / 2 ** N print("normalized coefficients:", normalized_coeffs) expect_x = np.sum(normalized_coeffs) / len(normalized_coeffs) +print(":", expect_x) expect_x_sqrd = np.sum(normalized_coeffs ** 2) / len(normalized_coeffs) -std = np.sqrt(expect_x_sqrd - expect_x ** 2) -print("std", std) +print(":", expect_x_sqrd) +sigma_x = np.sqrt(expect_x_sqrd - expect_x ** 2) +print("sigma x", sigma_x)