I'm currently working on an adaptive learning system for high school maths. Students complete questions in quizzes and I need to be able to select questions of the appropriate difficulty level (say approximately 75% chance of being correct) and create a competency metric for measuring the skill of a student at a particular subtopic. We don't have explicit information about the difficulty of the questions or the abilities of the students - both need to be inferred from the data. The questions are broken down into topics and sub-topics (each question is assigned a single topic and sub-topic) and we have a dependency graph indicating which sub-topics depend on other sub-topics, so we can take into account the student's performance on areas outside of the subtopic.
How can I estimate the chance of a student getting a question correct based on historical data and create metrics for the difficulties of questions and skill levels of students?