Statistical Thinking in Python (Part 2)
Justin Bois
Lecturer at the California Institute of Technology
import numpy as np dem_share_both = np.concatenate( (dem_share_PA, dem_share_OH))
dem_share_perm = np.random.permutation(dem_share_both)
perm_sample_PA = dem_share_perm[:len(dem_share_PA)] perm_sample_OH = dem_share_perm[len(dem_share_PA):]
Statistical Thinking in Python (Part 2)