In today’s session, we worked with three variables from a dataset: ‘age,’ which is a numerical variable, ‘sex,’ categorized as ‘m’ (male) or ‘w’ (female), and ‘race,’ designated as ‘w’ (white), ‘b’ (black), ‘h’ (Hispanic), and ‘a’ (Asian).
We conducted basic statistical analyses on the ‘age’ feature, calculating the maximum, minimum, median, and mode, and visualized the distribution of ages with histograms.
Furthermore, we used the ‘race’ variable to determine the average ages within each racial group. Similarly, we analyzed age in relation to ‘sex/gender’ to compare the average ages between males and females.