Last active
November 14, 2022 18:14
-
-
Save lobrien/e1283e86fef5a280d52e390c176efedd to your computer and use it in GitHub Desktop.
Avg & std dev for Wordle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
rs = np.array([ [1,1], [2, 11], [3, 77], [4, 111], [5, 74], [6, 20], [7.25, 6]]) | |
vs = rs.take(indices = 0, axis=1) | |
ns = rs.take(indices = 1, axis=1) | |
mean = np.average(vs, weights = ns) | |
sd = np.sqrt(np.average((vs - mean)**2, weights=ns)) | |
(mean, sd) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment