4
$\begingroup$

Assume the sample ${(x_i)}_{i=1}^{n_1} \sim_{\text{iid}} {\cal N}(\mu, \sigma_1^2)$ is independent of the sample ${(y_i)}_{i=1}^{n_2} \sim_{\text{iid}} {\cal N}(\mu, \sigma_2^2)$. What are the available methods to get a confidence interval about the common mean $\mu$ ? In my case I have $n_1=n_2$. I would be satisfied by an answer for this case but I'm also interested in the general case.

$\endgroup$
  • 3
    $\begingroup$ You should answer your own quetion as an answer not only as edit to post, so it is possible to upvote it (so removing from unanswered queue). $\endgroup$ – kjetil b halvorsen Sep 22 '15 at 10:23
1
$\begingroup$

I finally found a solution in this paper: On exact confidence intervals for the common mean of several normal populations by Philip L.H. Yua, Yijun Sunb, Bimal K. Sinha.

( The same paper with free access: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.50.7844&rep=rep1&type=pdf)

And I found the old code I used to get the CI based on Fisher's inversion method, whose details are given in the paper.

# simulate data
set.seed(666)
y1 <- rnorm(100, 5, .1)
y2 <- rnorm(100, 5, .3)
ybar1 <- mean(y1)
ybar2 <- mean(y2)
v1 <- var(y1)
v2 <- var(y2)
n1 <- length(y1)
n2 <- length(y2)

# product of p-values (denoted by P_i in the paper)
f <- function(mu){
  pf(n1*(ybar1-mu)^2/v1, df1=1, df2=n1-1, lower.tail=FALSE)*pf(n2*(ybar2-mu)^2/v2, df1=1, df2=n2-1, lower.tail=FALSE)
}
# the 95%-confidence interval is given by the intersection points 
curve(f(x), from=4.95, to=5.04)
abline(h=exp(-qchisq(0.95,4)/2), col="red")

enter image description here

# bounds of the confidence interval
g <- function(mu) f(mu)-exp(-qchisq(0.95,4)/2)
uniroot(g, c(4.94, 4.98))$root
[1] 4.966296
uniroot(g, c(5, 5.06))$root
[1] 5.014669

EDIT

Another method, actually a generalized confidence interval is given in Iyer & Patterson, "A recipe for constructing generalized pivotal quantities and generalized confidence intervals.

$\endgroup$
0
$\begingroup$

Are you looking for combining them using the inverse variance method to weight each measure prior to getting a common variance?

$\endgroup$
  • $\begingroup$ See my edit for the link. I have adopted Fisher's method. Very easy actually ! $\endgroup$ – Stéphane Laurent Oct 22 '12 at 10:53
  • $\begingroup$ @Stéphane Laurent: Unfortunately the link is behind a paywall, but I noticed a later paper that addressed the Behrens–Fisher problem which makes it interesting theoretically. Wondering what Fisher method they/you are referring to? $\endgroup$ – phaneron Oct 22 '12 at 14:28
  • $\begingroup$ @phaneron ?? The link works well for me. $\endgroup$ – Stéphane Laurent Oct 22 '12 at 14:33
  • 1
    $\begingroup$ @Stéphane Laurent: The paywall is letting you through but not me. $\endgroup$ – phaneron Oct 22 '12 at 15:39
  • $\begingroup$ @phaneron Ok. So type the title of the paper in Google and will find it for free. $\endgroup$ – Stéphane Laurent Oct 22 '12 at 16:50

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.