Author 
Message 

DarkerLine ceci n'est pas une 
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328

Posted: 16 Apr 2008 07:37:07 pm Post subject: 


You didn't err in transcribing the program, but rather in using it.
Your textbook tables are made specifically for confidence intervals, and are twotailed. For example, if the t value for p=.95 is 2.1009, that means that there's a .95 probability that t will be between 2.1009 and 2.1009.
The program calculates the onetailed version. Here, if the tvalue for p=.95 is 1.6449, that means there's a .95 probability that t will be less than 1.6449 (so t=1000 is still included in this probability).
Fortunately, it's easy to go back and forth between the two. For example, when you want to calculate the twotailed inverse with p=0.95, you use p=0.975 in this program. In general, the formula is (p+1)/2.
How did I get this? Well, if 95% of the area is betwen t* and t*, since the curve is symmetric, the remaining 5% is split evenly between the area less than t* and the area greater than t*. So 2.5% of the area is less than t*. This means that 95%+2.5% = 97.5% of the area is less than t*.
Last edited by Guest on 16 Apr 2008 08:01:27 pm; edited 1 time in total 

Back to top 


navyfalcon
Advanced Newbie
Joined: 17 Mar 2008 Posts: 77

Posted: 16 Apr 2008 10:37:32 pm Post subject: 


checked values with online calculator at:
http://stattrek.com/tables/t.aspx
with:
df=18
prob=.95
t score=1.734

which agrees with the program or 1.7341

yet the "critical values of t" in my statistics textbook:
for df=18 and p=.05 is 2.1009 ??
thank you
falcon 

Back to top 


DarkerLine ceci n'est pas une 
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328

Posted: 16 Apr 2008 10:46:41 pm Post subject: 


I'm not really sure what to tell you, since you seem to have skipped over my post without reading it the first time.
When either the programs in this topic, or online calculators, compute a t score using the cumulative distribution, they are finding a onesided critical value. Here, p represents the probability that t is in the range from negative infinity to your critical value. Illustration:
[attachment=2233:attachment]
Your textbook has a table of critical values of t that is using twosided values. In this case, p represents the probability that t is within (critical value) of 0. Illustration:
[attachment=2234:attachment]
I have given you a formula that relates onesided pvalues to twosided pvalues. To convert a twosided probability to a onesided one, which is what you need to use the program or an online calculator, set the new value of p equal to (p+1)/2 before doing the calculation.
Alternatively, you can make the following change to the code of the program to make its results agree with the textbook's (change in red):
Input "p=?",P
(P+1)/2→P
Input "df=?",F
...
But really, I'd try to understand the mathematics of this. You are not going to get anywhere in statistics if you just apply formulas and/or tables without so much as knowing what you're calculating.
Last edited by Guest on 02 Aug 2010 02:32:22 am; edited 1 time in total 

Back to top 


navyfalcon
Advanced Newbie
Joined: 17 Mar 2008 Posts: 77

Posted: 17 Apr 2008 03:23:09 am Post subject: 


According to the tables in the book:
1.6449 is infinity for 10% and
2.3263 is infinity for 2%

1.7341 is 10% at 18 df and
2.5524 is 2% at 18 df

2.1009 is 5% at 18 df and
2.8784 is 1% at 18 df

the table is for twotailed test
have the percentages for onetailed test

I can't even get close to the correct answers
obviously I am doing something wrong
I entered the code by hand several times and
still receive the same answers

Because the percentages are twice what I inputted
(ie 5% is getting 10%) I thought I had confused
two tailed tests with one tailed test but the values are for infinity ??

falcon 

Back to top 


navyfalcon
Advanced Newbie
Joined: 17 Mar 2008 Posts: 77

Posted: 17 Apr 2008 03:27:46 am Post subject: 


Thank you
falcon 

Back to top 


DarkerLine ceci n'est pas une 
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328

Posted: 17 Apr 2008 12:31:19 pm Post subject: 


I take it the issue's been resolved.
Last edited by Guest on 17 Apr 2008 12:32:00 pm; edited 1 time in total 

Back to top 


thornahawk μολών λαβέ
Active Member
Joined: 27 Mar 2005 Posts: 569

Posted: 27 Nov 2009 11:56:27 am Post subject: 


During a library raid I conducted a few months ago, I came across a nice review article on some approximations for common distribution functions [attachment=2939:lingapprox.pdf]. I remembered this topic and thought of presenting what Ling judged as a pretty good approximation to Student t.
For the TI calculators without the invT( function:
Code: PROGRAM:INVT1T
Prompt P,N \\ P  probability/percentage point, N  degrees of freedom
√(N(℮^((invNorm(P)/(N−2/3+.1/N))²(N−5/6))−1))→Y \\ PeizerPratt approximation
Repeat abs((Y−F)/Y)≤e6 \\ e6 == 10^6, since tcdf( doesn't really give full accuracy anyway...
Y→F
Y+(P−.5−tcdf(0,Y,N))/tpdf(Y,N)→Y
End
Y
for the onetailed form (equivalent to the TI84+SE's invT( function), and
Code: PROGRAM:INVT2T
Prompt P,N \\ P  probability/percentage point, N  degrees of freedom
√(N(℮^((invNorm(.5(1+P))/(N−2/3+.1/N))²(N−5/6))−1))→Y \\ PeizerPratt approximation
Repeat abs((Y−F)/Y)≤e6 \\ e6 == 10^6, since tcdf( doesn't really give full accuracy anyway...
Y→F
Y+(.5P−tcdf(0,Y,N))/tpdf(Y,N)→Y
End
Y
for the twotailed form.
thornahawk 

Back to top 


