Solution-:
Given: X= Percent people of color and Y= Number of toxic waste sites
> X=c(6,20,14,3,9,22,11,8,31,16);X
[1] 6 20 14 3 9 22 11 8 31 16
> Y=c(3,14,10,4,8,17,6,3,15,10);Y
[1] 3 14 10 4 8 17 6 3 15 10
> #(B) Correlation
> r=cor(X,Y);r
[1] 0.9013878
> round(r,2)
[1] 0.9
> #(C)For regression equation
> fit=lm(Y~X);fit
Call:
lm(formula = Y ~ X)
Coefficients:
(Intercept) X
1.4167 0.5417
> #The equation of the line of regression of Y on X is: Y=
m*X+b or y=a+b*X
> #The equation of the line of regression of Y on X
is:Y=1.4167+0.5417*X
> # For Scatter diagram
> plot(X,Y,xlab=" % People of color",ylab="Number of toxic waste
sites",main="Scatter Diagram X Vs Y ")
> #Comment: This scatter diagram shows highly positive
correlation.
> #(D)The goal of a prediction problem is to give the correct
label (e.g. prediction or. output) to an instance
> #If you have a model that adequately fits the data, use it to
make predictions.
> #(E)coefficient of determination
> rr=r^2;rr
[1] 0.8125
> round(rr,2)
[1] 0.81
> #This indicate that there is relation between X and
Y.
R-Code:
X=c(6,20,14,3,9,22,11,8,31,16);X
Y=c(3,14,10,4,8,17,6,3,15,10);Y
#(B) Correlation
r=cor(X,Y);r
round(r,2)
#(C)For regression equation
fit=lm(Y~X);fit
#The equation of the line of regression of Y on X is: Y= m*X+b or
y=a+b*X
#The equation of the line of regression of Y on X
is:Y=1.4167+0.5417*X
# For Scatter diagram
plot(X,Y,xlab=" % People of color",ylab="Number of toxic waste
sites",main="Scatter Diagram X Vs Y ")
#Comment: This scatter diagram shows highly positive
correlation.
#(D)The goal of a prediction problem is to give the correct label
(e.g. prediction or. output) to an instance
#If you have a model that adequately fits the data, use it to make
predictions.
#(E)coefficient of determination
rr=r^2;rr
round(rr,2)
#This indicate that there is relation between X and
Y.
B-F show work please B. Calculate Pearson's r. C. Calculate the y-intercept, slope, and draw a...
B-F
C. Calculate the y-intercept, slope, and draw a Exercises For each of the problems below: A. Draw a scatterplot. B. Calculate Pearson's regression line on the scatterplot. D. Answer the "Prediction" problem. E. Calculate r and explain what it tells us about the relationship between the variables. F. Calculate the t-ratio for Pearson's r and deter- mine the level of significance. 1. Sociologists have discovered a phenomenon known as "environmental racism," a condition that exists when people of color...
For each of the problems below: A. Draw a scatterplot. B. Calculate Pearson's r C. Calculate the y-intercept, slope, and draw a regression line on the scatterplot. D. Answer the “Prediction" problem. E. Calculate r and explain what it tells us about the relationship between the variables. F. Calculate the t-ratio for Pearson's r and deter- mine the level of significance. 1. Sociologists have discovered a phenomenon known as "environmental racism," a condition that exists when people of color bear...