-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed as not planned
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug description:
import statistics
# declaring a simple data-set consisting of real valued
# positive integers.
set1 =[1, 2, 3, 3, 4, 4, 4, 5, 5, 5,6]
# In the given data-set
# Count of 1 is 1
# Count of 2 is 1
# Count of 3 is 2
# Count of 4 is 3
# Count of 5 is 2
# Count of 6 is 1
# We can infer that 4 has the highest population distribution
# So mode of set1 is 4
# Printing out mode of given data-set
print("Mode of given data set is % s" % (statistics.mode(set1)))
Output
Mode of given data set is 4
Issue : Mode should be Binomal for set having same count of two different numbers. In above set output mode should be 4 & 5
Check this is priority as there are lot of business requirements should solve on statistics
CPython versions tested on:
3.12
Operating systems tested on:
Windows
Metadata
Metadata
Assignees
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error