datadesk / census-data-aggregator

Combine U.S. census data responsibly
MIT License
42 stars 9 forks source link

Median MOE Fix Update #12

Closed sastoudt closed 5 years ago

sastoudt commented 5 years ago

Based on census feedback:

sastoudt commented 5 years ago

I think this version is now technically correct. It is missing a PUMS example, but I think there needs to be a separate function for that. The current approximation would work, but you could do better by just using the individual data you have from PUMS instead of inputting bins. If we merge this PR, then I can start fresh and break things up into approximate_median_acs (wouldn't need the design factor anymore) and approximate_median_pums.

sastoudt commented 5 years ago

Proof of concept of separating approximate_median_acs and approximate_median_pums here. For the more direct PUMS calculation I tried a weighted median and its MOE calculation, but I need to double check that this math is kosher.