[R] t-stat Curve
Number of subjects = 25 Mean of Sample = 77 Standard Deviation (s) = 12 sem = 2.4 df = 24 The claim is that population mean is less than 80 * 80 So our H0 (null hupotheis) is * 80 qt(.95,24) [1] 1.710882 qt(0.05, 24) [1] -1.710882 tstat = -1.25 on t24 falls between 1.711 (.95,24) and *1.711 (.005,24) How Could I sketch t curve for the above data where my * would be at the center? Best Regards Isaac Dr. I. Barjis Assistant Professor Summer and Evening Coordinator Department of Biological Sciences Room P313 300 Jay Street Brooklyn, NY 11201 Phone: (718)2605285 Fax: (718)2548680 Fax: (718) 254-8595 Department Office http://websupport1.citytech.cuny.edu/Faculty/ibarjis BEGIN:VCARD VERSION:2.1 X-GWTYPE:USER FN:Isaac Barjis ORG:;Physical Biological Sciences EMAIL;WORK;PREF;NGW:[EMAIL PROTECTED] N:Barjis;Isaac TITLE:Assistant Professor END:VCARD BEGIN:VCARD VERSION:2.1 X-GWTYPE:USER FN:Isaac Barjis ORG:;Physical Biological Sciences EMAIL;WORK;PREF;NGW:[EMAIL PROTECTED] N:Barjis;Isaac TITLE:Assistant Professor END:VCARD __ R-help@stat.math.ethz.ch 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.
Re: [R] t-stat Curve
-Original Message- From: [EMAIL PROTECTED] [mailto:r-help- [EMAIL PROTECTED] On Behalf Of Isaac Barjis Sent: Wednesday, September 27, 2006 8:08 AM To: R-help@stat.math.ethz.ch Subject: [R] t-stat Curve Number of subjects = 25 Mean of Sample = 77 Standard Deviation (s) = 12 sem = 2.4 df = 24 The claim is that population mean is less than 80 * 80 So our H0 (null hupotheis) is * 80 qt(.95,24) [1] 1.710882 qt(0.05, 24) [1] -1.710882 tstat = -1.25 on t24 falls between 1.711 (.95,24) and *1.711 (.005,24) How Could I sketch t curve for the above data where my * would be at the center? Best Regards Isaac Dr. I. Barjis Assistant Professor Summer and Evening Coordinator Department of Biological Sciences Isaac, I'm not sure that what you are asking for is reasonable (or possible). It is the sampling distribution of your t-statistic that is distributed as t under the null hypothesis, not your observed data. Could you clarify what it is you wish to do? Dan Daniel J. Nordlund Research and Data Analysis Washington State Department of Social and Health Services Olympia, WA 98504-5204 __ R-help@stat.math.ethz.ch 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.
Re: [R] t-stat Curve
Isaac: You will likely find something helpful here: http://addictedtor.free.fr/graphiques/thumbs.php I also recently came across this code (I thought it was at the URL above, but I can't find it now) that may be useful with modification. I apologize to the code-writer for having lost the correct reference. (If anyone finds it, please send the reference to me. Thanks.) # # neighboring (not overlapping) normal densities dev.off() x-seq(-10,10,length=400) y1-dnorm(x) y2-dnorm(x,m=3) par(mar=c(5,4,2,1)) plot(x, y2, xlim=c(-3,8), type=n, xlab=quote(Z==frac(mu[1]-mu[2], sigma/sqrt(n))), ylab=Density) polygon(c(1.96,1.96,x[240:400],10), c(0,dnorm(1.96,m=3),y2[240:400],0), col=grey80, lty=0) lines(x, y2) lines(x, y1) polygon(c(-1.96,-1.96,x[161:1],-10), c(0,dnorm(-1.96,m=0), y1[161:1],0), col=grey30, lty=0) polygon(c(1.96, 1.96, x[240:400], 10), c(0,dnorm(1.96,m=0), y1[240:400],0), col=grey30) legend(4.2, .4, fill=c(grey80,grey30), legend=expression(P(abs(phantom(i)*Z*phantom(i))1.96, H[1])==0.85, P(abs(phantom(i)*Z*phantom(i))1.96,H[0])==0.05), bty=n) text(0, .2, quote(H[0]:~~mu[1]==mu[2])) text(3, .2, quote(H[1]:~~mu[1]==mu[2]+delta)) # Charles Annis, P.E. [EMAIL PROTECTED] phone: 561-352-9699 eFax: 614-455-3265 http://www.StatisticalEngineering.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Isaac Barjis Sent: Wednesday, September 27, 2006 11:08 AM To: R-help@stat.math.ethz.ch Subject: [R] t-stat Curve Number of subjects = 25 Mean of Sample = 77 Standard Deviation (s) = 12 sem = 2.4 df = 24 The claim is that population mean is less than 80 * 80 So our H0 (null hupotheis) is * 80 qt(.95,24) [1] 1.710882 qt(0.05, 24) [1] -1.710882 tstat = -1.25 on t24 falls between 1.711 (.95,24) and *1.711 (.005,24) How Could I sketch t curve for the above data where my * would be at the center? Best Regards Isaac Dr. I. Barjis Assistant Professor Summer and Evening Coordinator Department of Biological Sciences Room P313 300 Jay Street Brooklyn, NY 11201 Phone: (718)2605285 Fax: (718)2548680 Fax: (718) 254-8595 Department Office http://websupport1.citytech.cuny.edu/Faculty/ibarjis __ R-help@stat.math.ethz.ch 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.
Re: [R] t-stat Curve
## There is some ambiguity in your example. ## You stated a one-sided hypothesis and calculated qt() values for both sides. ## I show both the one-sided and two-sided displays. library(HH) ## HH_1.5 is available from CRAN for R-2.3.1 ## ## HH_1.5 ignores the df.t argument and interprets the request as a ## normal distribution. ## HH_1.8 has been accepted for CRAN for R-2.4.0 and will be in the ## standard places on CRAN when R-2.4.0 is released. ## ## HH_1.8 uses the df.t argument and interprets the request as a ## t-distribution. old.par - par(oma=c(4,0,2,5), mar=c(7,7,4,2)+.1) crit.val.t - qt(c(.05,.95), 24) crit.val - crit.val.t*(12/sqrt(25)) + 80 observed.t - -1.25 observed.ybar - 77 norm.setup(mean=80, n=25, sd=12, df.t=24, xlim=c(70,90), main=two-sided alpha=.10) norm.curve(mean=80, n=25, sd=12, df.t=24, crit=crit.val) abline(v=observed.ybar) axis(side=3, at=observed.ybar, line=-.5) norm.setup(mean=80, n=25, sd=12, df.t=24, xlim=c(70,90), main=one-sided alpha=.05) norm.curve(mean=80, n=25, sd=12, df.t=24, crit=crit.val[1], shade=left) abline(v=observed.ybar) axis(side=3, at=observed.ybar, line=-.5) par(old.par) __ R-help@stat.math.ethz.ch 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.