Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Median - when count is even, median need to be as AVG value #2

Open
janreges opened this issue Oct 1, 2015 · 1 comment
Open

Median - when count is even, median need to be as AVG value #2

janreges opened this issue Oct 1, 2015 · 1 comment

Comments

@janreges
Copy link

janreges commented Oct 1, 2015

Hi,

thank you for UDF MEDIAN function. It works well with one issue.

From Wikipedia:

If n is odd then Median (M) = value of ((n + 1)/2)th item term.
If n is even then Median (M) = value of [((n)/2)th item term + ((n)/2 + 1)th item term ]/2

Issue is, when items count is even - for example, 2, or 4 items.

For example, for 2 items (5, 10), true median is 7.5, but MEDIAN function returns 5.

Could you implement this behavior?

Thank you very much.

@janreges
Copy link
Author

janreges commented Oct 1, 2015

Aaaa, it's already implemented in this fork :-)

TheDleo@b4c1add

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant