I know, basic stuff. Before diving back into exploratory data analysis (EDA) doing a little warm up.
The “average”. You add up a bunch of numbers and divide by how many numbers you have. Gets the average of them all.
The middle score of a distribution. You line up the numbers in order and the one in the middle (or average of middle two).
The score that appears most frequently in and ordered list.
Take one score. Add everything up, divide it by the score. Multiply by 100 and viola, you have a part of the whole.
X = order the values in data set.
n = number of values in set.
from statistics import mean def Av(lst): return mean(lst) # Driver Code holder = [10,20,30,40,50,60] average = Av(holder) print(average) #35
from statistics import median list = [2,4,5,6] med = statistics.median(list) print(float(med)) #4.5
from statistics import mode statistics.mode(["red", "blue", "blue", "red", "green", "red", "red"]) #Red
def perc(input, numlist): return input / sum(numlist) * 100 perc(3,[1,2,3]) #50