Get startedGet started for free

Scatter plot inspection

To get vital health data for tracking youth body mass index, health officials sent out a youth survey to a nationally representative sample of youths who were 14 to 20 years of age as of December 31, 1999. Dataset, youth_survey, tracks the age Age, height in inchesHeight_in, weight in pounds Weight_lbs, gender Gender, and the self reported multiple choice answer to the question, 'How would you describe your weight?' describe_weight, of a surveyed, nationally representative sample of youths.

In this exercise, you will visualize the data.

pandas has been loaded for you as pd, as well as matplotlib.pyplot as plt.

This exercise is part of the course

Analyzing Survey Data in Python

View Course

Exercise instructions

  • Create a scatter plot to determine if a linear regression model accurately relates Age and Height_in.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Create a scatter plot between `Age` and `Height_in`
____(____,____)
plt.show()
Edit and Run Code