I need to devise a test that can state with 95% confidence that the test taker knows x percentage of a body of knowledge questions if they are tested on a sampling of the questions and score x percentage.

There are 20,000 questions. Obviously I cannot test my students on all of them, but I want to know what number of questions I need to test them on to determine with 95% confidence that they know the same percentage of the 20,000 questions as they do the questions they were tested with.

It would be great if you could show me how you determined the answer. I may need to change some of the criteria later.