script to sample data for likelihood computation