Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

6 Review the data shown in Table 1.6 that describes several chemical properties

ID: 3355337 • Letter: 6

Question

6 Review the data shown in Table 1.6 that describes several chemical properties of polycyclic aromatic hydrocarbons. a. Use the tabulated data to calculate means, standard deviations for molecular weight and solubility, correlation r, coefficient of determination R2, slope m, intercept b, and the equation of the least-squares line for this case. Hint: consider plotting molecular weight on the abscissa and the logarithm of solubility on the ordinate. b. Use an internet search engine to define the soil-water partition coefficient. Use the tabulated data to calculate means, standard deviations for solubility and the soil-water partition coefficient, correlation r, coefficient of determination R2, slope m, intercept b,

Explanation / Answer

rm(list=ls(all=TRUE))

> ####Molecular weight

> x=c(78.11,92.1,106.17,106.17,128.16,154.21,152.2,166.2,202,178.23,178.23,202.26,228,

+ 252.3,228.2,252,276,278.35,252);x

[1] 78.11 92.10 106.17 106.17 128.16 154.21 152.20 166.20 202.00 178.23 178.23 202.26

[13] 228.00 252.30 228.20 252.00 276.00 278.35 252.00

> n1=length(x);n1

[1] 19

> ###Solubility

> y=c(1780,500,170,150,31.7,3.93,3.93,1.98,0.275,1.29,0.073,0.135,0.014,0.0038,0.006,0.0012,

+ 0.00026,0.00249,0.00055);y

[1] 1.78e+03 5.00e+02 1.70e+02 1.50e+02 3.17e+01 3.93e+00 3.93e+00 1.98e+00 2.75e-01 1.29e+00

[11] 7.30e-02 1.35e-01 1.40e-02 3.80e-03 6.00e-03 1.20e-03 2.60e-04 2.49e-03 5.50e-04

> n2=length(y);n2

[1] 19

> #####Soil-water partition coefficient

> z=c(97,242,363,622,1300,2580,3814,5835,19000,23000,26000,63000,125719,282185,420108,

+ 1148497,1488389,1668800,2020971);z

[1] 97 242 363 622 1300 2580 3814 5835 19000 23000 26000

[12] 63000 125719 282185 420108 1148497 1488389 1668800 2020971

> n3=length(z);n3

[1] 19

>

> cbind(x,y,z)

x y z

[1,] 78.11 1.78e+03 97

[2,] 92.10 5.00e+02 242

[3,] 106.17 1.70e+02 363

[4,] 106.17 1.50e+02 622

[5,] 128.16 3.17e+01 1300

[6,] 154.21 3.93e+00 2580

[7,] 152.20 3.93e+00 3814

[8,] 166.20 1.98e+00 5835

[9,] 202.00 2.75e-01 19000

[10,] 178.23 1.29e+00 23000

[11,] 178.23 7.30e-02 26000

[12,] 202.26 1.35e-01 63000

[13,] 228.00 1.40e-02 125719

[14,] 252.30 3.80e-03 282185

[15,] 228.20 6.00e-03 420108

[16,] 252.00 1.20e-03 1148497

[17,] 276.00 2.60e-04 1488389

[18,] 278.35 2.49e-03 1668800

[19,] 252.00 5.50e-04 2020971

> #####aaaaa

> ###Mean of molecular weight

> xbar=mean(x);xbar

[1] 184.7837

> ####Variance of molecular weight

> xvar=(1/n1)*sum((x-xbar)^2);xvar

[1] 3841.46

> ##Standard deviation of molecular weight

> xsd=sqrt(xvar);xsd

[1] 61.97952

> ###Mean of solubility

> ybar=mean(y);ybar

[1] 139.1232

> ####Variance of solubility

> yvar=(1/n2)*sum((y-ybar)^2);yvar

[1] 163320.6

> ##Standard deviation of solubility

> ysd=sqrt(yvar);ysd

[1] 404.1294

> ##Covariance between molecular weight and solubility

> xycov=sum(((1/n1)*x*y))-xbar*ybar;xycov

[1] -13866.19

> ##Correlation between molecular weight and solubility

> xycor=xycov/(xsd*ysd);xycor

[1] -0.5535905

> #linear regression

> a1=lm(log(y)~x);a1

Call:

lm(formula = log(y) ~ x)

Coefficients:

(Intercept) x  

13.1143 -0.0762  

> ###solpe= -0.0762 and intercept=13.1143

