This is a problem related to combination math.
I have x questions I want to ask y people. Each individual will answer z questions.
Assume in this example that:
x = 5 questions y = 1000 people z = 3 questions per person.
The questions that each person will be asked will be chosen at random.
Using straightforward combination math I can determine from the above assumptions that there are 10 random combinations of 5 questions when each person is asked 3 questions. Using simple math each of the 10 combinations will be asked of 100 people (1000 people /10 combinations).
What I need to solve for is the number of times that a given pair of questions will be asked together. Doing this by hand I am able to determine that in the 10 combinations a given pair of questions will show up together three times. With 100 people answering each of the 10 combinations of questions, each pair will have been answered together 300 times.
This is fine for the given example where I am able to count the combinations by hand but how can I get the number of pairs when the number of questions (x) and/or number of questions per person changes (z)? I imagine there has to be a formula that will allow me to determine the number of pairs in a series of combinations of any size.
To make it even more complicated I need the formula to also be flexible enough to be able to not only find the number of pairs but to also find the number of triples & quads. E.g. how many times do the same three questions get asked together (in any combination) when I have 20 questions and 1000 people are asked 5 questions each?