Skip to main content

Computer Lab Project No. 2: Describing, Exploring, and Comparing Data - Graphically

In today’s lab we will explore creating and interpreting graphs such as bar plots, pie graphs, and histograms, as well as frequency tables, in StatCrunch.

Bar Plots

  1. Start StatCrunch.
  2. Load relevant data into StatCrunch.
  3. Click on “Graph” in the menu bar.
  4. Hover over “Bar Plot” in the pulldown menu.
  5. Click the “with data” option to use data consisting of individual outcomes in the data table.
  6. Select the column(s) to be displayed. If you want to choose several columns, you have to control-click them (hold down the Ctrl key while clicking the columns you want to display; this method works whenever you want to choose several items from a list, not only in the context of bar plots).
  7. There are some additional options. For example, “Group by” column allows you to make side-by-side bar plots, separating the data according to the chosen category. You can also choose the type (Frequency or Relative Frequency).
  8. Click “Compute!” to construct the bar plot(s).

Frequency Tables

  1. Load data into StatCrunch.
  2. Click on “Stat” in the menu bar.
  3. Hover over “Tables”.
  4. Click on “Frequency”.
  5. Select the column(s) for which summary statistics are to be computed.
  6. Click “Compute!” to generate the frequency table(s).

Histograms

  1. Load data into StatCrunch.
  2. Click on “Graph” in the menu bar.
  3. Click on “Histogram”.
  4. Select column(s) to be displayed.
  5. The optional “Group by” column allows you to create side-by-side histograms, separating the data according to the chosen category.
  6. You may set additional options such as “Type” (Frequency or Relative Frequency), number of bins, and bin width.
  7. You can choose labels for the X/Y-axis, a title, a color scheme, etc., under “Graph properties”.
  8. If you create several histograms simultaneously, you may specify how many will go on one page (rows/columns).
  9. Click “Graph!” to construct the histogram(s).

Pie Charts

  1. Start StatCrunch.
  2. Load relevant data into StatCrunch.
  3. Click on “Graph” in the menu bar.
  4. Hover over “Pie Chart” in the pulldown menu.
  5. The remaining steps are almost identical to the ones described under “Bar Plots”.

Lab Activities

Part 1

  1. Load the data set titled Births into MyStatLab.
  2. Use both a pie chart and bar plot to display the days of the week at which the patients were released from hospital (the column Discharged).
  3. Which of these two ways of representing the distribution of the discharge weekdays do you think is more useful?

Part 2

  1. Load the data set titled Freshman 15. It is a sample of weights and body mass index measurements from students taken at the beginning and end of the freshman year.
  2. Use StatCrunch to create a frequency table and histogram of the variables WT SEPT and WT APR.
  3. What relative frequency of people start their freshman year weighing less than 70 kilograms? How does this compare for men and women? What relative frequency of people end their freshman year weighing less than 70 kilograms?
  4. Describe the distributions of these two variables. Are the data Normally distributed?
  5. To analyze the weight gain/loss, let’s create a new calculated column containing the difference between the weight in April and the weight in September. Follow these steps:
    1. Click “Data” in the menu.
    2. Click “Compute Expression” in the pulldown menu.
    3. Type “WTAPR-WTSEP” in the text field.
    4. Type a title for the new column. For example “WTGAIN”.
    5. Click “Compute!” to create the column.
  6. Create a histogram of the calculated weight gain column.
  7. Create histograms of that column, grouped by the students’ sex, using the same x-axis and y-axis, with both histograms displayed side by side on one page.