1. ## Calculate Mode

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

2. Originally Posted by taurus
I am wondering if there is a "simple" formula to calculate the mode?
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.

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.

3. 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

4. Originally Posted by taurus
I am wondering if there is a "simple" formula to calculate the mode?
No.

CB

5. 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.