Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Instructions: you first must install the Ecdat package with the command. What code did you use to answer the questions? install.packages(Ecdat) library(Ecdat) head(Cigarette) Questions 1.

Instructions: you first must install the Ecdat package with the command. What code did you use to answer the questions?

install.packages("Ecdat")

library(Ecdat)

head(Cigarette)

Questions

1. Create a boxplot of the average number of packs per capita by state. Which states have the highest number of packs? Which have the lowest?

2. Find the median over all the states of the number of packs per capita for each yearPlot this median value for the years from 1985 to 1995. What can you say about cigarette usage in these years?

3. Create a scatter plot of price per pack vs number of packs per capita for all states and years?

4. Are the price and the per capita packs positively correlated, negatively correlated, or uncorrelatedExplain why your answer would be expected?

5. Change your scatter plot to show the points for each year in a different color. Does the relationship between the two variable change over time?

How did you get the code for these questions?

Step by Step Solution

3.43 Rating (150 Votes )

There are 3 Steps involved in it

Step: 1

1 box plot C i... 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

Introduction to Financial Accounting

Authors: Charles Horngren, Gary Sundem, John Elliott, Donna Philbrick

11th edition

978-0133251111, 013325111X, 0133251039, 978-0133251036

Students also viewed these Computer Engineering questions

Question

What does non-recourse financing mean?

Answered: 1 week ago