{"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.018038355478864527,"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.39265856964015644,"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":960.0,"n":6000,"seed":1927662434,"sigma":0.83},"path":null,"read_kw":{},"records":null,"role":"agent","sha256":null,"transforms":[],"url":null}},"difficulty":"E","id":"tool_selection.inequality.test.s1000","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":960.0,"n":6000,"seed":1927662434,"sigma":0.83},"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":1000,"tolerance":0.018038355478864527,"trap_tools":[],"truth_value":0.39265856964015644,"variant":3},"question":"Queremos comparar a desigualdade de renda do nosso munic\u00edpio com a m\u00e9dia do estado, que \u00e9 medida pelo \u00edndice de Gini. Qual \u00e9 o nosso \u00edndice?","requires":[],"runner":null,"sources":[],"split":"test","suite":"tool_selection","tags":["tool_selection","inequality","test"],"target":"agent","tool":null,"truth":"DGP generators.incomes(median=960.0, sigma=0.83) reweighted by E[peso | renda]; truth = population Gini by numerical integration = 0.39266; tolerance 4 \u00d7 bootstrap SE of the weighted Gini (numpy, 200 draws) = 0.01804"}