Question

The data frame `x77` contains data from each of the fifty United States. First coerce the `state.x77` variable into a data frame with:*

```{r, eval=FALSE}

x77 <- data.frame(state.x77)

```

*For the following, make a scatter plot with the regression line:*

1. *The model of illiteracy rate (`Illiteracy`) modeled by high school graduation rate (`HS.Grad`).*

2. *The model of life expectancy (`Life.Exp`) modeled by the murder rate (`Murder`).*

3. *The model of income (`Income`) modeled by the illiteracy rate (`Illiteracy`).*

*Write a sentence or two describing any relationship for each fo the relationships examined above. In particular, do you find it as expected or surprising?*

Please provide code from R and answer all the
questions.

Answer #1

Solution:

x77 <- data.frame(state.x77)

library(ggpubr)

require(ggpubr)

ggscatter(x77, x = "HS.Grad", y = "Illiteracy", add = "reg.line")
+

stat_cor(label.y = 300) +

stat_regline_equation(label.y = 280)

There exists a a negative relationship between HS Grad and Illiteracy.

as Illiteracy increases,,HS grad decreases.

Rgression eq is

illiteracy=3.8-0.05*HS Grad

R=-0.66

p=2.2*10^-7

p<0.05

Relationship between HS Grad and Illiteracy. is statistically significant at 5% level of signfiicance

Solution2:

ggscatter(x77, x = "Murder", y = "Life.Exp", add = "reg.line")
+

stat_cor(label.y = 300) +

stat_regline_equation(label.y = 250)

Life expectancy =73-0.28*Murder

there exists a negative relationship between murders and life expectancy.

As number of murders increases,life expectancy decreases and vice versa.

R=-0.78

p=2.3*01^-11

p<0.05

Relationship between HS Grad and Illiteracy. is statistically significant at 5% level of signfiicance

3. *The model of income (`Income`) modeled by the illiteracy rate (`Illiteracy`).*

ggscatter(x77, x = "Illiteracy", y = "Income", add = "reg.line")
+

stat_cor(label.y = 400) +

stat_regline_equation(label.y = 50)

Regression eq is

income=5000-440*Illiteracy

There exists a negative relationship between Income and Illiteracy

as Illiteracy rate is high,income earned is low and viceversa

r=-0.44

p=0.0015

p<0.05

Relationship between income and Illiteracy. is statistically significant at 5% level of signfiicance

(1 point) College Graduation
Rates. Data from the College Results Online
website compared the 2011 graduation rate and school size for 92
similar-sized public universities and colleges in the United
States. Statistical software was used to create the linear
regression model using size as the explanatory variable and
graduation rate as the response variable. Summary output from the
software and the scatter plot are shown below. Round all calculated
results to four decimal places.
Coefficients
Estimate
Std. Error
t value
Pr(>|t|)...

Alabama
3615
3624
2.1
69.05
15.1
41.3
20
50708
Alaska
365
6315
1.5
69.31
11.3
66.7
152
566432
Arizona
2212
4530
1.8
70.55
7.8
58.1
15
113417
Arkansas
2110
3378
1.9
70.66
10.1
39.9
65
51945
California
21198
5114
1.1
71.71
10.3
62.6
20
156361
Colorado
2541
4884
0.7
72.06
6.8
63.9
166
103766
Connecticut
3100
5348
1.1
72.48
3.1
56.0
139
4862
Delaware
579
4809
0.9
70.06
6.2
54.6
103
1982
Florida
8277
4815
1.3
70.66
10.7
52.6
11...

ADVERTISEMENT

Get Answers For Free

Most questions answered within 1 hours.

ADVERTISEMENT

asked 8 minutes ago

asked 15 minutes ago

asked 29 minutes ago

asked 29 minutes ago

asked 40 minutes ago

asked 1 hour ago

asked 1 hour ago

asked 1 hour ago

asked 1 hour ago

asked 1 hour ago

asked 2 hours ago

asked 2 hours ago