Does anyone have idia about how to calculate exact p value for the distributions like t,f,chisquare,normal,binomial and poisson.? I know that it come directly from the statistical softwares like sas,spss but i want proper formula to evaluate p value. for example if paired t test = 2.12 for 98 df then any statistical software reply p value=0.0363......it is not statistically significant
because it is <0.05. but i want formula for p value not procedure on software. If any statistician know it then please reply. also reply on atulvw@rediffmail.com
Topics

pvalue=P(T>t(calculated)H0) for right tailed, and so on for twotailed and left tailed. this means you need a numerical integration to computed and that what the statistical software do.

Dear Sir,
Thanku very much for your reply.
I know that pvalue=P(T>t(calculated)H0) for right tailed.....but i want proper formula for this...suppose we have not any statistical software even MS.excel......as it was also not available for the time of Great R.A.Fisher Sir...So how was He find this probable value.....??
How this p=0.0363...as Great R.A. Fisher Sir introduced all table values for ttest, which procedure He follow for this.(He might also used some formulation for this).
So Dear Sir, I need this.
(Just imagine u haven't any kind of software.....but you have all the formulas of the related test........then how u calculate pvalue)
reply Sir..I am waiting for answer. 
In general there are no formulae in the sense that you seem to mean. That is to say, there is no way to express the integral of the distribution function of an arbitrary statistic from it's lower bound up to the value of the test statistic in closed form. For example, there is no way of expressing the integral of the distribution function of the ttest on 98 d.f. in closed form so that you can simply enter that 2.12 value and get a pvalue. This is true for most, if not all, of the commonly used statistics such as the Chisquare, normal, F and so on.
Because no closed form expressions are available, or indeed mathematically possible, it is necessary to use numerical methods to obtain approximations. This is true now; it was true in RA Fisher's time too. The difference now is that we can use computers to perform the calculations. In Fisher's day it was necessary to resort to mechanical calculators or pencil and paper.
There are a variety of methods for getting numerical approximations to definite integrals. I don't know which of these Fisher might have used. I worked on a paper with Tiku in around 1970 about approximating the doubly noncentral F distribution. Tiku had expanded the distribution as a series of some kind, as a way of making the calculation. 
Fisher used an alternate approach to the TTest to calculate exact pvalues  called Fisher's exact test. It is based on comparing the number of ways of choosing the elements of the contingency table given the marginal values. The formula is expressed using factorials, but as they get big it should be calculated using logs and lgamma.
Basically, given N items, multiply N! by the factorials of all the cells and divide by the factorials of all the margins to get the probability of this specific contingency table. Normally you will want to also do this for more extreme tables, so for a 2x2 table that is decrement the smallest cell and repeat till it hits 0, and sum the resulting probabilities, so you know the probability of being at least as this far away from the expected value according to the null hypothesis.
Excel and other packages also have inverse functions for the cumulative distributions: gammainv, betainv, fisherinv, loginv, normalinv are the names in Excel. You can either look a statistic up in the cumulative distribution or a pvalue or alpha or 1alpha in the inverse cumulative distribution to find the desired threshold on a statistic. Fisher preferred exact pvalues, others prefer to choose an alpha a priori (0.05 typically) and just indicate whether it was within or beyond the corresponding threshold, but then people inconsistently use smaller values like 0.01 or 0.005 and quote those a posteriori, effectively as truncated pvalues (so like Fisher's pvalues but less accurate). 
>David : Ttest and Fisher's exact test have NOTHING to do together. Ttest is to compare two means assuming independance, normality and equality of variance. Fisher exact test is for testing the (in)dependance of two categorical variables.

The formulas are given, for instance, in Wikepedia:
tDistribution: http://en.wikipedia.org/wiki/Student%27s_tdistribution
Just search for the type of probability distribution you want.
It may be that there is no closed form of the probability function (for example for the normal distribution). Then you have to numerically integrate the density. There are a number of possibilities to do this. Wikipedia will help here again:
http://en.wikipedia.org/wiki/Numerical_integration
 Views 24598
 Followers 6
 Answers 6
All Answers (6)