Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

https://drive.google.com/file/d/1sz32tfzRPM1DgkDpm57ZL2pwVHYrG0oN/view?usp=sharing The link above is data # Upload the epa data set # call the dataset cardata cardata = read.csv(file.choose(), header = TRUE) View(cardata) #

https://drive.google.com/file/d/1sz32tfzRPM1DgkDpm57ZL2pwVHYrG0oN/view?usp=sharing

The link above is data

# Upload the epa data set

# call the dataset cardata

cardata = read.csv(file.choose(), header = TRUE)

View(cardata)

# A side by side boxplot

boxplot(FiveYearEstimatedCost~Guzzler, data = cardata,

main = "add title",

xlab = "add horizontal axis name",

col = c("red", "green"), ### add different color names

horizontal = TRUE)

# Calculate the mean, sd and sample sizes for five year fuel cost split among Guzzler and no Guzzler

# the command aggregate() will perform the given function on the specified groups

# aggregate(response~treatment, data = datasetname, function)

# Make a table of values with the results.

aggregate(FiveYearEstimatedCost~Guzzler, data = cardata, mean)

aggregate(FiveYearEstimatedCost~Guzzler, data = cardata, sd)

aggregate(FiveYearEstimatedCost~Guzzler, data = cardata, length)

# What type of vehicles are Guzzlers? Find out by subsetting the dataset to only include Guzzlers.

GuzzlersOnly = subset(cardata, Guzzler == "Guzzler")

View(GuzzlersOnly)

# Perform a two sample t test

# Use the same response~treatment format as the functions above.

# t.test(response~treatment, data = datasetname, conf.level = enterconfidencelevel, alternative = "two.sided" ))

For the last part of the data , that is this part. create code for it.

# Perform a two sample t test

# Use the same response~treatment format as the functions above.

# t.test(response~treatment, data = datasetname, conf.level = enterconfidencelevel, alternative = "two.sided" ))

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

Finite Math And Applied Calculus

Authors: Stefan Waner, Steven Costenoble

2nd Edition

ISBN: 0534366309, 9780534366308

More Books

Students also viewed these Mathematics questions

Question

Calculate the IRR.

Answered: 1 week ago