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

### Problem 1 title: \"R Notebook\" c) & d) output: html_notebook --- This is an

ID: 3598662 • Letter: #

Question

### Problem 1 title: "R Notebook" c) & d)
output: html_notebook
---
This is an [R Markdown](http://rmarkdown.rstudio.com) Notebook. When you execute code within the notebook, the results appear beneath the code.

## Homework 2 Review of Descriptive statistics and Correlation

The dataset $USStates$ examines the percent of adults to graduate college in US states by region. The dataset also includes information on the percent to graduate high school in each state.


c) Compute the correlation coefficient and draw the scattered plot including $High School$ as the explanatory variable and $College$ as the response variable. Is there a linear trend? Is it positive or negative? Are there any really obvious outlier?

```{r}
# Insert R code here

```

d) What is the predicted percent to graduate college is $85 %$ graduate high school? What is it if $90 %$ graduate high school? Massachusetts appears to have a particularly large positive residual. Massachusetts has $92.4 %$ graduating high school and $48.3 %$ graduating college. Compute the residual for Massachusetts.

```{r}
# Insert R code here

```

Explanation / Answer

package com.one;

abstract class Polynomial {

DList<Term> data = null;

public Polynomial() {

data = new DList<>();

}

public final String toString() {

String ans = "";

boolean starting = true;

try {

DNode<Term> n = data.getFirst();

while (n != null) {

if (!starting && n.getData().isPositive())

ans += " +";

starting = false;

ans += " " + n.getData().toString();

n = data.getNext(n);

}

} catch (Exception e) {

if (starting)

return "0";

}

return ans;

}

abstract public Polynomial add(Polynomial p);

abstract public Polynomial subtract(Polynomial p);

abstract public Polynomial multiply(Polynomial p);

abstract public Polynomial divide(Polynomial p) throws Exception;

abstract public Polynomial remainder(Polynomial p) throws Exception;

}