iris is a built-in R data set (data frame). This data set contains gives the measurements in centimeters of the variables sepal length and width and petal length and width, respectively, for 50 flowers from each of 3 species of iris. The species are Iris setosa, versicolor, and virginica. We are interested in some descriptive statistics related to the Sepal.Width column of the data frame. We can access the data directly by using the assignment x <- iris$Sepal.Width (In R use ?iris for info on this dataset.) Remember: x <- iris$Sepal.Width a.Calculate the sample median of x. b. Using the R quantile function, find the .80 quantile of x.(80th percentile) c. Calculate the interquartile range of x using R. d. Calculate the sample mean of x.
iris is a built-in R data set (data frame). This data set contains gives the measurements in centimeters of the variables sepal length and width and petal length and width, respectively, for 50 flowers from each of 3 species of iris. The species are Iris setosa, versicolor, and virginica. We are interested in some
Remember: x <- iris$Sepal.Width
a.Calculate the sample
b. Using the R quantile
c. Calculate the
d. Calculate the sample
e. Calculate a 4% trimmed mean for x.
f. Calculate the sample variance of x.
g. Calculate the sample standard deviation of x.
h. What proportion of the x values are within 2.0 sample standard deviations from the sample mean
i. Calculate the minimum value of x.
j. What number do you get if you add up the square roots of the values in x?
Step by step
Solved in 2 steps with 1 images