The Student’s t-test is a statistical test that compares the mean and standard deviation of two samples to see if there is a significant difference between them. In an experiment, a t-test might be used to calculate whether or not differences seen between the control and each experimental group are a factor of the manipulated variable or simply the result of chance.
The T-test is a test of a statistical significant difference between two groups. A "significant difference" means that the results that are seen are most likely not due to chance or sampling error. In any experiment or observation that involves sampling from a population, there is always the possibility that an observed effect would have occurred due to sampling error alone. But if result is "significant," then the investigator may conclude that the observed effect actually reflects the characteristics of the population rather than just sampling error or chance.
In any significance test, there are two possible hypothesis:
Null Hypothesis:
"There is not a significant difference between the two groups; any observed differences may be due to chance and sampling error."
For example:
There is no significant difference between the control and treatment group enzyme activity; the difference we see in the means of the two groups may be due to chance and sampling error.
There is no significant difference between the blood pressure before and after treatment; the difference we see in the means of the two groups may be due to chance and sampling error.
Alternative Hypothesis:
"There is a significant difference between the two groups; the observed differences are most likely not due to chance or sampling error.
For example:
There is a significant difference between the control and treatment group enzyme activity; the difference seen in the means of the two groups is mostly likely not due to chance or sampling error.
There is a significant difference between the blood pressure before and after treatment; the difference we see in the means of the two groups is mostly likely not due to chance or sampling error.
Excel calculates a T-test in a slightly different way. Rather than giving you the t value and comparing it to a table, Excel simply tells you the probability that the means are different simply due to chance, the “P value.” Follow these steps to calculate a P value using a t-test with Excel:
Create two columns, side by side, for the data of interest. Each sample’s data should be in separate columns
Click on another blank cell where you wish the P value to appear.
Then click “fx” on the Excel Formulas toolbar.
In the box, search for the "T test" function and choose “T.TEST" from the list. Hit OK. You will need to set the t-test parameters:
For “Array1” highlight the data from one sample; for “Array2”, highlight the data in the second sample.
Enter “2” in the box for “Tails.”
Lastly, you will have to select the “Type” of t-test. For our purposes, we will mostly use type “2.” Although, if you are measuring the same sample at two points in time (for example before and after treatment) then you would have a type "1."
5. After answering these questions click “OK” and the P value will appear. The P value will fall between zero and one.
What does my P value mean? Excel gives the chance that the differences between the two samples are due to random chance alone. If Excel calculates a P value of 0.22, it means that there is a 22% likelihood that the difference in the means of your two data sets is due to random chance. Normally will say that a P value of .05 or less is significant in which case we reject the null hypothesis (accept the alternative hypothesis). If the P value is greater than 0.05, we accept the null hypothesis and conclude that there is no significant difference between the two groups.