Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can the median of a column of data be calculated in MapInfo Professional?

0
Posted

How can the median of a column of data be calculated in MapInfo Professional?

0

Question: The median value is not one of the aggregate functions provided with MapInfo Professional. Here’s an Internet definition of “median”: The median of an ordered list is the middle value if the number of elements is odd. If the number of elements is even, then the median is the average of the two middle values. The mean (average) depends on the distribution. If the distribution is either positively or negatively skewed, then the median will not equal the mean. ——————————————————— It’s easy enough to calculate the median in a MapBasic program, or even in a series of SQL-type statements: Select (column) from (table) Order By (column) into Temp Look at the status bar for the resulting browser window. If the number of records is even, do: Select Avg({column}) “Median” from Temp where RowID={number of records}/2 or RowID={number of records}/2+1 Into MedianFinal If the number of records is odd, do: Select ({column}) “Median” from Temp where RowID=

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123