Calculate Sum of Squared Deviations (2 Examples) | Sum of Squares | sum(), mean(), var() & length()

preview_player
Показать описание
R code of this video:

x <- 11:20 # Create example vector
x # Print example vector

ss_1 <- sum((x - mean(x))^2) # Calculate sum of squares
ss_1 # Print sum of squares

ss_2 <- var(x) * (length(x) - 1) # Calculate sum of squares
ss_2 # Print sum of squares

Follow me on Social Media:

Рекомендации по теме