Correction of Question 2 (Assignment 2)September 27, 2010This document highlights the changes to Question 2 froma2--specification.pdf: the changes areboldedandboxed. An incorrect formula forvariancewas originally provided ina2--specification.pdf, but thiserror has since been corrected.Note that the results in the originalsample session are correct. The samplesession provided here is exactly the same as the one originally shown ina2--specification.pdf.Question 2: Simple Data Analysis - Correction(30 points)Write a program that accepts a data set in the form of a white-space separated list of integers in therange [1,3] and calculates the mode, the frequency of the mode, the mean (μ) and the variance for thisdata set.Themodeis the value that occurs most frequently in a data set.For example, if the dataset contains two 1s, five 2s and one 3, then the mode for this data set is 2 and the mode frequency is5.A data set can have more than one mode; when that is the case, your program MAYreport only one of the modes.
This is the end of the preview.
access the rest of the document.