Last active
August 4, 2017 17:09
-
-
Save stucchio/a1feca15435ef50a26fd4153a47ab4b3 to your computer and use it in GitHub Desktop.
Relates to a twitter controversy: https://twitter.com/SorryToBeKurt/status/893434749276082176
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
from scipy.stats import norm | |
from numpy import mean | |
x = norm(0,1).rvs(10000) | |
y = norm(1,1).rvs(10000) # Group Y is 1 standard deviation better than group X | |
print("Mean of group X, exceeding the cutoff: " + str(mean(x[x > 3]))) # Prints 3.22 | |
print("Mean of group Y, exceeding the cutoff: " + str(mean(y[y > 3]))) # prints 3.40 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment