State | Claims | Surplus |
Alabama | 1425 | 277 |
Colorado | 273 | 100 |
Florida | 915 | 120 |
Illinois | 1687 | 259 |
Maine | 234 | 40 |
Montana | 142 | 25 |
North Dakota | 259 | 57 |
Oklahoma | 258 | 31 |
Texas | 894 | 141 |
1. Dataset Claims.csv include the claims (in $ millions) for BlueCross BlueShield benefits for nine states, along with the surplus (in $ millions) that the company had in assets in those states. Use the correct R command to compute the coefficient of correlation between claims and surplus. What is the correlation value? Do they positively or negatively correlate with each other? What is the strength of the correlation? Plot the claims and surplus in the same graph.
Consider the variable
X : Claims
Y : Surplus
Using R
> claims= c( 1425,273,915,1687,234,142,259,258,894)
> surplus=c(277,100,120,259,40,25,57,31,141)
> d=data.frame("Claims"=claims, "Surplus"=surplus)
> d
Claims Surplus
1 1425 277
2 273 100
3 915 120
4 1687 259
5 234 40
6 142 25
7 259 57
8 258 31
9 894 141
> r=cor(claims,surplus)
> r
[1] 0.956836
From the R-output the value of correlation between claims and surplus is 0.9569
Since the sign of r is positive, there is positive correlation between claims and surplus.
The value of r is 0.9569 ( lies between 0.70 to 1) there is strong positive linear relationship between claims and surplus.
To plot graph
> plot(claims, surplus, xlab="Claims", ylab="Surplus", main ="Scatter plot")
Get Answers For Free
Most questions answered within 1 hours.