knitr::opts_chunk$set(echo = TRUE)
$\$
$\$
library(fivethirtyeight) data(bechdel) domgross <- bechdel$domgross_2013 # plot a histogram of the data with the axes labeled # calculate the mean and median # add lines to the histogram and the mean and median
$\$
We can calculate z-scores using the formula: $z_i = \frac{x_i - \bar{x}}{s}$
$\$
# the revenue for star wars star_wars_gross <- 1771682790 # calculate the z-score for star wars
$\$
$\$
# movie quantiles # five number summary
$\$
# load the dow data # SDS100::download_data("DowPrices.csv") dow <- read.csv("DowPrices.csv") # get the daily percent change percent_change <- dow$PercentChange # calculate the range where 95% of the data is expected if the data were normally distributed # get the actual quantiles from the data # create a histogram of the data # get a five number summary
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.