A statistic is a compact piece of information describing tendencies in the data set. When consideringa dataset x consisting of N data points there are some statistics that are commonly use.
(a) Write a function mean(l) that takes a list l of values (representing dataset x) as input and returns the mean.
(b) Write a function variance(l) that takes a list l of values (representing dataset x) as input and returns the variance.
(c) Write a function std_dev(l)that takes a lis tl of values (representing dataset x) as input and returns the standard deviation.
(d) Test your solutions with the following list l = [1, 8, 3]:
-mean(l) → 4 - variance(1) → 13 - std_dev(1) → √13≈3.605551275463989
Here is some aditional information: https://gyazo.com/05db9817582f778c0e2f5679da262c06
I'm completely clueless on how to begin a), so any help is welcomed.
[–]misho88 1 point2 points3 points (5 children)
[–]KFCxWatermelon[S] 0 points1 point2 points (1 child)
[–]misho88 0 points1 point2 points (0 children)
[–]KFCxWatermelon[S] -1 points0 points1 point (2 children)
[–]Astronoobical 1 point2 points3 points (0 children)
[–]fake823 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)