What does a t-test tell us that just comparing two means doesn't? I'm confused how comparing two mean values is different from doing a t-test. Can't I just see the two means and conclude if there's a difference? How does ttest makes sure if the 2 means are statistically different?
 A: 
I'm confused how comparing two mean values is different from doing a t-test.
Can't I just see the two means and conclude if there's a difference?

When you're "comparing two mean values" you are generally looking at two sample means. Of course these are going to be different (almost always). But the question people are usually interested in is not whether the specific arithmetic means in the observed samples were different. Naturally they expect that this will be the case.
What is usually of interest is to use the samples to infer something about the populations from which the samples were drawn.
For example, it may be of interest to know whether the sample means are further apart than we should reasonably see if the population means were in fact the same.

How does ttest makes sure if the 2 means are statistically different?

As an example, if you want to test whether a particular drug lowers blood pressure better than a placebo would, you might compare the average change (before minus after) for the treatment and placebo groups. Under typical assumptions, if the drug has no more effect than a placebo then we can work out what the distribution of a (standardized) difference in sample mean blood pressure change should look like. If the drug really has an effect we would expect the drop in blood pressure to tend to be larger than we might reasonably see if it did nothing more than the placebo.
If the difference is large enough that it'd be highly surprising to see one (a mean blood pressure drop between treatment and placebo) at least that big if there were no effect, you're left with two possibilities (if your assumptions hold) --

*

*the two population mean changes (blood pressure decreases) don't differ but a surprising outcome occurred anyway (akin to tossing at least 7 heads in 8 tosses of a fair coin, say), or


*the drug had some effect (above that of a placebo) and there's no need to invoke a minor miracle to explain such a large sample difference.
If the difference in means (treatment vs placebo) is small, we will not find the "no effect" explanation hard to maintain (a difference at least that large could readily occur). As the difference becomes very large this explanation becomes more and more untenable.
We have to decide at what point we will move from the first kind of explanation to the second.
The t-test simply formalizes this process; we compute a standardized difference between the two mean drops in blood pressure (the t-statistic), and if a difference at least that large would be extremely rare (if the drug was no additional help above the placebo) we conclude that the only tenable explanation is that the population means  do differ (that the drug has a bigger effect than could be accounted for by it being no better than placebo).
Our significance level gives us the formal cut-off point (i.e. how rare is too rare to continue to accept that the 'no difference' explanation is believable).
All the standard null-hypothesis significance tests (all the tests you're likely to learn about any time soon) use the same logic. What changes is the specific hypothesis, the test statistic and its distribution if the null hypothesis is true.
A: The t test compares two mean values and tells you if they are different from each other. 
Of course, you could look at the two numbers and see if they are different, but the t test can tell you how significant the differences are. In other words it lets you know if those differences could have happened by chance.
Take the below data of test scores for 7 different students.
You want to know if test A is more difficult than test B
    Scores  
  St#   A     B
     1  9     2
     2  9     5
     3  28    37
     4  27    49
     5  45    74
     6  45    78
     7  87    97

**Mean 35.7  48.9**

The mean values are different. You might conclude that test A is more difficult than test B.
However, you perform a paired t-test: p value = 0.067 
This is higher than the accepted cut off of 0.05, therefore you have failed to reject the null hypothesis that the exams are of equal difficulty (this result could have been due to chance, so you can't say test A is more difficult)
This result is due to the small number of students that you involved in your experiment. Because the t-test equation involves the standard deviation and the number of values, you can get different degrees of significance by changing the number of participants.
Lets say you try the experiment again, but with more students.
    Scores  
St# A   B
1   9   2
2   9   5
3   28  37
4   27  49
5   45  74
6   45  78
7   87  97
8   9   2
9   9   5
10  28  42
11  27  51
12  45  74
13  55  63
14  54  68
15  61  83

Mean    35.9  48.7

The means are still different from each other, and haven't changed much from your previous experiment.
However, when you repeat your t test: p value = 0.003
This is because you have reduced your standard deviation by increasing the number of students. You are therefore more likely to detect a real difference in exam difficulty.
Simply looking at the two means will not help you decide whether the difference is statistically significant, but a t-test can!
A: If you compare the two numbers like (a == b), you don't get vital statistical information such as confidence interval and p-value. Furthermore, you will throw away the sample size information. If you want variability measurement, you will need to do a statistical test.
