Contingency tables, bivariate statistics, and checking for data normality
Contingency tables are frequency tables represented by two or more categorical variables along with the proportion of each class represented as a group. Frequency table is used to represent one categorical variable; however, contingency table is used to represent two categorical variables.
Let's see an example to understand contingency tables, bivariate statistics, and data normality using the Cars93
dataset:
> table(Cars93$Type) Compact Large Midsize Small Sporty Van 16 11 22 21 14 9 > table(Cars93$AirBags) Driver & Passenger Driver only None 16 43 34
The individual frequency table for two categorical variables AirBags
and Type
of the car is represented previously: ...
Get R: Mining Spatial, Text, Web, and Social Media Data now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.