Question

In: Statistics and Probability

1. Consider the builtin dataset iris. a. What is the structure of the iris data frame?...

1. Consider the builtin dataset iris.

a. What is the structure of the iris data frame?

b. Create a histogram of the Sepal.Width variable.

c. Create a histogram of the Petal.Width variable.

d. For both histograms, does the data appear normally distributed? Are they skewed?

e. For both histograms, does it appear that the data come from more than one populations?

f. What is the mean and median of Sepal.Width? What is the variance and standard deviation?

g. What is the mean and median of Petal.Width? What is the variance and standard deviation?

Solutions

Expert Solution

R codes

a)

> data = iris
> class(data)
[1] "data.frame"

b)

> hist(iris$Sepal.Width, main = 'Histogram of Sepal.Width')

c)

> hist(iris$Petal.Width, main = 'Histogram of Petal.Width')
>

d)

For Sepal.Width data is normally distributed.

For Peatl.Width data is not Normally distributed.

e)

For Petal.Width data appears to come from more than one population.

f)

> Sepal_width = iris$Sepal.Width
> mean(Sepal_width)
[1] 3.057333
> median(Sepal_width)
[1] 3
> var(Sepal_width)
[1] 0.1899794
> sd(Sepal_width)
[1] 0.4358663

g)

> Petal_width = iris$Petal.Width
> mean(Petal_width)
[1] 1.199333
> median(Petal_width)
[1] 1.3
> var(Petal_width)
[1] 0.5810063
> sd(Petal_width)
[1] 0.7622377


Related Solutions

1. Use the R command X <- iris to assign Fishers’ iris dataset to the data...
1. Use the R command X <- iris to assign Fishers’ iris dataset to the data matrix X. Using the head(X) command summarize what each column of the dataset is measuring and represents. Assign Y as a new matrix of dimension 150 by 4 which has the values of X without the species label. 2. Compute and interpret (in summary English) each of the summary statistics X,S,R using R. 3. Visualize the dataset by making a scatterplot of Sepal Length...
This is for Predictive Analytics. 1. Read the iris data set into a data frame. 2....
This is for Predictive Analytics. 1. Read the iris data set into a data frame. 2. Print the first few lines of the iris dataset. 3. Output all the entries with Sepal Length > 5. 4. Plot a box plot of Petal Length with a color of your choice. 5. Plot a histogram of Sepal Width. 6. Plot a scatter plot showing the relationship between Petal Length and Petal Width. 7. Find the mean of Sepal Length by species. Hint:...
Using R studio 1. Read the iris data set into a data frame. 2. Print the...
Using R studio 1. Read the iris data set into a data frame. 2. Print the first few lines of the iris dataset. 3. Output all the entries with Sepal Length > 5. 4. Plot a box plot of Petal Length with a color of your choice. 5. Plot a histogram of Sepal Width. 6. Plot a scatter plot showing the relationship between Petal Length and Petal Width. 7. Find the mean of Sepal Length by species. Hint: You could...
Using R Question 3. kNN Classification 3.1 Read in iris dataset using “data(iris)”. Describe the features...
Using R Question 3. kNN Classification 3.1 Read in iris dataset using “data(iris)”. Describe the features in the data using summary 3.2 Randomize the iris data set, mix it up and normalize it 3.3 split data into training & testing (70/30 split) 3.4 Train model in data and use crosstable function to evaluate the results 3.5 Rerun your code for K=10 and 100. Compare results and explain
Import the RestaurantRating1 dataset in R and save the resulting data frame. RestaurantRating1 is shown below...
Import the RestaurantRating1 dataset in R and save the resulting data frame. RestaurantRating1 is shown below as a table. Use some of the data wrangling techniques to transform the dataset into a tidy data. Use glimpse() function to show the resulting dataframe. Donalds Fila King Payes Wendi 1 3 1 1 1 2 3 1 1 2 2 3 1 2 2 3 3 1 2 2 3 3 1 3 3 3 3 5 3 3 3 3 5...
Part 1. Consider the dataset below. You will perform a series of regressions and data transformations....
Part 1. Consider the dataset below. You will perform a series of regressions and data transformations. Be sure to keep a record of all your computer results. First, please perform a simple linear regression. Predict Y if X = 40. To avoid rounding errors in ALL your calculations, please perform your calculations on your spreadsheet referencing data from your regression output. X Y 54 6 42 16 28 33 38 18 25 41 70 3 48 10 41 14 20...
Use the multi-layer perceptron algorithm to learn a model that classifies IRIS flower dataset. Split the...
Use the multi-layer perceptron algorithm to learn a model that classifies IRIS flower dataset. Split the dataset into a train set to train the algorithm and test set to test the algorithm. Calculate the accuracy. Use Scikit-Learn
Analyze used car inventory dataset using Python's pandas library - using DataFrame data structure¶ Dataset: UsedCarInventory_Assignment1.txt...
Analyze used car inventory dataset using Python's pandas library - using DataFrame data structure¶ Dataset: UsedCarInventory_Assignment1.txt (available on Canvas) This dataset shows used cars available for sale at a dealership. Each row represents a car record and columns tell information about each car. The first row in the dataset contains column headers. You must use Pandas to complete all 10 tasks.
Consider the diamonds data set. How many diamonds are there in the dataset with a cut...
Consider the diamonds data set. How many diamonds are there in the dataset with a cut considered Premium? 4906 12082 13791 21551 1610
Using the Iris dataset in R; PLEASE CREATE YOUR OWN FUNCTION USING FORMULAS INTEAD OF FUNCTIONS...
Using the Iris dataset in R; PLEASE CREATE YOUR OWN FUNCTION USING FORMULAS INTEAD OF FUNCTIONS THAT ARE BUILT IN R ,,,,,PLEASE TRY PLEASE a Carry out a hypothesis to test if the population sepal length mean is 6.2 at α = 0.05. Interpret your results. b Carry out a hypothesis to test if the population sepal width mean is 4 at α = 0.05. Interpret your results. c Carry out a hypothesis to test if the population sepal width...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT