Princess Serrano
Eternal Poster
- Joined
- Apr 2, 2016
- Posts
- 429
- Reaction
- 285
- Points
- 285
Supposed to be im going to create an java console program that computes the basic statistics function ( mean median and mode ) .
For mean and median, they are okay because they are powered by formula. But how about Mode? Regardless the formula for mode, but the basic operation is to count which data has the highest frequency.
For example.
I let my user to input the number of data.
Data to be input { 2,5,5,6,4,7 }
Number of data = 6
After i ask the number of data then i will create and initialized an array where datas would be inputed.
Now, imagine the stored value are { 2,4,5,5,5,6,2,8,8 }
Seeing the data given, we can quickly conclude that 5 is the mode for it has the greater number of occurence.
This is the question: How could i determined which number in the given data has the greatest number of occurence.
I hope you understand, i will wait for your feedback. Thanks and Godbless.
For mean and median, they are okay because they are powered by formula. But how about Mode? Regardless the formula for mode, but the basic operation is to count which data has the highest frequency.
For example.
I let my user to input the number of data.
Data to be input { 2,5,5,6,4,7 }
Number of data = 6
After i ask the number of data then i will create and initialized an array where datas would be inputed.
Now, imagine the stored value are { 2,4,5,5,5,6,2,8,8 }
Seeing the data given, we can quickly conclude that 5 is the mode for it has the greater number of occurence.
This is the question: How could i determined which number in the given data has the greatest number of occurence.
I hope you understand, i will wait for your feedback. Thanks and Godbless.