Open the Age vs. Height Starter File and click "Run" to interact with data from another sample of students.

1 Take a look at the code in the Definitions Area. What do you notice? What do you wonder?

2 Build image-scatter-plot(h-table, "age", "height", dot). Try to visualize the line of best fit for just the blue dots. Then try to visualize the line of best fit for just the red stars. How do you think they would compare? Which line do you think would be steeper?

3 Make three linear regression plots comparing age and height, and record the results for each in the table below:

  • The whole population: lr-plot(h-table, "gender-id", "age", "height")

  • Females only: lr-plot(filter(h-table, is-f), "gender-id", "age", "height")

  • Males only: lr-plot(filter(h-table, is-m), "gender-id", "age", "height")

Sample rate of change y-intercept R value




4 What makes it difficult to compare these plots visually?

Rebuild lr-plot(filter(h-table, is-f), "gender-id", "age", "height"), adjust the window of the interactive plot using the numbers in the table below, and click Redraw.

x-min: x-max: y-min: y-max:





Then, do the same for lr-plot(filter(h-table, is-m), "gender-id", "age", "height").

5 How do the plots compare now that their windows match?

6 What happens if you compare the students' height in inches to their height in centimeters by plotting lr-plot(h-table, "gender-id", "height-cm", "height")?

These materials were developed partly through support of the National Science Foundation, (awards 1042210, 1535276, 1648684, and 1738598). 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