Median

In statistics, Median is the number sitting in the middle of a sorted set of numbers.


// not the actual way to do it, just pointing out the idea
const median = (sortedArray) => sortedArray[array.length/2]

const x = [1,2,3,4,5]

median(x) // 3


Median ~= 50th PercentilePercentile
In statistics, n-th percentile represents the value below which n% records can be found. It's calculated by sorting a data set and dividing it into 100 equal groups, and then dividing the same data...

Also see MeanMean
In Statistics, Mean is the thing you normally know as "average". It's calculated by summing all numbers and then dividing the sum by the number of numbers.

// not the actual way to do it, just po...
and ModeMode
In statistics, Mode is the most common number in a data set.


// not the actual way to do it, just pointing out the idea
const mode = (arr) => arr.reduce((acc, el) => {
acc.counters[el] = a...
.


Status: #🌲