Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

R question A i . Download the dataset called Crop dataset from the course Moodle page in the block for Spring Term Week 7

R question
A
i. Download the dataset called "Crop dataset" from the course Moodle page in the
block for "Spring Term Week 7". The name of the file should be "crop.csv".
ii. Move the dataset into a subdirectory on your computer with a name that is
something like "Homework for Week 7 Spring". You can choose the exact name.
The path to the dataset on my computer is:
C:IMy Documents|teaching|Statistics 2022|Seminars|Week 7 Spring
iii. Create a project in the subdirectory where you have placed your dataset.
iv. Open a new R Script and use the read.csv() command to open the file "crop.csv"
which you will call "crop_dataset" and view the data using the View() command.
v. Compute the mean crop yield when fertilizer equals 1 and the mean crop yield
when fertilizer equals 3.
vi. Perform a t test of the hypothesis that the mean crop yield when fertilizer is set to
"1" is equal to the mean crop yield when fertilizer is set to "3" against the alternative
hypothesis that the mean crop yield when fertilizer is set to "1" is less than the mean
crop yield when fertilizer is set to "3".
vii. Create a new (fake) variable called "pollution" by using the command sample().
It must have 96 elements with each element being a random draw from the vector:
(1,2,3,4,5)
Of course, your vector does not actually measure levels of pollution but, for the
purpose of this question we will pretend that it does.
viii. Modify your dataframe "crop_dataset" by adding a third variable: "pollution".
ix. Compute the median pollution level when fertilizer is equal to 2.
image text in transcribed

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

Database Fundamentals Study Guide

Authors: Dr. Sergio Pisano

1st Edition

B09K1WW84J, 979-8985115307

More Books

Students also viewed these Databases questions

Question

Some financial instruments are called derivatives. Why?

Answered: 1 week ago

Question

List three things that one should consider in the link to PPE.

Answered: 1 week ago

Question

Advance warning and an explanation for the layoff.

Answered: 1 week ago