Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

the answers should be in R code - Try to access the dataset Nile which contains the water supply of Nile from 1871 to 1970

the answers should be in R code

- Try to access the dataset "Nile" which contains the water supply of Nile from 1871 to 1970 and find out the mean of water supply.

- In the class, we have already learnt how to import data stored in a CSV file. Try to import data from members.csv and do some basic manipulation as taught in lecture.

- The "obama_vs_mccain" dataset contains the fractions of people voting for Obama and McCain in the 2008 US presidential elections. Use the data to draw a histogram to show the distribution of the percentage of votes for Obama. Define the number of bins to be 4.

- Use iris dataset, which is available in R. Do the following steps: (a) Make a boxplot of Sepal.Width stratified by Species. (b) Change the range of the y-axis so it starts at 2 and ends at 4.5. (c) Modify the boxplot function so it doesnt draw ticks nor labels of the x and y axes. (d) Add notches to the boxes in the plot. (e) Increase the distance between boxes in the plot. (f) Change the color of the box borders to blue, the color of the median lines and the outlier points to red. (g) Add title to the boxplot. (h) Add x-axis, y-axis label and y-axis ticks to the boxplot.

- Simulate 500 standard normal random variables, with mean=100 and standard deviation=15. Find P(X= 100), P(X<= 100) and the 35th percentile of the distribution. Draw the histogram of the random variables, and add the density curve to the graph.

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

Conceptual Database Design An Entity Relationship Approach

Authors: Carol Batini, Stefano Ceri, Shamkant B. Navathe

1st Edition

0805302441, 978-0805302448

More Books

Students also viewed these Databases questions

Question

4 When is it a good idea to use the external supply of labour?

Answered: 1 week ago