Result Size: 625 x 571
โ€‹x
 
# Import statistics Library
import statistics 
โ€‹
# Calculate the median of grouped continuous data
print(statistics.median_grouped([1, 2, 3, 4]))
print(statistics.median_grouped([1, 2, 3, 4, 5]))
print(statistics.median_grouped([1, 2, 3, 4], 2))
print(statistics.median_grouped([1, 2, 3, 4], 3))
print(statistics.median_grouped([1, 2, 3, 4], 5))
โ€‹
2.5
3.0
2.0
1.5
0.5