Errata - Correction of Question 2 (Assignment 2) September...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Correction of Question 2 (Assignment 2) September 27, 2010 This document highlights the changes to Question 2 from a2--specification.pdf : the changes are bolded and boxed . An incorrect formula for variance was originally provided in a2--specification.pdf , but this error has since been corrected. Note that the results in the original sample session are correct . The sample session provided here is exactly the same as the one originally shown in a2--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 the range [1 , 3] and calculates the mode, the frequency of the mode, the mean ( μ ) and the variance for this data set. The mode is the value that occurs most frequently in a data set. For example, if the data set contains two 1s, five 2s and one 3, then the mode for this data set is 2 and the mode frequency is 5. A data set can have more than one mode; when that is the case, your program MAY
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/22/2011 for the course COMP 202 taught by Professor Verbrugge during the Fall '07 term at McGill.

Ask a homework question - tutors are online