This preview shows page 1. Sign up to view the full content.
Correction of Question 2 (Assignment 2)
September 27, 2010
This document highlights the changes to Question 2 from
a2specification.pdf
: the changes are
bolded
and
boxed
. An incorrect formula for
variance
was originally provided in
a2specification.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
a2specification.pdf
.
Question 2: Simple Data Analysis  Correction
(30 points)
Write a program that accepts a data set in the form of a whitespace 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, ﬁve 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
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.
 Fall '07
 VERBRUGGE

Click to edit the document details