This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(gganimate) | |
set.seed(8) | |
grid <- seq(-5,12, by=0.01) | |
x <- seq(-3,9, by=1) | |
y <- x^2 + rnorm(n=length(x), sd=30) | |
data <-tibble(x=x, y=y) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(gganimate) | |
sample_size <- seq(5, 30, by=5) | |
create_data <- function(sample_size){ | |
tibble(ss=sample_size, n=1:1e6, x=map(n, ~runif(sample_size))) %>% | |
mutate(mean = map_dbl(x, mean), | |
median = map_dbl(x, median), | |
range = map_dbl(x, ~(max(.x) - min(.x))/2)) %>% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(gganimate) | |
# Grid for plotting | |
x <- seq(0,10, length.out = 1e3) | |
# Sample Sizes | |
n <- 1:20 | |
# Create the densities at each value of the grid |
NewerOlder