Introduction
The world of mathematics often thrives on assumptions that help support theories and make calculations more convenient. While statistics in itself is a huge concept and can be very confusing frequently, two concepts also operate on such assumptions and they are ttests and pvalues.
TTest vs PValue
The main difference between a ttest and a pvalue lies in the quantity they measure. A ttest measures the rate of difference in the population whereas a pvalue measures the probability of attaining a ttest value that is at least as big as the value attained in the sample data. This can also be explained as the strength of proof that the result obtained is not just a likely chance occurrence.
Difference Between TTest and PValue in Tabular Form
Parameters of Comparison

TTest

PValue

Definition

ttest can be explained as a method of statistics that helps determine whether there is a significant difference between the two sets of data recorded.

the pvalue can be defined as the probability of obtaining a test result that is at least as big as the actual observed result when the null hypothesis stands true.

Terminology

The term ttest stands for ‘test statistic’.

The term pvalue stands for ‘probability value’.

Values required

We need the mean values of each data set, a standard deviation of every group, and the number of data samples in each group.

We need the deviation of the value observed from the standard value chosen while the probability distribution of the statistic is given.

Scope

The corresponding pvalue of a ttest can be calculated by the use of a tdistribution table or an online calculator or software.

The corresponding ttest value of a pvalue can be calculated by the use of an inverse Cumulative Distribution Function(CDF).

Averages

The averages of samples in a ttest are alternating.

The averages of samples while calculating the pvalue are nullsame.

Results obtained

We obtain the difference between the two mean values.

We obtain a conclusion as to whether there is enough evidence to reject the null hypothesis.

What is a TTest?
A Ttest is defined as an inferential statistical method that allows us to compare the mean values of two different sets and determine if they originate from the same kind of population. However, while making straightforward calculations, the results can turn out to be quite ambiguous. Thus, mathematicians all over the world make certain assumptions to make calculations easier and more accurate. Let us look at some of them:
Few Assumptions Made During TTests
 The first assumption made during a ttest is referring to the data collected from a random sample. Any data collected from a certain representative is said to be that of a portion that is selected randomly.
 The second assumption made is related to the samples collected. Any observations collected in a sample will remain independent of any other observation in other samples.
 The third assumption relates to the scale of measurement. It says that the scale applied to the collected data will follow either a continuous or an ordinal scale.
 The fourth assumption is made concerning the plots of data. The data when plotted will produce a normal distribution and result in a bellshaped distribution curve.
 The fifth assumption is related to homogeneity. When the resultant standard deviations of the collected samples are almost equal, it results in equal variance. Thus, we acquire homogeneity of variance.
Ways to Calculate a TTest
As previously mentioned, we need 3 proper values to calculate the tvalue they are mean values from each of the data sets, the standard deviation obtained from each group, and the number of values collected in each group. The calculation of a ttest produces the tvalue that will further be compared against the respective value in the distribution table to check whether the difference between the means is outside the possible range. This means with the help of a ttest, we can figure out whether the difference is significant i.e., true difference or a random, meaningless difference.
TDistribution Table
A tdistribution table can be described as a method of presenting data that, when plotted, falls in the bell curve. Tdistribution can be explained as a type of normal distribution that is usually used for small sample sizes. It is also referred to as the student’s tdistribution. In a tdistribution, there are higher numbers of observations close to the mean and fewer observations towards the tails. There are two types of distribution tables: onetailed and twotailed. The onetailed format is used to analyze cases that establish a fixed value or a fixed range with clarity in the sign of the value i.e., a positive value or a negative value. On the other hand, twotailed formats are used to assess random bound analysis, which means checking if the coordinates fall within a certain range.
The variance in a tdistribution can be calculated using the number of degrees of freedom in a data set. However, it is a more conservative form of the standard normal distribution which is also referred to as the ‘Zdistribution’.
Tvalues
Through the computation of a ttest, we acquire two values and they are tvalues and degrees of freedom. A tvalue can be described as the ratio of the difference between the two means of the sample sets to the variation between the sample sets. While the value of the numerator can be pretty easy to calculate, the value in the denominator can sometimes be miscalculated. We can infer from the formula that the smaller the t value, the more identical the two sample sets are. Similarly, we can say that the higher the value of the tvalue, the high is the difference that exists between the two sets. The tvalues can also be called tscores. Therefore,
 Large tscore means that the given groups are different.
 Small tscores mean that the given groups are somewhat similar.
Degrees of Freedom
Degrees of freedom can be explained as the number of values in a certain calculation that is allowed to vary. They are necessary for analyzing the significance and the requirement of the null hypothesis. The degrees of freedom for a given data set can be calculated as the total number of observations decreased by 1.
With an increase in the number of degrees of freedom, the curve of tdistribution will get closer to the curve of the standard normal distribution i.e., the zdistribution curve until the curves look almost identical. Through several data sets, we can infer and approximate that above 30 degrees of freedom, the curve of tdistribution will match the curve of zdistribution. This means for data sets with large sample sizes, we can replace the tdistribution by using the zdistribution.
Types of TTests
 Paired TTest: If the samples obtained contain matching pairs of similar units, we can use the paired ttest. This can also be done when there are recurring values of the same measure. This type of test can be referred to as a correlated ttest. Eg: When the pretreatment and posttreatment results of a patient who’s being analyzed frequently, the patient’s sample will be used against their sample as a control sample.
