(USE R for all the questions) Without much explanation*, let's put the data into two variables called slength and swidth: slength <- iris$Sepal.Length[1:50] swidth <- iris$Sepal.Width[1:50] (a) Now perform a correlation test of sepal length vs. sepal width. Incidentally, should this test be one sided? Why or why not? (b) Now perform the correlation test again, this time do sepal width vs. sepal length. The results should be identical. Why?? (c) Create a scatterplot of the data.
Correlation
Correlation defines a relationship between two independent variables. It tells the degree to which variables move in relation to each other. When two sets of data are related to each other, there is a correlation between them.
Linear Correlation
A correlation is used to determine the relationships between numerical and categorical variables. In other words, it is an indicator of how things are connected to one another. The correlation analysis is the study of how variables are related.
Regression Analysis
Regression analysis is a statistical method in which it estimates the relationship between a dependent variable and one or more independent variable. In simple terms dependent variable is called as outcome variable and independent variable is called as predictors. Regression analysis is one of the methods to find the trends in data. The independent variable used in Regression analysis is named Predictor variable. It offers data of an associated dependent variable regarding a particular outcome.
(USE R for all the questions) Without much explanation*, let's put the data into two variables called slength and swidth:
slength <- iris$Sepal.Length[1:50]
swidth <- iris$Sepal.Width[1:50]
(a) Now perform a
(b) Now perform the correlation test again, this time do sepal width vs. sepal length. The results should be identical. Why??
(c) Create a
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 3 images