Tally Lab

  • Tally Lab report form, .doc

    Background
    A researcher wishes to calculate some statistical properties for a collection of
    data values. The data values are represented by the array tally.
    The indexes of the array represent the possible values of the actual data values
    from zero to the maximal value (15 in the example below). Each array location
    contains the frequency (number of occurrences) of the value corresponding to its
    index. In the example below, tally[4] is 10, which means that the value 4 occurs
    ten times in the collection of data; whereas tally[8] is 0, which means that
    the value 8 does not occur in the data collection.

    tally

    Value      0   1    2   3   4   5   6   7   8   9   10   11   12   13   14    15
    Frequency  0   0   10   5  10   0   7   1   0   6    0   10    3    0    0     1
    

    Assignment Part 1 - "Tally" array

    Assignment Part 2 - findMax() function
    Assignment Part 3 - calculateModes() function
    Assignment Part 4 - kthDataValue() function