{"args":{},"checks":[{"abs_tol":null,"bind":"any","column":null,"failure_class":null,"field":"value","interval":false,"key":null,"kind":"tool_called","min_lre":null,"note":"","open_interval":false,"rel_tol":null,"required":true,"source_id":null,"table":null,"tool":"core.gini","value":null,"weight":1.0,"where":null},{"abs_tol":null,"bind":"any","column":null,"failure_class":null,"field":"value","interval":false,"key":"weights","kind":"arg_equals","min_lre":null,"note":"a sample survey: pass the weights","open_interval":false,"rel_tol":null,"required":true,"source_id":null,"table":null,"tool":"core.gini","value":"peso","weight":1.0,"where":null},{"abs_tol":0.03068996316010769,"bind":"any","column":null,"failure_class":null,"field":"value","interval":false,"key":"gini","kind":"figure_close","min_lre":null,"note":"headline figure against the truth","open_interval":false,"rel_tol":null,"required":true,"source_id":null,"table":null,"tool":"core.gini","value":0.4391150860545421,"weight":1.0,"where":null},{"abs_tol":null,"bind":"any","column":null,"failure_class":null,"field":"value","interval":false,"key":null,"kind":"answer_backed","min_lre":null,"note":"every number traced to a tool call or the question","open_interval":false,"rel_tol":null,"required":true,"source_id":null,"table":null,"tool":null,"value":null,"weight":1.0,"where":null},{"abs_tol":null,"bind":"any","column":null,"failure_class":null,"field":"value","interval":false,"key":null,"kind":"any_of","min_lre":null,"note":"the answer cites the expected tool's figures","open_interval":false,"rel_tol":null,"required":false,"source_id":null,"table":null,"tool":null,"value":[{"abs_tol":null,"bind":"any","column":null,"failure_class":null,"field":"value","interval":false,"key":null,"kind":"answer_cites","min_lre":null,"note":"","open_interval":false,"rel_tol":null,"required":true,"source_id":null,"table":null,"tool":"core.gini","value":null,"weight":1.0,"where":null}],"weight":1.0,"where":null}],"datasets":{"dados":{"columns":null,"description":"Uma linha por domic\u00edlio entrevistado na pesquisa amostral do munic\u00edpio; a amostra sobrerrepresenta bairros de renda mais baixa. renda_pc: renda domiciliar per capita mensal (R$); peso: peso amostral, quantas pessoas da popula\u00e7\u00e3o cada domic\u00edlio entrevistado representa; domicilio: identificador do domic\u00edlio.","file_sha256":null,"format":null,"frame_sha256":null,"generator":"magi_bench.generators:incomes","kind":"generator","licence":null,"member":null,"object":null,"params":{"median":950.0,"n":4000,"seed":1972931969,"sigma":0.94},"path":null,"read_kw":{},"records":null,"role":"agent","sha256":null,"transforms":[],"url":null}},"difficulty":"E","id":"tool_selection.inequality.test.s1004","level":"T2","meta":{"acceptable_tools":[],"expected_tool":"core.gini","family":"inequality","features":["survey_weights","distribution","inequality"],"headline_keys":{"core.gini":["gini"]},"lesson":"Inequality from a sample survey: core.gini with the survey weights; unweighted statistics describe the sample, not the population.","params":{"median":950.0,"n":4000,"seed":1972931969,"sigma":0.94},"reference":{"cite":1,"note":"","steps":[{"args":{"dataset":"dados","income":"renda_pc","weights":"peso"},"tool":"core.gini","why":"Desigualdade numa pesquisa amostral: Gini com o peso."}]},"seed":1004,"tolerance":0.03068996316010769,"trap_tools":[],"truth_value":0.4391150860545421,"variant":1},"question":"Qu\u00e3o desigual \u00e9 a distribui\u00e7\u00e3o de renda do munic\u00edpio? Precisamos de um \u00fanico n\u00famero-resumo para o relat\u00f3rio anual.","requires":[],"runner":null,"sources":[],"split":"test","suite":"tool_selection","tags":["tool_selection","inequality","test"],"target":"agent","tool":null,"truth":"DGP generators.incomes(median=950.0, sigma=0.94) reweighted by E[peso | renda]; truth = population Gini by numerical integration = 0.43912; tolerance 4 \u00d7 bootstrap SE of the weighted Gini (numpy, 200 draws) = 0.03069"}