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

Estimate margins of error for the sample mean using a bootstrap #120

Merged
merged 6 commits into from
Jul 10, 2024

Conversation

Nate-Wessel
Copy link
Contributor

Would resolve #118

This estimates margins of error around the sample mean using a bootstrap estimator where the unit of observation is a single hour with enough data to calculate an average travel time.

Where there is only one hour with data, we can get a mean but no margins of error. I'm currently allowing margins of error for samples > 1; it is hard to know where / if to draw a line on sample size.

returns results through the frontend and adds some fields to the backend response
The unit of observation is the "one hour average" which, while not statistically valid, should be a decent starting point, and demonstrates how margins of error can be calculated from a sample of observations
@Nate-Wessel
Copy link
Contributor Author

I consider this work done, within the scope of this issue. Bootstrap MoEs are now being calculated correctly and efficiently, and also some more useful statistical data is now coming from the backend that we can use for analysis elsewhere.

Are the margins of error reliable or easily interpretable? IMO, not yet. But that has much more to do with the 1-hour unit of observation than with the bootstrap method. Temporal binning will be addressed in a separate PR.

However: I did disable the MoE output in the frontend so it doesn't mislead anyone in the meantime.

@Nate-Wessel Nate-Wessel merged commit b18a9a8 into deploy Jul 10, 2024
1 check passed
@Nate-Wessel Nate-Wessel deleted the bootstrap-hours branch July 10, 2024 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Estimate margins of error around mean travel times
1 participant