I took the amount of people that got infected at the scratch then multiplied that by the amount of scratches it took
average = 1 * test1 + 2 * test2 + 3 * test3 + 4 * test4 ( in the actual code this goes up to 25 * test25 + 26 * surv)
(testx is the amount of people that got infected at scratchx) and I used surv as everyone who doesn't get infected after 26 scratches
then it adds it together and devides that by the total amount of people (the difference probably is because it cuts off at 25scratches and everything above that counts as 26scratches)
averageTotal = average / number
averagetotal is the average that is lets you see and the number is the total amount of people
and the average off 3 with 100,000 people is strange for me 100,000 people gets a average of around 3.99