By Hand

Suppose we have a dataset for a group of 50 adults, showing the number of teeth each person has…​

0, 0, 0, 0, 0, 22, 26, 27, 28, 28, 28, 28, 29, 29, 29, 30, 30, 30, 30, 30, 31, 31, 31, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32

1 Use the data to complete the frequency table below. (The last cell has been completed for you.)

number of teeth 0-4 5-9 10-14 15-19 20-24 25-29 30-34

frequency

35

2 Use the frequency table to draw a histogram below, filling in each interval so that its height is equal to the frequency.

histogram with bin width of five: 0 to 4, 5 to 9, etc. ready to be filled in

In Pyret

Open the Tooth Data Starter File. Make a copy, and click "Run".

3 Type tooth-table in the Interactions window. Press enter. What do you see?

4 Type count(tooth-table, "num-teeth") in the Interactions window and press enter. How is the frequency table created in Pyret different from the one that you created, above?

5 What bin sized was used for the Tooth Data frequency table and the histogram above?

6 Build tooth-table. Does this data appear to be the same or different from the tooth data that appeared in the first section?

7 Use the contract below to build a histogram in Pyret of the distribution of teeth.

# histogram :: (Tabletable-name, Stringlabels, Stringcolumn-name, Numberbin-size) -> Image

8 How does the histogram you created in Pyret look similar to the one that you drew? Are there any ways in which the histogram you created in Pyret is different than the one you created by hand?

These materials were developed partly through support of the National Science Foundation, (awards 1042210, 1535276, 1648684, 1738598, 2031479, and 1501927). CCbadge Bootstrap by the Bootstrap Community is licensed under a Creative Commons 4.0 Unported License. This license does not grant permission to run training or professional development. Offering training or professional development with materials substantially derived from Bootstrap must be approved in writing by a Bootstrap Director. Permissions beyond the scope of this license, such as to run training, may be available by contacting contact@BootstrapWorld.org.