jmmastey/level_up_exercises — pull request #277 by paulh16 (2014-11-18 17:28:55+00:00)
Title: Data Science PGH - Iteration 2

**Major changes in this iteration:**

In this iteration, I rewrote the program according to Joe's recommendation to rethink my objects. I have two objects now: ConversionTest and Cohort. ConversionTest runs the A/B split test and consists of two Cohort objects, one for the test group, and a second for the control group.

Each Cohort has two attributes: number of conversions and number of non-conversions. I did not include the date in the original JSON file because it isn't needed and simplifies the class.

After the JSON file is parsed with .json_parser.rb, the data is imported into a ConversionTest object with `#import_data`. The data is partitioned into the two cohorts with `#partition_data`; the conversions and non_conversions attributes of the Cohort is then updated.

The rest of the program is basically asking the ConversionTest and Cohort objects for information:

* Conversion Test: Confidence Level of the two Cohorts in the test
* Cohort: Size; Conversion Rate; Standard Error; and Error Bars for a particular cohort

**Usage:**

To run the program, simply type the following to initiate the program:
* `bin/data_science` (to use the default file), or
* `bin/data_science user_data_file.json` (for a user-provided file)