{"id":25468,"date":"2021-11-16T08:39:27","date_gmt":"2021-11-16T03:09:27","guid":{"rendered":"https:\/\/python-programs.com\/?p=25468"},"modified":"2021-11-16T08:39:27","modified_gmt":"2021-11-16T03:09:27","slug":"python-statistics-median_low-method-with-examples","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-statistics-median_low-method-with-examples\/","title":{"rendered":"Python statistics.median_low() Method with Examples"},"content":{"rendered":"

statistics.median_low() Method in Python:<\/strong><\/p>\n

The statistics.median_low() method computes the data set’s low median. Before calculating the low median, the data is also sorted in ascending order using this method.<\/p>\n

Note:<\/strong> It should be noted that if the number of data values is odd, it will return the exact middle value. If there are an even number of data values, it returns the smaller of the two middle values.<\/p>\n

Syntax:<\/strong><\/p>\n

statistics.median_low(data)<\/pre>\n

Parameters<\/strong><\/p>\n

data:<\/strong> This is Required. It is the data values that will be used (it can be any sequence, list, or iterator).<\/p>\n

Note:<\/strong> It is to be noted that if the data is empty, it returns a StatisticsError.<\/p>\n

Return Value:<\/strong><\/p>\n

Returns a float value representing the data’s low median (middle value).<\/p>\n

Examples:<\/strong><\/p>\n

Example1:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given list = [10, 20, 40, 15, 30, 13, 17]<\/pre>\n

Output:<\/strong><\/p>\n

The low median of the given list items [10, 20, 40, 15, 30, 13, 17] =  17<\/pre>\n

Example2:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given list = [2, 1, 3, 5, 7, 8]<\/pre>\n

Output:<\/strong><\/p>\n

The low median of the given list items [2, 1, 3, 5, 7, 8] = 3<\/pre>\n

statistics.median_low() Method with Examples in Python<\/span><\/p>\n