[R] Standard deviation and Mean

jdanielnd jdanielnd at gmail.com
Tue Jun 14 21:49:58 CEST 2011


Well, it depends on what mean and sd do you want to calculate.

If it's the mean of the variation or frequency mean and sd from the showed
variables, you should do:
> mean(variation)
> sd(variation)
> mean(frequency)
> sd(frequency)

However, if you want to calculate the mean of variation, taking into account
the frequency it has, i.e., a weighted mean, then you should do:
> weighted.mean(variation,frequency)

HTH,

Joao Daniel

--
View this message in context: http://r.789695.n4.nabble.com/Standard-deviation-and-Mean-tp3597521p3597628.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list