Subtract the known average of the general population from the average you found for your sample. If you found that your 20 college friends drink an average of two cups of coffee a day, you would subtract four, or the amount for the average population, from two, equaling -2 cups per day.
Divide this number by the "standard error" of the difference. To find the standard error, divide the variance for each group by the number of people in the group. Add these two numbers, then take their square root. If the variance for your coffee sample was 0.2 and the variance for your population was 0.8, assuming a population of 400 college students, your standard error would be 0.11.
Compute the T-value by dividing the difference between the averages for the two groups by the standard error. Note that the T-value will be positive if your population average is larger than your sample one. In the coffee study, you would divide -2, the difference between the averages of the two groups, by 0.11, your standard error. This value equals -18.2.
Set an "alpha" level, also known as a "risk" level, for your analysis. Most analyses use a 0.05 alpha level, meaning that you are 95 percent sure there is a real difference between the two groups, not just a difference found by chance.
Calculate the "degrees of freedom" (DF). For a T-test, this is the sum of the people in the two groups minus 2. For the coffee study, you would have a total of 420, or 400 in the population and 20 in your sample, minus 2, which equals a DF of 418.
Decide whether your T-value is significant. You will need to use a standard table of significance for T-values to look up whether your value is large enough to be statistically significant. You can find these tables online or in most statistical books. If your calculated value is large enough to be significant, you will find a value less than your alpha of 0.05 in the table of significance. If you look up the number for your coffee study using your DF and calculated T-value and find a value of 0.025, you have a significant T-value.