The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
Median calculation problem in Aggregate function
Hi guys,
I'm using RM 5.3 and 6 versions and trying to come out with a median for my data (aggregated by an attribute value).
I realized the median calculation used is not correct. RM for both versions do not seem to take the average of 2 middle values if the number list is even.
As an example, use the following data and calculate median for DOM (aggregate by DATE):
DOM DATE
33 537
47 537
49 537
57 537
79 537
91 537
102 537
123 537
133 537
134 537
149 537
155 537
186 537
238 537
The correct answer should be 112.5
RM gives the median as 102
Thanks!
I'm using RM 5.3 and 6 versions and trying to come out with a median for my data (aggregated by an attribute value).
I realized the median calculation used is not correct. RM for both versions do not seem to take the average of 2 middle values if the number list is even.
As an example, use the following data and calculate median for DOM (aggregate by DATE):
DOM DATE
33 537
47 537
49 537
57 537
79 537
91 537
102 537
123 537
133 537
134 537
149 537
155 537
186 537
238 537
The correct answer should be 112.5
RM gives the median as 102
Thanks!
0
Answers
Good find.
Interestingly, if you sort the examples, the answer changes as in the attached. I suppose you could manually calculate the median you're after by using the two values - a bit ugly but it would work.
regards
Andrew
Also, will other functions and charting be affected in the use of the engine's median function ?(eg k-medoids, boxplot etc)
Thanks!
I don't know what would happen elsewhere regarding median calculations - we have to wait for one of those nice developers to say whilst we remain vigilant.
regards
Andrew