Implement p-mean in excel

感情迁移 提交于 2019-12-17 21:23:11

问题


I'm spreadsheeting my favorite albums and I'd like the good tracks on the album to count more for its average than the bad songs. I thought about geometric means, but those do the opposite of what I want.

I found the p-mean, which approaches the maximum of the dataset as p goes to infinity:

Is there any way to implement this formula in only one cell? If p=2, I can use sqrt(sumsq()) but I'm not sure how to implement it if p > 2. It's impractical for me to add adjacent cells in each column.


回答1:


Here's how I ended up doing it:

=(SUM(IF(ISNUMBER(E2:E99),E2:E99^N))/COUNT(E2:E99))^(1/N)

This is an array formula, so it must be entered with ctrl + shift + enter rather than just enter.

Credit goes to Scott Craner.



来源:https://stackoverflow.com/questions/59046952/implement-p-mean-in-excel

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!