Answers for "what is the median"

106

median

anyone else a highly trained programmer/mathematician/statistician
and still googling this shit?
Posted by: Guest on February-10-2021
10

median

Yep i am Scary Swan
Posted by: Guest on March-11-2021
10

what is median

a median is a value separating the higher half from the lower half of a data sample, a population or a probability distribution. For a data set, it may be thought of as "the middle" value.
Posted by: Guest on August-09-2020
0

median

// Find the median of an array of numbers
function findMedian(numbers) {
  // If length of numbers is even, average the two middle numbers
  if(numbers.length % 2 === 0) {
    // Get lower middle number by dividing length by 2 and subtracting 1
    var lowerMiddle = numbers[numbers.length / 2 - 1];
    // Get upper middle number by dividing length by 2
    var upperMiddle = numbers[numbers.length / 2];
    // Return average of lower and upper middle numbers
    return (lowerMiddle + upperMiddle) / 2;
  }
  // If length of numbers is odd, return middle value by dividing length - 1 by 2 to get index
  return numbers[(numbers.length - 1) / 2];
}
Posted by: Guest on October-30-2021
1

what is a median

Median of a triange is a line that goes from a vertex of the triangle
to the midpoint of the opposite side of that vertex.
Posted by: Guest on October-14-2020

Browse Popular Code Answers by Language