Correction, I understood you wrong Greg.

I read it as if you wanted to say that you should divide by 1 instead of the
sd to get a standardized value for the Z-test (which I considered a very
strange twist from someone like you)

But apparently the data are supposed to have an expected value of 0 and a sd
of 1. In that case (the standard deviation is known and not estimated from
the sample), you use indeed the sd (1 in this case) and compare to the
standard normal distribution.

Thx also to Mark Leeds for pointing out my reading error.

Cheers
Joris

On Thu, May 6, 2010 at 7:40 PM, Joris Meys <jorism...@gmail.com> wrote:

>
>
> On Thu, May 6, 2010 at 6:09 PM, Greg Snow <greg.s...@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.s...@imail.org
>> 801.408.8111
>>
>>
>> > -----Original Message-----
>> > From: r-help-boun...@r-project.org [mailto:r-help-boun...@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-boun...@r-project.org [mailto:r-help-boun...@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.m...@ugent.be
> -------------------------------
> Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php
>



-- 
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.m...@ugent.be
-------------------------------
Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php

        [[alternative HTML version deleted]]

______________________________________________
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.

Reply via email to