# Prediction interval for unequal replicates

Dear experts,

I am trying to develop an algorithm for calibration studies (analytical chemistry). The algorithm could be used for estimation of calibration parameters, limit of detection & quantitation etc. For this I have to construct a prediction interval for the calibration curve. Now the only problem which I am facing is how to deal with unequal number of replicates (i.e. unequal number of Y responses) for each X value. For the estimation of calibration curve I am using the mean of Y responses weighted by the number of replicates at each X value. If I treat each Y replicates as individual points then the prediction interval can be estimated using this formula:
PI = YPred ± t*Se*SQRT(1+1/N+(x-xbar)2/Sxx)
Similarly for replicates (equal number) at each X value, the formula changes to:
PI = YPred ± t*Se*SQRT(1/m+1/N+(x-xbar)2/Sxx)
This formula seems suitable only for equal numbder of replicates. I need your help in deciding how to use the above formula for the estimation of prediction interval for unequal number of replicates.