Analyzing Categorical Data(KA/SAP/U1AnalygingCategoricalData)

Unit 1: Analyzing Categorical Data

Analyzing One Categorical Variable

Categorical variables represent types or categories, such as colors, brands, or yes/no answers. To analyze them, we count how many times each category appears (frequency), and visualize the results using bar charts or pie charts.

Bar Chart Example: Favorite Fruit

Pie Chart Example: Favorite Fruit

Quiz: Analyzing One Categorical Variable

What type of chart is best for showing the distribution of favorite ice cream flavors among students?

Two-way Tables

Two-way tables (contingency tables) show the relationship between two categorical variables. Each cell shows the count for a combination of categories.

Two-way Table Example: Gender vs. Pet Ownership

Quiz: Two-way Tables

In a two-way table of gender (male/female) and pet ownership (dog/cat), what does a cell represent?

Distributions in Two-way Tables

We can analyze two-way tables by looking at marginal distributions (totals for each category), joint distributions (each cell), and conditional distributions (distribution of one variable for a fixed value of the other).

Stacked Bar Chart: Pet Ownership by Gender

Quiz: Distributions in Two-way Tables

What is a conditional distribution?

Comments

Popular posts from this blog

🧠 Building a Korean Character Recognition Model with PyTorch

🧠 Bayes' Theorem Interactive Game – Understand Conditional Probability Through Play

🎯 Building an Object Detection Model for MNIST with PyTorch (COCO-style Dataset)