Description Usage Arguments Details Value See Also Examples
weighted_stats returns the expectation/mean, population variance and standard deviations from a weighted vector (differing probabilities/distribution).
1 | weighted_stats(x, p)
|
x |
vector of values, e.g. |
p |
vector of probabilities/frequencies, e.g. |
probabilities accepts values for both frequency as well as probabilities.
Expectation/Mean
Population Variance and Standard Deviation
key_stats for calculating x with a uniform distribution.
1 2 | weighted_stats(c(2,3,4), c(1,1,2))
weighted_stats(c(2,3,4), c(0.25,0.25,0.5))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.