1

I need to test if the mean of the sampling distribution of the mean, which belongs to a normal distribution with mean = 0 and variance = 1, is significantly different from the mean of the original distribution.

How can I do it through a statistical test AND by looking at confidence intervals?

#

Assuming that I can use a t-test and that I already performed one with R, could you please give a simple example on how to double check my t-test's p-values by looking at the confidence intervals?

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
test
  • 33
  • 4
  • Just to be clear, what you want to know is how to do a t-test? – Repmat Nov 28 '16 at 13:50
  • I can do a t-test with R. But I also desire to double check my p-values by looking at the confidence intervals. How can I do that? – test Nov 28 '16 at 13:56
  • It's the same thing...? A 5% test is always the same as 95% confidence band in this case... – Repmat Nov 28 '16 at 13:57
  • yes @Repmat I know but I am curious to know how to 'perform a t-test' by looking at the values in the confidence intervals range. Even a simple and stupid example would be highly appreciated. thanks – test Nov 28 '16 at 14:04

2 Answers2

2

The confidence interval is based on the distribution of your test statistic. In your case, I'd use a t-statistic. This statistic follows the Student's t-distribution. You can calculate a confidence interval via the inverse distribution function. In R this is qt(q,v) where v are the degrees of freedom (#samples - 1) and q is the quantile you are interested in.

Sebastiaan
  • 425
  • 2
  • 13
1

When looking at a difference in means it is sometimes the case that hypothesis testing (via a t-test) and looking at confidence intervals yield the same result. You still have to make sure that the sample sizes are comparable and that the sample variances are approximately equal. See Relation between confidence interval and testing statistical hypothesis for t-test for reference.

  • What Maximillian means is that if H0 is mean=0 rejecting the null hypothesis at the 5% level is the same as knowing that a 95% confidence interval does not contain 0. We call this the 1-1 correspondence between hypothesis testing and confidence intervals. This is a general result that applies to other tests and not just the t test. It also applies to any level of significance and not just 5%. – Michael R. Chernick Nov 28 '16 at 15:25