I wrote this code in R:
getinfoNumeric <- function(attr) {
cat(min(attr), " ")
cat(max(attr), " ")
cat(mean(attr), " ")
cat(var(attr), " ")
cat(sd(attr), " ")
}
When I apply it to an attribute, it gives me the following result:
- 50
- 100
- 71.89536
- 37.50461
- 6.124101
I don't understand the meaning of the last two values. Can you help me? I learnt that:
variance measures how far a set of numbers are spread out from their average value
the standard deviation is a measure of the amount of variation or dispersion of a set of values. A low standard deviation indicates that the values tend to be close to the mean of the set, while a high standard deviation indicates that the values are spread out over a wider range
But, looking at this data, what does it mean? My data is about cocoa percentage in chocolate bars. So the minimum percentage is 50%, the maximum is 100% and the mean value is 71.89%. But what about variance and standard deviation? Does the variance mean that the percentage of chocolate is concentrated between 71.89 - 37.5 and 71.89 + 37.5? And what about standard deviation? Does it mean that the percentage tends to be close to the mean?
Histogram: