Monte Carlo Club: Difference between revisions

From QiuLab
Jump to navigation Jump to search
imported>Weigang
(Created page with "==Feb 3, 2017 (Posted on Friday lab meeting)== * Download the US Presidents data set: 1st column is the order, 2nd column is the name, the 3rd column is the year of inaugurati...")
 
imported>Weigang
Line 1: Line 1:
==Feb 3, 2017 (Posted on Friday lab meeting)==
==Feb 3, 2017 (Posted on Friday lab meeting)==
* Download the US Presidents data set: 1st column is the order, 2nd column is the name, the 3rd column is the year of inauguration; tab-separated
* Download [[File:Presidents.txt|thumbnail]]: 1st column is the order, 2nd column is the name, the 3rd column is the year of inauguration; tab-separated
* Your job is to create an R, Perl, or Python script called “us-presidents”, which will
* Your job is to create an R, Perl, or Python script called “us-presidents”, which will
# Read the table
# Read the table

Revision as of 21:27, 3 February 2017

Feb 3, 2017 (Posted on Friday lab meeting)

  • Download : 1st column is the order, 2nd column is the name, the 3rd column is the year of inauguration; tab-separated
  • Your job is to create an R, Perl, or Python script called “us-presidents”, which will
  1. Read the table
  2. Store the original/correct order
  3. Shuffle/permute the rows and record the new order
  4. Count the number of matching orders
  5. Repeat Steps 3-4 for a 1000 times
  6. Plot histogram of the 1000 counts

Feb 10, 2017