The statistics.median_high()
method is used to return the high median value of a group of data.
The high median value of a group of data is simply the higher middle value of that data.
``statistics.median_high(data)``
Parameter | Description |
---|---|
data |
This is required. It is the data you are working with. It could be a list, sequence, or iterator. |
The statistics.median_high()
method returns a float value, which represents the high median value of a group of data when arranged in ascending or descending order.
Now, let’s use the statistics.median_high()
method to find the median of grouped continuous data.
import statisticsdata1 = [1, 2, 3, 4,]# using the data parameter aloneprint('The high median value of the data is:', statistics.median_high(data1))data2 = [1, 2, 3, 4, 5, 6]print('The high median value of the data is:', statistics.median_high(data2))
data1
.statistics.median_high()
method.data2
.statistics.median_high()
method .