Re: mode, pdf, etc.




   I was looking at the decriptives stats analysis tool and since the mode 
   wasn't implemented yet I decided to check out the code for the 
   statistical function "mode" since it would be calculating the same 
   thing. But to my surprise I got the following results with the stats 
   function `mode':

   data: 8.3, 9.1, 10.5, 12.8, 17.1, 17.6, 17.6, 18.1    mode: 17.1
   data: 18.1, 17.6, 17.6, 17.1, 12.8, 10.5, 9.1, 8.3    mode: 8.3

   since it is the same data (just in a different order) the mode should 
   probably be the same  ;-)  

A quick look at the code in gnumeric_mode reveals that it needs a lot
of tender loving care.  It's bogus.  I'll correct this in the next
few days.

   In fact 17.6 would be a nice answer (and in fact the only correct
   one)!

Well, with XL compatibility as a goal, you're just never sure...
Coming from a math background I'm sure you will shake your head at
XL's definitions of (say) MEDIAN and PRODUCT.

BTW, in the long run, we should get rid of the duplicate code in the
analysis tools by using the range_* functions.

Morten




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]