Question
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
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