Recall & Review
beginner
What is cross-tabulation in data analysis?
Cross-tabulation is a method to summarize the relationship between two or more categorical variables by showing their frequency distribution in a table format.
Click to reveal answer
beginner
What does the pandas function
crosstab() do?crosstab() creates a cross-tabulation table that counts the frequency of combinations of values from two or more categorical variables.Click to reveal answer
beginner
How do you interpret the rows and columns in a crosstab table?
Rows represent categories of one variable, columns represent categories of another variable, and the cell values show how many times each combination occurs.
Click to reveal answer
intermediate
What parameter in
crosstab() allows you to add margins (totals)?The parameter
margins=True adds row and column totals to the crosstab table.Click to reveal answer
intermediate
How can you normalize a crosstab table to show proportions instead of counts?
Use the
normalize parameter in crosstab(). For example, normalize='index' shows row-wise proportions.Click to reveal answer
What type of variables is
crosstab() mainly used for?✗ Incorrect
crosstab() is designed to analyze categorical variables by counting combinations of their categories.
Which pandas function creates a frequency table for two categorical variables?
✗ Incorrect
crosstab() is the function that creates cross-tabulation frequency tables.
What does setting
margins=True do in crosstab()?✗ Incorrect
It adds a row and column showing the total counts.
How can you get proportions instead of counts in a crosstab table?
✗ Incorrect
Using normalize='index' or normalize='columns' shows proportions by row or column.
If you want to analyze the relationship between gender and purchase decision, which function is best?
✗ Incorrect
crosstab() helps summarize how gender and purchase decision categories relate.
Explain what cross-tabulation is and how
crosstab() helps in data analysis.Think about how you compare two groups in a simple table.
You got /4 concepts.
Describe how to add totals and normalize data in a crosstab table using pandas.
Consider how to see overall counts and proportions.
You got /3 concepts.