x <- 0:4; p <- c(1/6,1/3,1/4,1/6,1/12); sum(p); sum(p*x); fractions( sum(p*x) ); sum(p*x^2); fractions( sum(p*x^2) );
Add the following code to your website.
REMOVE THIS Copy to clipboard
For more information on customizing the embed code, read Embedding Snippets.