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 amount.

GROCERY

Format

A data frame with 30 observations on the following variable:

  • amount (total dollars spent on groceries)

References

Ugarte, M. D., Militino, A. F., and Arnholt, A. T. 2015. Probability and Statistics with R, Second Edition. Chapman & Hall / CRC.

Examples

with(data = GROCERY, 
z.test(amount, sigma.x = 25, mu = 100, alternative = "greater"))
#> 
#> 	One Sample z-test
#> 
#> data:  amount
#> z = 4.5205, p-value = 3.084e-06
#> alternative hypothesis: true mean is greater than 100
#> 95 percent confidence interval:
#>  113.1256      Inf
#> sample estimates:
#> mean of x 
#>  120.6333 
#> 
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)")