1. Learn
  2. /
  3. Courses
  4. /
  5. Experimental Design in Python

Connected

Exercise

Random assignment of subjects

Having built trust from your last work with the agricultural firm, you have been given the task of properly setting up the experiment.

Use your knowledge of best practice experimental design set up to assign the sheep to two even groups of 250 each.

The weights DataFrame is available for you to use. Additionally, numpy and pandas have been imported as np and pd respectively.

Instructions

100 XP
  • Randomly select 250 subjects from the weights DataFrame into a new DataFrame group1 without replacement.
  • Put the remaining 250 subjects into group2.
  • Concatenate the descriptive statistics of your two newly created DataFrames.