Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The objective of this question is to give practice building a plot that uses several optional arguments and low level functions, including a legend with

The objective of this question is to give practice building a plot that uses several optional arguments and low level functions, including a legend with mixed types of symbols.

Create overlapping relative frequency histograms for the distributions of weight split by the mother's smoker status (either smoker or non-smoker). Be sure that the plot satisifies the following criteria:

Change the x-label and main title to be more informative.

Use different colors for the two histograms. Change the density of the shading so that the overlap between the histograms is visible.

Superimpose density curves of the data, matching the color of the curves to the corresponding histogram.

Add vertical lines that show the median weights for each distribution.

Add a legend that helps understand the various colors/components of the plot.

Based on the plot, do you think there is a significant difference between the typical weight of a baby born to a mother who smokes and the typical weight of a baby born to a mother who does not smoke?

Hint: For legends with mixed types of symbols (points, lines, boxes, etc.), the pch, lty, density, and border (and other) arguments use NA to exclude those arguments from modifying the corresponding entries in the legend (fill uses 0 instead of NA). For example, a legend with two box entries and one line entry could have arguments density = c(20, 30, NA), border = c(1, 1, NA), and lty = c(NA, NA, 1).

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

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

Discrete Mathematics Mathematical Reasoning And Proof With Puzzles, Patterns, And Games

Authors: Douglas E Ensley, J Winston Crawley

1st Edition

1118226534, 9781118226537

More Books

Students also viewed these Mathematics questions

Question

Identify the main contents of this book.

Answered: 1 week ago

Question

8. How can an interpreter influence the message?

Answered: 1 week ago

Question

Subjective norms, i.e. the norms of the target group

Answered: 1 week ago