Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

use R as coding language Question 6 The objective of this question is to give practice creating and interpreting scatterplots and visualizing categorical variables with

use R as coding language

image text in transcribed
Question 6 The objective of this question is to give practice creating and interpreting scatterplots and visualizing categorical variables with color. (-1) Use scatterplots to explore possible relationships between the four numeric variables carat. depth, table, and price. Based on these plots, which two variables seem to have the strongest relationship? Does this relationship appear to be linear or nonlinear? Hint I: Visualizing all possible relationships can be done with a single command. Hint 2: Since the diamonds data contains many observations, consider using optional arguments to remove redundant plots and/or shrink points to make the plot(s) take less time to generate. ('3) Construct a. scatterplot between the two numeric variables with the strongest relationship. Put the variable with higher variability on the y-axis. u Change the point character from the default open circle to a different symbol of your choice. - Shrink the size of the points to between 10 and 50% of the default size so that the points are easier to distinguish - Set the col argument to the clarity variable (i.e., col . clarity) to color the points in the scatterplot according to the clarity of each diamond. o Add a legend that explains the color coding in the plot. Explain why the default colors of 1 to 8 are chosen. Hint: What is the type] class of the clarity column? (C) Construct the same scatterplot from (b) again, but change the default colors to different colors of your choice. The color of the points shonid stilt correspond to the clarity of each diamond. Be sure to update the legend to correspond to your new color scheme. Him: The 657 built-in color names can be found with the command colors(), or view them here: http: / / www.stat.colmnbia.edu/~tzheng/ les / Rcolorpdf . You can also see hexadecimal codes for various colors and visualize different color combinations here: https://coolors.co/

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

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

Step: 2

blur-text-image

Step: 3

blur-text-image

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

Principles Of Finance

Authors: Julie Dahlquist, Rainford Knight

1st Edition

979-8439388899

Students also viewed these Mathematics questions