Google-sheets – Median/Percentiles for “histogram-style data”

google sheets

I have data in the following format:

actions | users
1       | 321000
2       | 104520

The first row represents 321,000 users taking 1 action, and the next row represents 104,520 users taking 2 actions.

How can I calculate the median and percentiles for this data? Even better if there is a way to convert this data to something where I can easily use all the normal functions to calculate the mean, cdf, etc.

Best Answer

=MEDIAN(B2:B3)
=AVERAGE(B2:B3)
=ARRAYFORMULA(IF(LEN(B2:B), NORMSDIST(B2:B),))
=FREQUENCY(B2:B3, A2:A3)

0