data analysis with python coursera week 3 quiz answers

Practice Quiz: Descriptive Statistics

1. What plot would you see after running the following lines of code?

x=df[“engine-size”]
y=df[“price”]
plt.scatter(x,y)
plt.title(“Scatterplot of Engine Size vs Price”)
plt.xlabel(“Engine Size”)
plt.ylabel(“Price”)

Practice Quiz: GroupBy in Python

2. Select the appropriate description of a pivot table:

  • A pivot table has one variable displayed along the columns and the other variable displayed along the rows.
  • A pivot table contains statistical information for each column

Correlation

3. Select the scatter plot with weak correlation:

Practice Quiz: Correlation - Statistics

4. Consider the following scatter plots a,b and c. What plot would have the highest correlation coefficient? (Note: this one is harder than it seems)

  • a
  • b
  • c
  • they all have the same value

Graded Quiz: Exploratory Data Analysis

5. Consider the dataframe df; what method provides the summary statistics?

  • describe()
  • head()
  • tail()

6. What is the largest possible element resulting in the operation df.corr()?

  • 100
  • 1000
  • 1

7. If the p-value of the Pearson Correlation is 1, then ...

  • The variables are correlated
  • The variables are not correlated
  • None of the above

8. Consider the dataframe df;what method displays the first five rows of a dataframe?

  • df.describe()
  • df.head()
  • df.tail()

9. What is the Pearson Correlation between variables X and Y, if X=-Y?

  • -1
  • 1
  • 0

Leave a Reply