### Topics

- p-value=P(T>t(calculated)|H0) for right tailed, and so on for two-tailed 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 p-value=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 t-test, 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 p-value)

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 t-test on 98 d.f. in closed form so that you can simply enter that 2.12 value and get a p-value. This is true for most, if not all, of the commonly used statistics such as the Chi-square, 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 non-central 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 T-Test to calculate exact p-values - 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 p-value or alpha or 1-alpha in the inverse cumulative distribution to find the desired threshold on a statistic. Fisher preferred exact p-values, 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 p-values (so like Fisher's p-values but less accurate). - >David : T-test and Fisher's exact test have NOTHING to do together. T-test 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:

t-Distribution: http://en.wikipedia.org/wiki/Student%27s_t-distribution

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

#### ** Question Followers (6) **

- Views 25516
- Followers 6
- Answers 6

## All Answers (6)