Anthony's VBA Forum Index Anthony's VBA Forum
Where the knowledge is shared
Menu
 Anthony's VBA Forum IndexHome Page
 Anthony's VBA Forum IndexForum Index
FAQFAQ
MemberlistMemberlist
UsergroupsUsergroups
RegisterRegister
ProfileProfile
Log in to check your private messagesMessages
Log inLogin/Out

Quick Search

Advanced Search

Links
Consulting
Products

Who's Online
[ Administrator ]
[ Moderator ]


p-value for t-statistic and f-statistic

 
Post new topic   Reply to topic     Anthony's VBA Forum Index -> Regression Analysis
View previous topic :: View next topic  
Author Message
Lim



Joined: 27 Oct 2004
Posts: 7

PostPosted: Wed Nov 03, 2004 9:43 pm    Post subject: p-value for t-statistic and f-statistic Reply with quote

Any idea of how to translate the t-statistic and f-statistic into p-value using VBA. I have tried the TDist(x,df,tail) and FDist(x,df1,df2) but unable to obtain the result. Wink Cool
Back to top
View user's profile Send private message Send e-mail
Anthony
Site Admin
Site Admin


Joined: 29 Sep 2004
Posts: 36
Location: New York, USA

PostPosted: Thu Nov 25, 2004 10:20 am    Post subject: Method to Get P values from F or Student-t Distribution Reply with quote

Hi Lim,

Since both Student-t distribution and the F distribution are non-parametric, you would need to simulate the P value (percentile value). For example, you simulate the F distribution random deviates (with sufficient iteration) then you sort the deviates. Assume you want to get the P at 0.95 with degree of freedon = 10. Then here are the steps to follow:

1. simulate F deviates based on df = 10, for example, 10,000 times
2. sort the deviates
3. locate the 9,500th (0.95 x 10,000) sorted deviate. That is the P value for F distribution at df=10.

Anthony
P.S. I am currently developing various random numbers generators. F distribution and t distribution are included. They will be available in the CD in December.
Back to top
View user's profile Send private message
Lim



Joined: 27 Oct 2004
Posts: 7

PostPosted: Thu Nov 25, 2004 8:55 pm    Post subject: Reply with quote

Thanx. Please let me know when your CD is ready.
Back to top
View user's profile Send private message Send e-mail
Anthony
Site Admin
Site Admin


Joined: 29 Sep 2004
Posts: 36
Location: New York, USA

PostPosted: Fri Nov 26, 2004 12:39 am    Post subject: P Value Reply with quote

Hi Lim,

I just discovered that by using Excel statistic functions, you can get the P value. To get the percentile value or the probability from a F distribution, use FINV() and FDIST(), respectively. I do not know why it did not work for you (unless your definition of P value is different from what I understand).

For example, FINV(0.05,30,30) = 1.84 and FDIST(1.84,30,30)=0.05.
1.84 is the 0.95 (1-0.05) percentile value and the 0.05 is the probabity that the random value will be greater than 1.84.

Hope this help. If you are still interested in generating random number from various probability distribution, there will be new examples added to the CD in December. They include Student-T, F, Chi-Square, Lognormal, Log Pearson III, and our old friend Noraml Distribution.

Take a preview look on this:
http://anthony-vba.kefra.com/vba/vbar1.htm

Anthony Cool
Back to top
View user's profile Send private message
Ranf1



Joined: 16 Jan 2010
Posts: 1

PostPosted: Sat Jan 16, 2010 9:52 pm    Post subject: t distribution & Power Law Index Reply with quote

Given a log-normal time series of monthly asset returns, it's a simple matter to compute the student t-distribution particularly using Excel's built-in function, but how do you compute this distribution characterized by a Power Law Index? Appreciative of any Excel examples!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Anthony's VBA Forum Index -> Regression Analysis All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group