I am wondering if there is a "simple" formula to calculate the mode?

Printable View

- September 3rd 2009, 09:23 AMtaurusCalculate Mode
I am wondering if there is a "simple" formula to calculate the mode?

- September 3rd 2009, 10:20 AMaidan
The assumption is that you are asking a question about the mode of statistics (mean, mode, median).

If you know the definition of mode then

you know there can be 1, or 2 or n modes is a set.

To answer your question: Simply count 'em.

Nothing I know could be more simple.

Since the mode(s) can be at BOTH ends of the data set (at the same time), ordering the set doesn't help much. - September 3rd 2009, 10:23 AMtaurus
Well i need to program it and counting will be really difficult in my situation, i heard about something with a cubedroot mean average but not sure

- September 3rd 2009, 12:45 PMCaptainBlack
- September 3rd 2009, 12:58 PMMatt Westwood
Of course it can be more difficult than that when you've got a variable that can range over a continuous domain, as then you have to split your domain into intervals, and count the number of points in each interval. Where you choose your interval boundaries affects the mode, evidently ...

If I were to program the discrete model, I would arrange the points into order, and assign a variable that records the maximum so far, and a list of variables containing the values that attain that maximum. Then go thru them all point by point and as soon as I reach a value with more points in it than the maximum, throw away the list and start it again with this value. If there's a value for which the number of points equals the maximum, add that value to the list of values that attain that maximum. The only time-consuming bit is the sort algorithm.