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.

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.
