Skip to content

Instantly share code, notes, and snippets.

@stucchio
Last active Aug 4, 2017
Embed
What would you like to do?
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