Skip to content

Instantly share code, notes, and snippets.

@joelouismarino
Last active August 6, 2017 19:46
Show Gist options
  • Save joelouismarino/254146c17ee8678ad33492c0e9fcb88e to your computer and use it in GitHub Desktop.
Save joelouismarino/254146c17ee8678ad33492c0e9fcb88e to your computer and use it in GitHub Desktop.
import numpy as np
n_samples = 500
mean_1 = 15
std_dev_1 = 5
mean_2 = -20
std_dev_2 = 3
X = np.concatenate([np.random.normal(mean_1, std_dev_1, n_samples / 2),
np.random.normal(mean_2, std_dev_2, n_samples / 2)], axis=0)
Z = (X - np.mean(X)) / np.std(X)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment