问题
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