How does the variance measure the information about the data? Variance measures the amount of information in the data set. How?
Mathematically, the variance is the measure of the variability in the data. So, how this can be explained as a measure of the amount of information in the data? Could you please explain this with a simple example?
I read the following post, here, which makes me confused about, how the variance measures the information about the data? I thought it is just a measure of how the point is far away from the mean.
 A: One way to think about the amount of information in a dataset is to see how spread out the data points are.
For example, if you had a dataset of five identical body weights x = [120, 120, 120, 120, 120], there is very little information here as there is no spread or variability at all - knowing the weight of one person tells us the weight of the others.
Now, the variance tells us how spread out the data are, by taking the average squared deviations from the mean. So the more spread out our data are, the larger the variance. In x above, the variance is 0, which is consistent with the observation that there is very little information in x.
Edit
This is an oversimplified and misleading explanation - please refer to kjetil b halvorsen's answer above for a more nuanced and correct explanation.
A: This is not about variance but rather about PCA and principal components. PCA searches for orthogonal principal components (a linear combination of variables) which maximize explained variability (or equivalently minimize the squared distance from the points to the line; think of it as $R^2$ - the higher it is the more variability we explained, which means the points are closer to the fitted line).
When we do this we say that the first PC explains most of the data, i.e. it explains most of the variability, i.e. it contains most of the information about the data, because it's what we can explain best, given our data. However, this does not necessarily mean that this information is of any value to us, the model may be learning associations which are perfectly clear to us or which are not of interest.
In conclusion, this is not about variance, but rather about "explained variance", which is distributed among the PC's and which is interpreted (by some people) as "how much information this particular PC holds given all the rest".
A: Say you have a dataset about persons with two features: weight and number of eyes. Which of these two features do you think is more informative for describing persons, i.e. given a data point, which feature makes it easier for you to identify the person it represents?
Here, given enough data, weight will have a much greater variance than number of eyes, whose variance will be close to zero. Therefore, we can conclude that weight is more informative than number of eyes.
A: 
Variance measures the amount of information in the data set. How?

Information is a slippery concept, so it pays to be a little concrete. So specialize to the case of a regression model. You have some variables $x_1, x_2, \dotsc, x_p$, say, which you wants to use to predict or explain $Y$. Lets say now that all the observations of $x_1$ are equal, so its variance is zero. This variable will not be useful for explaining $Y$. If you want to study, say, the relationship between education level and income, but your sample only includes college graduates without any post-graduate education, how useful will that be?  It is in this sense that variance can be a measure of information in the data.
But this will only make sense in relationship to some given model. "Information" in the abstract, without any qualification, does not make sense.  To see that more clearly, another example: let’s say your observations are repeated measurements of the same specimen, length, weight, whatever. The ideal case is that all are equal — no measurement error. Variance in this case represents measurement error, and higher variance corresponds to less information!
A: Others already answered conveying perfectly some concepts but the major misunderstatement remains to be clarified: variance IS NOT information, is not even vaguely linked to information. In some application as PCA it is a parameter that allows you to evaluate how much information you can extract from your data with that specific tool, but this is not a measure of information of the data at all. I will not go into mathematical explanation because it is probably better to give basic ideas first (and there are very good formal explanation out there): information is the reduction of uncertainty, lack of variance in data does not correlate in any way with the information, it just means that the phenomenon is steady and this is a big amount of information because it reduces the a priori uncertainty about that phenomenon. The key concept is that information depends on the relation between the observer and the data, not on the data itself: if you think to source coding (data compression as an example) small variance means that you can use less symbols to encode the data and so it means less information, but if you think to channel coding (a repetition code for example) in a large set of "1" there could be no "useless" symbol because every symbol carries part of the original information, there are codes way better than the repetion code to increase the amount of information carried by each symbol, still it is the proof that having n+1 equal values conveys more information than n equal values and so even with 0 variance the information increases. Example: you receive a boolean information on a noisy channel with 0.5 cross-channel probability, if you receive "1" you have exactly 0 bit of information because there is no way to know if the sended bit was 0 or 1, if the sender repeats his message 3 times and you receive "111" you know that the probability that the message was 1 is 0.875 and with 0 variance you have a lot of information, passing from no information at all (1) to very good confidence (111).
