程序代写代做 graph R Exercise

R Exercise
Requirements
1. Complete the entire assignment using this Word document.
2. If a question requires R scripts, you copy your R scripts and the
corresponding outputs from your RStudio and paste them here in response
to the question.
3. Submit your work as an attachment via the assignment link which will be
available on the blackboard.
4. You may find the following resources helpful:
 Elementary Statistics with R (http://www.r-tutor.com/elementary- statistics).
o MostRrelatedproblemsfollowthisRtutorial.
o InadditiontotheRTutorialvideoforbeginners(Seeblackboard),the
section “R Introduction” will give you a starting point for learning R.
 https://www.youtube.com/watch?v=VGKz3Jkx-9I&t=326s (This video
helps with joint frequency distribution, a.k.a. cross-tabulation or contingency table).
Problem 1
Nearly 1.8 million bachelor’s degrees and over 750,000 master’s degrees are awarded annually by U.S. postsecondary institutions. The department of Education tracks the field of study for these graduates in the following categories: Business (B), Computer Sciences and Engineering (CSE), Education (E), Humanities (H), Natural Sciences and Mathematics (NSM), Social and Behavioral Sciences (SBS), and Other (O). Use the data in the file “Majors.csv” to answer the following questions in R.
1. Find the frequency distribution of the Bachelor’s degree.
Paste your R scripts and the output here.
2. Find the relative frequency distribution of the Master’s degree.
Paste your R scripts and the output here.
3. Find the joint frequency distribution of the Bachelor’s degree and the Master’s degree.
Paste your R scripts and the output here.
4. Find the joint relative frequency distribution of the Bachelor’s degree and the Master’s degree.
Paste your R scripts and the output here.

5. Create a bar chart of the Bachelor’s degree.
Paste your R scripts and the output here.
6. Create a pie chart of the Master’s degree.
Paste your R scripts and the output here.

Problem 2
The 32 teams in the National Football League (NFL) are worth, on average, $1.17 billion, 5 percent more than last year. The data file “NFLTeamValue.csv” shows the annual revenue ($ millions) and the estimated team value ($ millions) for the 32 NFL teams (Forbes website, February 28, 2014).
Please read the data from “NFLTeamValue.csv” and complete the following tasks. Note: In total, there are 32 NFL teams. Therefore, the data contains the entire population. Make sure you use appropriate formulas (for population, not for sample) when computing the values needed.
Answer the following questions in R.
1. Find the frequency distribution of the team revenue from 200 to 550 with
the length of each interval being 50.
Paste your R scripts and the output here.
2. Create a histogram of the team revenue based on the frequency distribution above.
Paste your R scripts and the output here.
3. Find the relative frequency distribution of the team value from 750 to 2500 with the length of each interval being 250.
Paste your R scripts and the output here.
4. Find the cumulative frequency distribution of the team revenue.
Paste your R scripts and the output here.
5. Create a cumulative frequency graph of the team revenue.
Paste your R scripts and the output here.
6. Find the cumulative relative frequency distribution of the team value.
Paste your R scripts and the output here.
7. Create a cumulative relative frequency graph of the team value.
Paste your R scripts and the output here.
8. Create a stem-and-leaf plot of the team revenue.
Paste your R scripts and the output here.

9. Create a scatter plot of the team revenue against the team value.
Paste your R scripts and the output here.
10. Find the mean, median, all quartiles, 30th, 90th and 95th percentiles, range, and IQR of the team revenue.
Paste your R scripts and the output here.
11. Note that the dataset includes the entire population. Compute the variance of the team revenue. Define a function named “sd.p” that computes the population standard deviation. Use “sd.p” to compute the standard deviation of the team revenue.
Paste your R scripts and the output here.
12. Plot a box plot of the team value.
Paste your R scripts and the output here.
13. Define a function named “cov.p” that compute the population covariance. Use “cov.p” to compute the covariance of the team revenue and the team value. Compute the correlation coefficient of the team revenue and the team value.
Paste your R scripts and the output here.
Problem 3…… (to be continued)