|
|
Subscribe / Log in / New account

Some median Python NaNsense

Some median Python NaNsense

Posted Jan 8, 2020 17:04 UTC (Wed) by Hattifnattar (subscriber, #93737)
In reply to: Some median Python NaNsense by gdt
Parent article: Some median Python NaNsense

But what if someone needs higher granularity?

Say you have a survey, and you did not get numbers from some people because they cannot be reached, and from others, because they refuse to answer. Suppose you want to deal with these two types of "no value" differently.
Should Python support it too?

It seems to me it's a task for a particular library (in an object-oriented language!) to design a type that accurately represents its domain, rather than blindly use (and abuse) a native type that mostly, but not completely, does the job.
Then under the hood optimize it to your heart's content...


to post comments

Some median Python NaNsense

Posted Jan 10, 2020 2:31 UTC (Fri) by gdt (subscriber, #6284) [Link]

No higher granularity is needed for a statistics library: either the number is contributing both a value and to the population or the number is contributing solely to the population. Reason codes for non-response are certainly useful for the application to maintain, but they are irrelevant to a statistics library.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds