Page 3 Results

Page 3

Shuffling the results

# !cat page3.csv
# !shuf --output=page3.csv <page3.csv
# !cat page3.csv

Since I ran this notebook more than once, the initial CSV is now completely lost…

Per-question results

Question 0 - preparing data

We will be reading the data here, and processing later..

import csv
import numpy as np

results = []

with open('page3.csv') as csv_file:
    csv_reader = csv.reader(csv_file, delimiter=",")
    for row in csv_reader:
        results.append(list(map(int, row)))

res_array = np.array(results)
import matplotlib.pyplot as plt

def print_stats(A, bins = [x + 0.1 for x in range(-1,6)]):
    print(f"Results: {A.tolist()}")
    print(f"Mean: {np.mean(A)}")
    print(f"Median: {np.median(A)}")
    vals, counts = np.unique(A, return_counts=True)
    print(f"Mode: {vals[np.argmax(counts)]} With count: {counts[np.argmax(counts)]}")
    plt.hist(A, bins = bins, align='right')

Question 4

a.

print_stats(res_array[:,:1])
Results: [[5], [5], [5], [4], [5], [5], [3], [5], [5], [5], [5], [5], [5], [5], [5], [5], [5], [5], [4], [5], [5], [5], [5], [4], [1], [5], [5], [5], [5], [5], [5], [5]]
Mean: 4.71875
Median: 5.0
Mode: 5 With count: 27

b.

print_stats(res_array[:,1:2])
Results: [[5], [5], [5], [5], [4], [5], [1], [5], [5], [5], [5], [4], [5], [5], [5], [5], [4], [5], [3], [4], [3], [5], [5], [4], [1], [4], [4], [4], [5], [4], [5], [5]]
Mean: 4.34375
Median: 5.0
Mode: 5 With count: 19

c.

print_stats(res_array[:,2:3], bins = [x + 0.1 for x in range(-1, 11)])
Results: [[5], [10], [5], [5], [5], [10], [2], [8], [5], [10], [8], [10], [8], [10], [10], [10], [5], [5], [10], [5], [7], [10], [5], [5], [0], [10], [10], [10], [10], [3], [10], [10]]
Mean: 7.375
Median: 8.0
Mode: 10 With count: 15

Page results

print_stats(res_array, [x + 0.1 for x in range(-1, 11)])
Results: [[5, 5, 5], [5, 5, 10], [5, 5, 5], [4, 5, 5], [5, 4, 5], [5, 5, 10], [3, 1, 2], [5, 5, 8], [5, 5, 5], [5, 5, 10], [5, 5, 8], [5, 4, 10], [5, 5, 8], [5, 5, 10], [5, 5, 10], [5, 5, 10], [5, 4, 5], [5, 5, 5], [4, 3, 10], [5, 4, 5], [5, 3, 7], [5, 5, 10], [5, 5, 5], [4, 4, 5], [1, 1, 0], [5, 4, 10], [5, 4, 10], [5, 4, 10], [5, 5, 10], [5, 4, 3], [5, 5, 10], [5, 5, 10]]
Mean: 5.479166666666667
Median: 5.0
Mode: 5 With count: 56
Figure 1: Results for each question on page 3
print_stats(np.sum(res_array, axis=1), bins = [x + 0.1 for x in range(9,21)])
Results: [15, 20, 15, 14, 14, 20, 6, 18, 15, 20, 18, 19, 18, 20, 20, 20, 14, 15, 17, 14, 15, 20, 15, 13, 2, 19, 19, 19, 20, 12, 20, 20]
Mean: 16.4375
Median: 18.0
Mode: 20 With count: 10
Figure 2: Totals for page 3

After scaling

f = lambda x: x + (20 - x) / 2

print_stats(f(np.sum(res_array, axis=1)), bins = [x + 0.1 for x in range(9,21)])
Results: [17.5, 20.0, 17.5, 17.0, 17.0, 20.0, 13.0, 19.0, 17.5, 20.0, 19.0, 19.5, 19.0, 20.0, 20.0, 20.0, 17.0, 17.5, 18.5, 17.0, 17.5, 20.0, 17.5, 16.5, 11.0, 19.5, 19.5, 19.5, 20.0, 16.0, 20.0, 20.0]
Mean: 18.21875
Median: 19.0
Mode: 20.0 With count: 10
Figure 3: Totals for page 3 after scaling