Is there a standard method of dealing with independent variables, where they are samples from a known distribution, and the sample sizes differ from sample to sample?
I'll give an example of what I mean. Suppose your sample consists in $n$ individuals, who have been given 3 different types of test. Let $Z_{i,j}$ be number of successes for person $i$, on test $j$; $n_{i,j}$ is the number of times person $i$ takes test $j$ (the sample size). We further assume that $Z_{i,j} \sim B(n_{i,j}, p_{i_j})$, where $p_{i,j}$ represents the ability of person $i$, at test $j$. The different individuals have different abilities at the test.
We want to use the sample to construct a model that let us use the results of test 1 and 2 for an individual to predict their result on test 3. We could fit a generalized linear model, for example, where $Z_{i,3}$ is the independent variable, and $\frac{Z_{i,1}}{n_{i,1}}$ and $\frac{Z_{i,2}}{n_{i,2}}$ are dependent variables, but we wouldn't take into account the differing sample sizes. Ideally, we want to construct a model that accounts for the relationship between an individual's ability on the different tests ($p_{i,1}, p_{i,2},p_{i,3}$), and use that to predict his ability on test 3, given his ability on tests 1 and 2, but we only know the results of the tests, the $Z_{i,j}$'s.
ADDITION: Suppose we have a model of the relationship between each of the $p_{i,\cdot}$'s, for example $p_{i,3}=f(\beta_0+\beta_1g(p_{i,1})+\beta_2g(p_{i,2}))$, where $f$ and $g$ are, say, logit functions. How would I obtain those parameters? Is there a standard algorithm for this, or a function in R? Is maximum likelihood an appropriate method of fitting?
Also, when fitting the model, what pitfalls are there? Are there metrics or tests for comparing different models, or determining goodness-of-fit? Is there a term for this form of modelling?