Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Datasets: import pandas as pd import numpy as np import seaborn as sns Run this code to plot a histogram of the ages ax =
Datasets:
import pandas as pd
import numpy as np
import seaborn as sns
Run this code to plot a histogram of the ages
ax snshistplotx"age",datapossum
axsetylabelfrequency
Copy and paste the code from above, and modify the plot by adding the "discrete" command.
Based on the plot above:
What was the most common age of the possums? What was the second most common age?
Create a violin plot of the length of the possums at each site.
Based on your violin plot, the shortest of all the possums live at which site number?
Code: vocab.head
Summary Code
vocabsummarybyyear vocab.groupbyyeareducation'vocabulary'mean
vocabsummarybyyear.resetindexinplaceTrue
vocabsummarybyyear.head
Create line plots to see how education and vocabulary have changed over the years. You will not use the vocab dataset! Instead, you will use the vocabsummarybyyear dataset, which has already aggregated the values from the original vocab dataset. Don't forget labels!
Education and Vocabulary Line Plot
Have education and vocabulary both changed? Does change in education at this point seem to relate to vocabulary scores?
Type your answer here, replacing this text.
a: Considering the data types we learned about in the first week, what is the data type of the education variable?
b: What is the data type of the vocabulary variable?
c: vocabscatterplot snsscatterplotx"education",y"vocabulary",datavocab
vocabscatterplot.setxlabeleducation years
vocabscatterplot.setylabelvocabulary test score out of
Hmm, this plot does not give us much information. Why not? What is it about this plot that makes it impossible for us to see the underlying information? Please be as specific as possible. Consider modules on scatter plots.
plota snsjointplotx"education", y"vocabulary", datavocab,kind"hist", discreteTrue,cbarTrue
plotasetaxislabelseducation years"vocabulary score out of
plotafig.suptitlePlot a
Identify the plot type shown on the middle and edges of the plot.
What observations do you make about the individual distributions of education and vocabulary?
What conclusion do you draw from this plot?
plotb snsjointplotx"education",y"vocabulary",datavocab,kind"reg"
plotbsetaxislabelseducation years"vocabulary score out of
plotbfig.suptitlePlot b
What elements have been added to the original plot?
What would you conclude from this plot?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started