The paper presents a model of educational production which tries to make sense of recent evidence on effects of institutional arrangements on student performance. In a simple principal-agent framework, students choose their learning effort to maximize their net benefits, while the government chooses educational spending to maximize its net benefits. In the jointly determined equilibrium, schooling quality is shown to depend on several institutionally determined parameters. The impact on student performance of institutions such as central examinations, centralization versus school autonomy, teachers' influence, parental influence, and competition from private schools is analyzed. Furthermore, the model can rationalize why positive resource effects may be lacking in educational production.