On Thu, May 6, 2010 at 6:09 PM, Greg Snow <Greg.Snow@imail.org> wrote:

> Because if you use the sample standard deviation then it is a t test not a
> z test.
>

I'm doubting that seriously...

You calculate normalized Z-values by substracting the sample mean and
dividing by the sample sd. So Thomas is correct. It becomes a Z-test since
you compare these normalized Z-values with the Z distribution, instead of
the (more appropriate) T-distribution. The T-distribution is essentially a
Z-distribution that is corrected for the finite sample size. In Asymptopia,
the Z and T distribution are identical.

>
> --
> Gregory (Greg) L. Snow Ph.D.
> Statistical Data Center
> Intermountain Healthcare
> greg.snow@imail.org
> 801.408.8111
>
>
> > -----Original Message-----
> > From: r-help-bounces@r-project.org [mailto:r-help-bounces@r-
> > project.org] On Behalf Of Thomas Roth
> > Sent: Thursday, May 06, 2010 1:58 AM
> > To: 'level'; r-help@r-project.org
> > Subject: Re: [R] P values
> >
> > Why
> >
> > s = 1
> >
> > ##
> >
> > s = sd(A) #?
> >
> >
> > -----Ursprüngliche Nachricht-----
> > Von: r-help-bounces@r-project.org [mailto:r-help-bounces@r-project.org]
> > Im
> > Auftrag von level
> > Gesendet: Mittwoch, 5. Mai 2010 22:41
> > An: r-help@r-project.org
> > Betreff: [R] P values
> >
> >
> > How do u calculated p values for a z test..
> >
> > so far i ve done this
> >
> > A = read.table("cw3_data.txt")
> >
> > xbar = mean(A)
> > s = 1
> > n = 20
> > mu = 0
> >
> > z.test = (xbar-mu)/(s/sqrt(n))
> >
> > p.value = pnorm(abs(z.test))
> >
> > error = qnorm(0.99)*s/sqrt(n)
> > left = xbar - error
> > right = xbar + error
> >
> > and have got values off of it...but the values for p dont match up with
> > other sites that i have used to check it agaisnt..such as wolfram alpha
> > value i got was 0.7335039  when wolfram got 0.533.. any ideas where i
> > ve
> > gone wrong?  cheers
> > --
> > View this message in context:
> > http://r.789695.n4.nabble.com/P-values-tp2131646p2131646.html
> > Sent from the R help mailing list archive at Nabble.com.
> >
> > ______________________________________________
> > R-help@r-project.org 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.
> >
> > ______________________________________________
> > R-help@r-project.org 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.
>
> ______________________________________________
> R-help@r-project.org 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.
>



-- 
Joris Meys
Statistical Consultant

Ghent University
Faculty of Bioscience Engineering
Department of Applied mathematics, biometrics and process control

Coupure Links 653
B-9000 Gent

tel : +32 9 264 59 87
Joris.Meys@Ugent.be
-------------------------------
Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php

	[[alternative HTML version deleted]]

