relationship between t-test CI and SEM?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

relationship between t-test CI and SEM?

Rob Campbell-7
Hi,

I have what is probably a stupid question but I'm confused so here goes:

- I have a distribution (n=100) and want to determine if the mean is
significantly different from 0.5.
- When I plot the 2-tailed 95% confidence limits for the standard error
of the mean I find that the upper one just overlaps with 0.5. I was
under the impression that this would lead me to conclude that there was
no significant difference between the sample mean and 0.5.
- However, when I perform a t-test it tells me that my mean /is/
significantly different from 0.5. The confidence intervals returned by
the t-test don't seem to match with the SEM I calculated (lm does return
the same intervals).

I have tried this in both R and matlab with the same results. So I think
I'm calculating things right. Am I misinformed about the interpretation
of the SEM? What are the confidence limits returned by the t-test (they
bear no relationship to the SEM)?


Thanks!

Rob

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: relationship between t-test CI and SEM?

Daniel Nordlund
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf
> Of Rob Campbell
> Sent: Sunday, March 09, 2008 9:19 PM
> To: [hidden email]
> Subject: [R] relationship between t-test CI and SEM?
>
> Hi,
>
> I have what is probably a stupid question but I'm confused so here goes:
>
> - I have a distribution (n=100) and want to determine if the mean is
> significantly different from 0.5.
> - When I plot the 2-tailed 95% confidence limits for the standard error
> of the mean I find that the upper one just overlaps with 0.5. I was
> under the impression that this would lead me to conclude that there was
> no significant difference between the sample mean and 0.5.
> - However, when I perform a t-test it tells me that my mean /is/
> significantly different from 0.5. The confidence intervals returned by
> the t-test don't seem to match with the SEM I calculated (lm does return
> the same intervals).
>
> I have tried this in both R and matlab with the same results. So I think
> I'm calculating things right. Am I misinformed about the interpretation
> of the SEM? What are the confidence limits returned by the t-test (they
> bear no relationship to the SEM)?
>
>
> Thanks!
>
> Rob
>
Rob,

It would help if you showed how you were computing the SEM, rather than telling us you are doing it correctly (the posting guide does ask you to provide commented, minimal, self-contained, reproducible code).  When I calculate the SEM I get the same value produced by t.test().

Dan

Daniel Nordlund
Bothell, WA

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: relationship between t-test CI and SEM?

Rob Campbell-7

Thanks for the replies and apologies for not including code. Bad of me.

 >Chuck Cleland wrote:
 >I get the same confidence intervals with t.test(), lm(), and by hand.
  >We need to see how you calculated the SEM and constructed the
interval.  >Perhaps you constructed the interval using the normal
distribution >rather than the t distribution?

Yes, I was doing this and this was causing a confusion.

I think it's clear now!


Rob

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.