Displaying Categorical Data: Learn It 1

  • Create frequency tables, bar graphs, and pie charts
  • Answer questions using information from frequency tables, bar graphs, and pie charts

Larks or Owls?

In a 2012 sleep study[1], a sample of 253 college students completed skills tests to measure cognitive function, surveys that asked many questions about attitudes and habits, and kept sleep diaries to record time and quality of sleep over a two-week period. The relationship between sleep and academic performance was evaluated.

Image of a person dozing off while taking notes on something on their computer.
Figure 1. Sleep habits—like being a night owl or early bird—can affect how students feel and perform during the day.

In the sleep study, students were asked if they identified as larks, owls, or neither. A “lark” is a morning person (someone who prefers the morning and sees it as the time they are happier or more productive), an “owl” is a night person (someone who prefers the evening hours and sees it as the time they are happier or more productive), and “neither” is a person who does not identify as either a morning or a night person. Their responses were recorded in a variable named Chronotype.

Sleep Study: Identifying Variables

In the college student sleep study[2], there were nine additional variables recorded in the data set beyond the Chronotype (lark, owl, or neither).

data dictionary

A data dictionary is a list of variable names presented in italics, followed by a brief description. This is often provided with large data sets to help users read the data.

  • Chronotype: Lark, owl, or neither; a lark is a morning person, an owl is a night person, and neither is neither a morning nor a night person
  • ClassYear: 1, 2, 3, 4; 1 = freshman, 2 = sophomore, 3 = junior, 4 = senior
  • NumEarlyClass: Number of classes per week taken before 9 am
  • EarlyClass: 0, 1; 0 = is not taking any early classes and 1 = is taking at least one early class
  • GPA: Grade point average (0–4 scale)
  • ClassesMissed: Number of classes missed in a semester
  • PoorSleepQuality: Measure of sleep quality (higher values indicate poorer sleep)
  • Stress: Coded stress score, normal or high
  • AlcoholUse: Self-reported alcohol use—abstain, light, moderate, heavy
  • Drinks: Number of alcoholic drinks per week

  1. Onyper, S., Thacher, P., Gilbert, J., & Gradess, S. (2012). Class start times, sleep, and academic performance in college: A path analysis. Chronobiology International, 29(3): 318–335.
  2. SleepStudy: Sleep Study. (2019, May 2). rdrr.oi. Retrieved from https://rdrr.io/cran/Lock5withR/man/SleepStudy.html