You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/06/07 07:53:14 UTC

[GitHub] [incubator-druid] jmarxuach opened a new issue #7849: Geometric mean calculation

jmarxuach opened a new issue #7849: Geometric mean calculation
URL: https://github.com/apache/incubator-druid/issues/7849
 
 
   ### Description
   
   Most people are familiar with the “arithmetic mean”, which is also commonly called an average. Geometric mean has utility in science, finance, and statistics.
   
   A geometric mean, unlike an arithmetic mean, tends to dampen the effect of very high or low values, which might bias the mean if a straight average (arithmetic mean) were calculated.
   
   Mathematical definition: The nth root of the product of n numbers.
   
   Practical definition: The average of the logarithmic values of a data set, converted back to a base 10 number. That is : (1/count)* ( log(n1)+log(n2)+log(n3)+....)
   
   Implemetation in Driud : Now Druid has longSum, doubleSum, etc.. To get geometric mean we would need a logSum metric, and  a post-aggregation to calculate logSum/count. That's it.
   
   I thing implementation is very simple and geometric mean is very useful as a explain in motivation.   
   
   ### Motivation
   
   Geometric mean is used by scientists and biologists, and also used in many other fields, most notably financial reporting. This is because when evaluating investment returns as annual percent change data over several years (or fluctuating interest rates), it is the geometric mean, not the arithmetic mean, that tells you what the average financial rate of return would have had to have been over the entire investment period to achieve the end result. This term is also so called the Compound Annual Growth Rate or CAGR. Population biologists also use the same calculation to determine average growth rates of populations, and this growth rate is referred to as the Intrinsic Rate of Growth when the calculation is applied to estimates of population increases where there are no density-dependent forces regulating the population.
   
   Druid is the perfect tool to have financial or biologists evens and the geometric mean is essential.
   
   Thanks.
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org