class: inverse, left background-image: url(https://images.unsplash.com/photo-1548610325-af59423f54bc?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1393&q=80) background-size: cover # .Large[Sleepy Students?] #### .tiny[Dr. Evangeline Reynolds | 2022-09-19 |Image credit: No Revisions, Upsplash] ??? <!-- adjust font size in this css code chunk, currently 80 --> <style type="text/css"> .remark-code{line-height: 1.5; font-size: 80%} @media print { .has-continuation { display: block; } } code.r.hljs.remark-code{ position: relative; overflow-x: hidden; } code.r.hljs.remark-code:hover{ overflow-x:visible; width: 500px; border-style: solid; } </style> --- count: false .panel1-mysetup-auto[ ```r *library(tidyverse) ``` ] .panel2-mysetup-auto[ ] --- count: false .panel1-mysetup-auto[ ```r library(tidyverse) *url <- "https://raw.githubusercontent.com/rslasater82/MA206Datasets/main/sleep.csv" ``` ] .panel2-mysetup-auto[ ] --- count: false .panel1-mysetup-auto[ ```r library(tidyverse) url <- "https://raw.githubusercontent.com/rslasater82/MA206Datasets/main/sleep.csv" *read_csv(file = url) ``` ] .panel2-mysetup-auto[ ``` # A tibble: 51 × 1 hours <dbl> 1 6 2 5 3 7 4 6 5 6.5 6 6 7 5.5 8 6 9 4 10 5.5 # … with 41 more rows ``` ] --- count: false .panel1-mysetup-auto[ ```r library(tidyverse) url <- "https://raw.githubusercontent.com/rslasater82/MA206Datasets/main/sleep.csv" read_csv(file = url) -> * sleep ``` ] .panel2-mysetup-auto[ ] --- count: false .panel1-mysetup-auto[ ```r library(tidyverse) url <- "https://raw.githubusercontent.com/rslasater82/MA206Datasets/main/sleep.csv" read_csv(file = url) -> sleep *sleep ``` ] .panel2-mysetup-auto[ ``` # A tibble: 51 × 1 hours <dbl> 1 6 2 5 3 7 4 6 5 6.5 6 6 7 5.5 8 6 9 4 10 5.5 # … with 41 more rows ``` ] --- count: false .panel1-mysetup-auto[ ```r library(tidyverse) url <- "https://raw.githubusercontent.com/rslasater82/MA206Datasets/main/sleep.csv" read_csv(file = url) -> sleep sleep %>% * summarize(xbar = mean(hours), * s = sd(hours), * n = n()) ``` ] .panel2-mysetup-auto[ ``` # A tibble: 1 × 3 xbar s n <dbl> <dbl> <int> 1 5.94 0.894 51 ``` ] <style> .panel1-mysetup-auto { color: black; width: 38.6060606060606%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-mysetup-auto { color: black; width: 59.3939393939394%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-mysetup-auto { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> --- count: false .panel1-plot-auto[ ```r *sleep ``` ] .panel2-plot-auto[ ``` # A tibble: 51 × 1 hours <dbl> 1 6 2 5 3 7 4 6 5 6.5 6 6 7 5.5 8 6 9 4 10 5.5 # … with 41 more rows ``` ] --- count: false .panel1-plot-auto[ ```r sleep %>% * ggplot() ``` ] .panel2-plot-auto[ ![](exploration_exercise_sleep_files/figure-html/plot_auto_02_output-1.png)<!-- --> ] --- count: false .panel1-plot-auto[ ```r sleep %>% ggplot() + * scale_x_continuous(limits = c(0,10), * breaks = 0:10) ``` ] .panel2-plot-auto[ ![](exploration_exercise_sleep_files/figure-html/plot_auto_03_output-1.png)<!-- --> ] --- count: false .panel1-plot-auto[ ```r sleep %>% ggplot() + scale_x_continuous(limits = c(0,10), breaks = 0:10) + * aes(x = hours) ``` ] .panel2-plot-auto[ ![](exploration_exercise_sleep_files/figure-html/plot_auto_04_output-1.png)<!-- --> ] --- count: false .panel1-plot-auto[ ```r sleep %>% ggplot() + scale_x_continuous(limits = c(0,10), breaks = 0:10) + aes(x = hours) + * geom_rug() ``` ] .panel2-plot-auto[ ![](exploration_exercise_sleep_files/figure-html/plot_auto_05_output-1.png)<!-- --> ] --- count: false .panel1-plot-auto[ ```r sleep %>% ggplot() + scale_x_continuous(limits = c(0,10), breaks = 0:10) + aes(x = hours) + geom_rug() + * geom_dotplot(dotsize = .8) ``` ] .panel2-plot-auto[ ![](exploration_exercise_sleep_files/figure-html/plot_auto_06_output-1.png)<!-- --> ] --- count: false .panel1-plot-auto[ ```r sleep %>% ggplot() + scale_x_continuous(limits = c(0,10), breaks = 0:10) + aes(x = hours) + geom_rug() + geom_dotplot(dotsize = .8) + * ggxmean::geom_x_mean() ``` ] .panel2-plot-auto[ ![](exploration_exercise_sleep_files/figure-html/plot_auto_07_output-1.png)<!-- --> ] --- count: false .panel1-plot-auto[ ```r sleep %>% ggplot() + scale_x_continuous(limits = c(0,10), breaks = 0:10) + aes(x = hours) + geom_rug() + geom_dotplot(dotsize = .8) + ggxmean::geom_x_mean() + * geom_vline(xintercept = 8, * linetype = "dashed") ``` ] .panel2-plot-auto[ ![](exploration_exercise_sleep_files/figure-html/plot_auto_08_output-1.png)<!-- --> ] --- count: false .panel1-plot-auto[ ```r sleep %>% ggplot() + scale_x_continuous(limits = c(0,10), breaks = 0:10) + aes(x = hours) + geom_rug() + geom_dotplot(dotsize = .8) + ggxmean::geom_x_mean() + geom_vline(xintercept = 8, linetype = "dashed") + * ggxmean::geom_normal_dist(fill = "magenta") ``` ] .panel2-plot-auto[ ![](exploration_exercise_sleep_files/figure-html/plot_auto_09_output-1.png)<!-- --> ] --- count: false .panel1-plot-auto[ ```r sleep %>% ggplot() + scale_x_continuous(limits = c(0,10), breaks = 0:10) + aes(x = hours) + geom_rug() + geom_dotplot(dotsize = .8) + ggxmean::geom_x_mean() + geom_vline(xintercept = 8, linetype = "dashed") + ggxmean::geom_normal_dist(fill = "magenta") + * ggxmean::geom_normal_dist_zlines(color = "magenta") ``` ] .panel2-plot-auto[ ![](exploration_exercise_sleep_files/figure-html/plot_auto_10_output-1.png)<!-- --> ] --- count: false .panel1-plot-auto[ ```r sleep %>% ggplot() + scale_x_continuous(limits = c(0,10), breaks = 0:10) + aes(x = hours) + geom_rug() + geom_dotplot(dotsize = .8) + ggxmean::geom_x_mean() + geom_vline(xintercept = 8, linetype = "dashed") + ggxmean::geom_normal_dist(fill = "magenta") + ggxmean::geom_normal_dist_zlines(color = "magenta") + * ggxmean::stamp_t_dist(sd = .89/sqrt(51), * df = 51-1, * mean = 8, * alpha = .7, * fill = "goldenrod") ``` ] .panel2-plot-auto[ ![](exploration_exercise_sleep_files/figure-html/plot_auto_11_output-1.png)<!-- --> ] --- count: false .panel1-plot-auto[ ```r sleep %>% ggplot() + scale_x_continuous(limits = c(0,10), breaks = 0:10) + aes(x = hours) + geom_rug() + geom_dotplot(dotsize = .8) + ggxmean::geom_x_mean() + geom_vline(xintercept = 8, linetype = "dashed") + ggxmean::geom_normal_dist(fill = "magenta") + ggxmean::geom_normal_dist_zlines(color = "magenta") + ggxmean::stamp_t_dist(sd = .89/sqrt(51), df = 51-1, mean = 8, alpha = .7, fill = "goldenrod") + * ggxmean:::geom_tdist(fill = "cadetblue", * alpha = .8) ``` ] .panel2-plot-auto[ ![](exploration_exercise_sleep_files/figure-html/plot_auto_12_output-1.png)<!-- --> ] --- count: false .panel1-plot-auto[ ```r sleep %>% ggplot() + scale_x_continuous(limits = c(0,10), breaks = 0:10) + aes(x = hours) + geom_rug() + geom_dotplot(dotsize = .8) + ggxmean::geom_x_mean() + geom_vline(xintercept = 8, linetype = "dashed") + ggxmean::geom_normal_dist(fill = "magenta") + ggxmean::geom_normal_dist_zlines(color = "magenta") + ggxmean::stamp_t_dist(sd = .89/sqrt(51), df = 51-1, mean = 8, alpha = .7, fill = "goldenrod") + ggxmean:::geom_tdist(fill = "cadetblue", alpha = .8) + * ggxmean:::geom_ttestconf(color = "darkred", * size = 3, * alpha = 1) ``` ] .panel2-plot-auto[ ![](exploration_exercise_sleep_files/figure-html/plot_auto_13_output-1.png)<!-- --> ] <style> .panel1-plot-auto { color: black; width: 38.6060606060606%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-plot-auto { color: black; width: 59.3939393939394%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-plot-auto { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style>