## Question

1. The data set “exam.scores.txt” contains the exam scores of 40 students.

a. Make a histogram for the exam scores using bins of width 10 beginning at 120 and ending at 200.

b. Make a frequency polygon for the exam scores using bins of width 10 beginning at 120 and ending at 200.

c. Make a plot of the Empirical Cumulative Distribution Function (ECDF) for the exam scores. Hint: use the R function “ecdf”.

2. The data set “exams12.scores.txt” contains exam 1 and exam 2 scores of 40 and 37 students, respectively. Make a histogram for the exam scores using bins of width 10 beginning at 120 and ending at 200.

a. Make a side-by-side histograms for both the first and second exam scores.

b. Make a side-by-side boxplots for both the first and second exam scores.

c. On the same graph, plot the Empirical Cumulative Distribution Functions (ECDFs) for both the first and second exam scores. Add a legend to the plot.

d. Construct a scatterplot of Exam 1 score and Exam 2 score. Comment on the scatterplot.

e. Based on the plot(s) for both the first and second exam scores, which exam has higher scores in general? Which plot(s) you used to answer this question?

3. The “iris” data set contains four numerical attributes (variables)

“Sepal.Length”, “Sepal.Width”, “Petal.Length”, “Petal.Width”, and one categorical attribute (variable) “Species”, with 150 observations (rows). The “iris” data set is available in R.

a. Use the R function “summary()” to get a quick summary of all attributes.

b. Use the R function “apply()” to find the mean, median, variance, standard deviation, minimum, maximum, and Interquartile Range (IQR) for the attributes “Sepal.Length”, “Sepal.Width”,

“Petal.Length”, “Petal.Width”.

c. Make a side-by-side boxplots for for the attributes

“Sepal.Length”, “Sepal.Width”, “Petal.Length”, “Petal.Width”.

d. Construct a scatterplot of “Sepal.Length” and “Sepal.Width”. Comment on the scatterplot.

e. Construct a scatterplot of “Petal.Length”, “Petal.Width”. Comment on the scatterplot.

f. Construct the scatterplot matrix of the five attributes

“Sepal.Length”, “Sepal.Width”, “Petal.Length”, “Petal.Width”, and “Species”.

## Solution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

By purchasing this solution you'll be able to access the following files:

Solution.zip.