4.5 EXERCISES

Table 4.8 shows a series of retail transactions monitored by the main office of a computer store.

  1. Generate a contingency table summarizing the variables Store and Product category.
  2. Generate the following summary tables:
    1. Grouping by Customer and the showing a count of the number of observations and the sum of Sale price ($) for each row.
    2. Grouping by Store and showing a count of the number of observations and the mean Sale price ($) for each row.
    3. Grouping by Product category and showing a count of the number of observations and the sum of the Profit ($) for each row.

      Table 4.8. Retail transaction data set

      images

  3. Create a histogram of Sales Price ($) using the following intervals: 0 to less than 250, 250 to less than 500, 500 to less than 750, 750 to less than 1000.
  4. Create a scatterplot showing Sales price ($) against Profit ($).

Get Making Sense of Data: A Practical Guide to Exploratory Data Analysis and Data Mining 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.