The consumer expenditure survey, created by the U.S. Department of Labor, was administered to 30 households in Watauga County, North Carolina, to see how the cost of living in Watauga county with respect to total dollars spent on groceries compares with other counties. The amount of money each household spent per week on groceries is stored in the variable
A data frame with 30 observations on the following variable:
amount (total dollars spent on groceries)
Ugarte, M. D., Militino, A. F., and Arnholt, A. T. 2015. Probability and Statistics with R, Second Edition. Chapman & Hall / CRC.
1 2 3 4 5 6 7
with(data = GROCERY, z.test(amount, sigma.x = 25, mu = 100, alternative = "greater")) hist(GROCERY$amount, xlab = "Weekly grocery bill", main = "") ggplot(data = GROCERY, aes(x = amount, y = ..density..)) + geom_histogram(binwidth = 8, fill = "cornsilk", color = "gray80") + geom_density(color = "lightblue", size = 1, fill = "lightblue", alpha = .2) + labs(x = "Weekly grocery bill (in dollars)")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.