This function calculates the weighted variance which is then used in the estimation step (E-step) of the EM algorithm
Examples
a <- 1:10
b <- seq(0.1, 1, length.out = 10)
weighted_var(a, b)
#> [1] 6.875
This function calculates the weighted variance which is then used in the estimation step (E-step) of the EM algorithm
a <- 1:10
b <- seq(0.1, 1, length.out = 10)
weighted_var(a, b)
#> [1] 6.875