weighted_variance_univariate | R Documentation |
Calculation of the weighted variance of numbers
weighted_variance_univariate(x, x_mean, precondition_values)
x |
vector of sampled sub-posterior values |
x_mean |
weighted mean of sampled sub-posterior values |
precondition_values |
precondition values associated to each sub-posterior |
the weighted variance of numbers
x <- rnorm(4, 0, 1) precondition_vals <- c(1, 2, 3, 4) x_mean <- weighted_mean_univariate(x = x, weights = 1/precondition_vals) weighted_variance_univariate(x = x, x_mean = x_mean, precondition_values = precondition_vals)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.