T=m1m2S.Dn
Where m1= mean of the first sample set
m2= mean of the second sample set
S.D= Standard deviation(S.D) of the difference between the paired data values.
n= sample size, also defined as the number of paired differences
n1=degrees of freedom for that sample set.
 Pooled TTest: this type of ttest can be used when there is an equal number of samples used in each group. This can also be used when there is homogeneity in the variance of the two groups. We also have formulas to calculate the tvalues and degrees of freedom while calculating through a pooled ttest.
Tvalue= m1m2(n11)*v12+(n21)*v22n1+n22×1n1+1n2
Where m1= mean of the first sample set
m2= mean of the second sample set
n1=number of data values in the first sample set
n2= number of data values in the second sample set.
v1=variance of the first sample set.
v2=variance of the second sample set.
 Welch’s TTest: Also known as the unequal variance ttest, this type of ttest is employed when the number of samples in both the data sets is different. Thus there will be no homogeneity in the variance between the two sets. The tvalue and the degrees of freedom of the datasets while employing the use of welch’s set is:
Tvalue=m1m2v1n1+v2n2
Degrees of freedom= (v1n1+v2n2)2(v12/n1)2n11+(v22/n2)2n21
The terminology is the same as explained above.
What is PValue?
How to Calculate a PValue
Pvalues can be calculated using online calculators or statistical programs such as R or SPSS. As stated previously, the pvalue can be calculated based on the test statistic and the degrees of freedom in that particular data set. We can say that the calculation of a pvalue differs based on:
 The kind of statistical test being employed to evaluate the hypothesis since the assumptions differ from method to method. Three types of tests will describe the location on the probability distribution curve. The tests are the uppertailed test, lowertailed test, and the twosided test.
 Number of independent variables can directly affect the number of degrees of freedom and how large or small the test statistic must be to generate the same pvalue.
Important Points to Note When Representing a PValue
 Pvalues are generally represented until the second or the third decimal place.
 It is more accurate when ‘0’ is not used in front of the decimal point. Eg: we shouldn’t write p=0.005 but instead, p= .005 as it is more accurate.
 The term ‘p’ must always be italicized and be represented as ‘p’.
 p=.000 is not accurate as some statistical packages such as SPSS can sometimes output. Thus, it must be represented as p<0.001 , as much as possible.
 When attempting to use the most accurate terminology, we must say that the contradiction of significance can be termed as insignificant and not nonsignificant.
Statistical Significance of a PValue
As mentioned previously, the pvalue describes the probability of the occurrence of data by a random chance, which means evaluating the hypothesis of the null hypothesis. The value of the pvalue ranges anywhere from 0 to 1. Through general calculations, we can infer that as the pvalue gets smaller, the evidence of the null hypothesis being invalid gets stronger.
 p≤0.05: When the pvalue of a certain data set is lesser than 0.05, it is considered statistically insignificant. The mathematical representation of the same depicts that there is less than a 5% probability of the null hypothesis is valid. Thus, when we summarize that the null hypothesis must be rejected and accept the alternative hypothesis. However, we need to note that we cannot consider the alternative theory to be true by a 95% percent probability. However relevant the pvalue can be to the null hypothesis, it does not evaluate the validity of the alternative hypothesis.
 p≥0.05: When the pvalue of a data set is higher than 0.05, it is not considered statistically insignificant. Unlike the above case, where there is strong evidence supporting the validation of the null hypothesis. Thus, we can reject the alternative hypothesis and retain the use of the null hypothesis. However, by ‘rejecting’ the hypothesis for a case, we do not exactly debunk the hypothesis itself but instead, evaluate whether the obtained results support the hypothesis or do not support the hypothesis.
Main Differences Between TTest and PValue In Points
 The ttest can be explained as a method of inferential statistics that evaluates whether there is a significant difference between the two data sets recorded. On the other hand, the pvalue can be defined as the probability of obtaining an absolute tvalue, considering the null hypothesis stands valid after evaluation.
 The term ttest stands for 'test statistic' whereas the term pvalue stands for 'probability value'.
 The values required to calculate a tvalue are the mean values of each data set, the standard deviation of each group, and the number of data samples recorded in each group. On the other hand, we need the value of the deviation of the observed value from the standard value.
 Through a ttest, we can obtain the tvalues and the number of degrees of freedom of the data sets whereas through pvalues, we can obtain the conclusion of whether the null hypothesis can be rejected or supported.
 The pvalue of a ttest can be obtained through a manual calculation using the tdistribution tables or through online calculators/ software whereas a pvalue can be calculated through an inverse CDF.
Conclusion
Thus, through the above discussions and mathematical expressions, we can conclude that while both these concepts are significantly interlinked, they are not the same and cannot be used interchangeably. Both the concepts provide vital information that can be used for further statistical calculations.
References
 https://blog.minitab.com/en/adventuresinstatistics2/understandingtteststvaluesandtdistributions
 https://www.simplypsychology.org/pvalue.html