Thumbtack · Statistics & Data Analysis
Compute weighted response rates by job category
TrueInterview
October 7, 2026 · 1 min read
You are given a CSV file with one row per job posting and the following columns:
job_idjob_categoryinvitations_sent(integer, expected to be >= 0)provider_responses(integer, expected to be >= 0)regioncreated_at(ISO date)
Write pandas code that does the following:
- Compute a per-job
response_rate = provider_responses / invitations_sent. Treatinvitations_sent = 0as missing and exclude those rows. - Produce an invitation-weighted response rate for each
job_category, with a 95% Wilson score confidence interval. - Return the top 5
job_categoryvalues ranked by the weighted response rate, breaking ties by the lower bound of the confidence interval. - Handle outliers robustly: rows where
provider_responses > invitations_sent, rows with negative values, and rows with impossible dates must be logged and dropped. - Verify that the job-level weighted average equals the overall response rate computed from the aggregated numerators and denominators, within a tolerance of
1e-9.
Hints (3)
Loading comments…