I have a question about how to calculate the confidence interval for the sum of means from different samples.

For example, I take three random samples of students from a school and give the first sample a math test (sample size $n_1 = 50$), the second sample a reading test ($n_2 = 40$), and the third sample a physics test ($n_3 = 30$).

Let us say the students from the three samples are mutually exclusive. How can I calculate the confidence interval for the sum of mean scores, i.e., mean_math + mean_reading + mean_writing? Is there a command in Stata, SAS, or Matlab that I can use? Thanks.

  • 2
    $\begingroup$ Why would you need to sum the means? $\endgroup$ – Ayalew A. Jan 29 '15 at 7:39
  • $\begingroup$ To construct the CI for the total score. $\endgroup$ – frostman Jan 29 '15 at 7:42
  • 1
    $\begingroup$ All the three tests possibly have different scales, different means and variances - summing them does not sound like a good idea. $\endgroup$ – Tim Jan 29 '15 at 7:58
  • $\begingroup$ For three different (independent) samples each taking a different test, I don't think a total score would give any sense. $\endgroup$ – Ayalew A. Jan 29 '15 at 8:01
  • $\begingroup$ .......Even just for maths test, would the total test score of all the 50 students be meaningful? $\endgroup$ – Ayalew A. Jan 29 '15 at 8:39

The for addition/subtraction uncertainties add in quadrature. Therefore the combined confidence interval is: $$ u_c = \sqrt{u_m^2+u_r^2+u_w^2}$$

For an individual test the confidence interval can be given by the standard deviation of the mean.

$$ s_m = \frac{s}{\sqrt{n}}$$

where $s$ is the standard deviation of the sample. This should then be multiplied by the coverage factor to get the desired confidence interval.

$$ u=ks_m$$

For a normal distribution at 95% confidence $k=1.96$ ($\simeq2$).

In matlab the easiest way to do it is to just calculate standard deviation (std()) or variance and go from there. I don't use Stata/SAS so don't know if they have any specific functions.

I would also think carefully about the meaning of your test. You should probably normalise the scores so they are all on the same scale. Additionally I suspect they may be some correlation between results for a single student taking all three tests. That is students are likely to good/bad in all the tests. If this is the case you would get a larger confidence interval if you take a sample of different students total score than for the total of different samples on each test (what you currently do).

(Aside on the general case)

In general for any function $f(x_1, x_2, ... , x_m)$ where all $x_i$ are independent of each other and have associated uncertainty, $u_i$, the combined uncertainty $u_c$ can be given by: $$ u_c^2 = \sum_{i=1}^m\left(\frac{\partial f}{\partial x_i}^2\right)u_i^2$$ You should make sure all $u_i$ have the same coverage factor. You can calculate uncertainty $k=1$ and then expand the combined uncertainty if you need to.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.