> summary(a1)

Call:

lm(formula = log(y) ~ x)

Residuals:

Min 1Q Median 3Q Max

-2.1497 -0.2421 0.1084 0.3093 2.1016

Coefficients:

Estimate Std. Error t value Pr(>|t|)   

(Intercept) 13.114275 0.663150 19.78 3.60e-13 ***

x -0.076204 0.003402 -22.40 4.67e-14 ***

---

Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.9192 on 17 degrees of freedom

Multiple R-squared: 0.9672, Adjusted R-squared: 0.9653

F-statistic: 501.6 on 1 and 17 DF, p-value: 4.672e-14

> ## coefficient of determination R^2=0.9672

> #####bbbbbbbbbbbbbbb

> ###Mean of soil-water partition coefficient

> zbar=mean(z);zbar

[1] 384238

> ####Variance of soil-water partition coefficient

> zvar=(1/n3)*sum((z-zbar)^2);zvar

[1] 414523332875

> ##Standard deviation of soil-water partition coefficient

> zsd=sqrt(zvar);zsd

[1] 643834.9

> ###Mean of solubility

> ybar=mean(y);ybar

[1] 139.1232

> ####Variance of solubility

> yvar=(1/n2)*sum((y-ybar)^2);yvar

[1] 163320.6

> ##Standard deviation of solubility

> ysd=sqrt(yvar);ysd

[1] 404.1294

> ##Covariance between soil-water partition coefficient and solubility

> zycov=sum(((1/n1)*z*y))-zbar*ybar;zycov

[1] -53425681

> ##Correlation between soil-water partition coefficient and solubility

> zycor=zycov/(zsd*ysd);zycor

[1] -0.2053313

> #linear regression

> a2=lm(z~log(y));a2

Call:

lm(formula = z ~ log(y))

Coefficients:

(Intercept) log(y)  

290295 -97150  

> ###solpe= -97150 and intercept=290295

> summary(a2)

Call:

lm(formula = z ~ log(y))

Residuals:

Min 1Q Median 3Q Max

-579278 -381959 -153519 261350 1001511

Coefficients:

Estimate Std. Error t value Pr(>|t|)   

(Intercept) 290296 109767 2.645 0.017029 *  

log(y) -97150 22407 -4.336 0.000449 ***

---

Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 469000 on 17 degrees of freedom

Multiple R-squared: 0.5251, Adjusted R-squared: 0.4972

F-statistic: 18.8 on 1 and 17 DF, p-value: 0.0004491

> ## coefficient of determination R^2=0.5251

> #####ccccccccccccccccc

> ###Mean of molecular weight

> xbar=mean(x);xbar

[1] 184.7837

> ####Variance of molecular weight

> xvar=(1/n1)*sum((x-xbar)^2);xvar

[1] 3841.46

> ##Standard deviation of molecular weight

> xsd=sqrt(xvar);xsd

[1] 61.97952

> ###Mean of soil-water partition coefficient

> zbar=mean(z);zbar

[1] 384238

> ####Variance of soil-water partition coefficient

> zvar=(1/n3)*sum((z-zbar)^2);zvar

[1] 414523332875

> ##Standard deviation of soil-water partition coefficient

> zsd=sqrt(zvar);zsd

[1] 643834.9

> ##Covariance between soil-water partition coefficient and molecular weight

> zxcov=sum(((1/n1)*z*x))-zbar*xbar;zxcov

[1] 28857111

> ##Correlation between soil-water partition coefficient and molecular weight

> zxcor=zxcov/(zsd*xsd);zxcor

[1] 0.723153

> a3=lm(z~x);a3

Call:

lm(formula = z ~ x)

Coefficients:

(Intercept) x  

-1003860 7512  

> ###solpe= 7512 and intercept=-1003860

> summary(a3)

Call:

lm(formula = z ~ x)

Residuals:

Min 1Q Median 3Q Max

-609237 -310507 -135655 285787 1131803

Coefficients:

Estimate Std. Error t value Pr(>|t|)   

(Intercept) -1003860 339155 -2.960 0.008773 **

x 7512 1740 4.317 0.000468 ***

---

Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 470100 on 17 degrees of freedom

Multiple R-squared: 0.523, Adjusted R-squared: 0.4949

F-statistic: 18.64 on 1 and 17 DF, p-value: 0.0004676

> ## coefficient of determination R^2=0.523

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote