Answered step by step
Verified Expert Solution
Link Copied!

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 = sns.histplot(x="age",data=possum)
ax.set_ylabel('frequency')
...
...
11*. Copy and paste the code from above, and modify the plot by adding the "discrete" command.
12*. Based on the plot above:
What was the most common age of the possums? What was the second most common age?
13*. Create a violin plot of the length of the possums at each site.
14*. Based on your violin plot, the shortest of all the possums live at which site number?
15*. Code: vocab.head()
(Summary Code)
vocab_summary_by_year = vocab.groupby("year")[['education','vocabulary']].mean()
vocab_summary_by_year.reset_index(inplace=True)
vocab_summary_by_year.head()
17*. 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 vocab_summary_by_year dataset, which has already aggregated the values from the original vocab dataset. Don't forget labels!
(Education and Vocabulary Line Plot)
18*. 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.
18a: Considering the 4 data types we learned about in the first week, what is the data type of the education variable?
18b: What is the data type of the vocabulary variable?
18c: vocab_scatterplot = sns.scatterplot(x="education",y="vocabulary",data=vocab)
vocab_scatterplot.set_xlabel("education (years)")
vocab_scatterplot.set_ylabel("vocabulary test score (out of 10)")
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.)
19*. plot19a = sns.jointplot(x="education", y="vocabulary", data=vocab,kind="hist", discrete=True,cbar=True)
plot19a.set_axis_labels("education (years)","vocabulary (score out of 10)")
plot19a.fig.suptitle("Plot 19a")
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?
plot19b = sns.jointplot(x="education",y="vocabulary",data=vocab,kind="reg")
plot19b.set_axis_labels("education (years)","vocabulary (score out of 10)")
plot19b.fig.suptitle("Plot 19b")
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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

More Books

Students also viewed these Databases questions

Question

What song would you say best sums you up?

Answered: 1 week ago

Question

Chapter 3: P3-7A pages 163-164 of the textbook.

Answered: 1 week ago