Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Inspect

Percent of vehicles passing inspection by type inspection station


Description

Data for Exercise 8.59

Usage

Inspect

Format

A data frame/tibble with 174 observations on two variables

station

a factor with levels auto inspection, auto repair, car care center, gas station, new car dealer, and tire store

passed

a factor with levels less than 70%, between 70% and 84%, and more than 85%

Source

The Charlotte Observer, December 13, 1992.

References

Kitchens, L. J. (2003) Basic Statistics and Data Analysis. Pacific Grove, CA: Brooks/Cole, a division of Thomson Learning.

Examples

T1 <- xtabs(~ station + passed, data = Inspect)
T1
barplot(T1, beside = TRUE, legend = TRUE)
chisq.test(T1)
rm(T1)

## Not run: 
library(ggplot2)
ggplot2::ggplot(data = Inspect, aes(x = passed, fill = station)) + 
           geom_bar(position = "dodge") + 
           theme_bw()

## End(Not run)

BSDA

Basic Statistics and Data Analysis

v1.2.0
GPL (>= 2)
Authors
Alan T. Arnholt [aut, cre], Ben Evans [aut]
Initial release
2017-07-29

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.