0
$\begingroup$

Suppose that we have sample $x_{i}\sim N(\mu,\sigma^{2})\quad i=1,...,n$ and when $\sigma^{2}$ is known. A confidence distribution (CD) for $\mu$ can be written as follows (see, https://en.wikipedia.org/wiki/Confidence_distribution).

$$H_{\Phi}(\mu) = \Phi(\frac{\mu-\bar{x}}{\sigma/\sqrt{n}})$$

Further, when $\sigma^{2}$ is unknown $H_{\Phi}(\mu)$ is no longer a CD for $\mu$. In this case, $H_{t}(\mu) = F_{t_{n-1}}(\frac{\mu-\bar{x}}{s/\sqrt{n}})$ is a CD for $\mu$. If not, we can have an asymptotic CD for $\mu$. That is, $H_{\Phi}(\mu) = \Phi(\frac{\mu-\bar{x}}{s/\sqrt{n}})$ as $n \rightarrow \infty$. For further information please see http://www.stat.rutgers.edu/home/mxie/RCPapers/insr.12000.pdf

I am trying to draw a CD for $\mu$ in R. Here is my code.

x <- seq(-4,4, length=100)
h <- 1- pnorm(x)
plot(x, h, type="l")

The corresponding plot is given below.

enter image description here

Is it right? Thank you very much in advance.

$\endgroup$
  • $\begingroup$ $\mu$ is the random variable whose distribution you are trying to plot, and $\Phi$ is the standard normal distribution's CDF. The arithmetic inside the parentheses is just standardizing the scale and location of $\mu$. Also note that, as you can see from Siong's excellent answer below, as $n$ increases the 'uncertainty' decreases. $\endgroup$ – Don Walpola Sep 1 '18 at 3:53
1
$\begingroup$

Note that cumulative distribution are non-decreasing and you are assuming normal distribution.

Also, it should depends on $\bar{x}$ and $\sigma$ and $n$.

Assuming that your $\bar{x}=0$ and $\sigma=1$, I have ploted the graph.

mu <- seq(-4,4, length=100)

CDvalue <- function(x, barx, sigma, n){
    pnorm(sqrt(n)*(x-barx)/sigma)
}
cols <- c("green", "blue", "red")
plot(mu, CDvalue(mu, 0,1,10), col = cols[1], type="l",xlab = "mu", ylab="confidence dist.")
points(mu, CDvalue(mu, 0,1,100), col = cols[2], type="l")
points(mu, CDvalue(mu, 0,1,150), col = cols[3], type="l")

legend("topleft", title="n", c("10", "100", "150"), pch = 15, col = cols)

enter image description here

$\endgroup$

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