Answered step by step
Verified Expert Solution
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 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 Spring". You can choose the exact name.
The path to the dataset on my computer is:
C:IMy DocumentsteachingStatistics SeminarsWeek 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 "cropdataset" and view the data using the View command.
v Compute the mean crop yield when fertilizer equals and the mean crop yield
when fertilizer equals
vi Perform a t test of the hypothesis that the mean crop yield when fertilizer is set to
is equal to the mean crop yield when fertilizer is set to against the alternative
hypothesis that the mean crop yield when fertilizer is set to is less than the mean
crop yield when fertilizer is set to
vii. Create a new fake variable called "pollution" by using the command sample
It must have elements with each element being a random draw from the vector:
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 "cropdataset" by adding a third variable: "pollution".
ix Compute the median pollution level when fertilizer is equal to
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started