Question

In: Statistics and Probability

Question 2: Download the Excel data file "Arlington_Homes" from the folder "Data" under "Chapter 12." a)...

Question 2:

Download the Excel data file "Arlington_Homes" from the folder "Data" under "Chapter 12."

a) read the data file in R.

b) using R, answer question 65 (a, b, and c) on page 411 of your book. Run the regression, show the estimates and test. Write what you are testing using a comment in the R program.

Question #65. link for page 411 #65 https://imgur.com/s0SgxP3

please show every step for R frmulas

Price

Sqft

Beds

Baths

Col

840000

2768

4

3.5

1

822000

2500

4

2.5

1

713000

2400

3

3

1

689000

2200

3

2.5

1

685000

2716

3

3.5

1

645000

2524

3

2

1

625000

2732

4

2.5

0

620000

2436

4

3.5

1

587500

2100

3

1.5

1

585000

1947

3

1.5

1

583000

2224

3

2.5

1

569000

3262

4

2

0

546000

1792

3

2

0

540000

1488

3

1.5

0

537000

2907

3

2.5

0

516000

1951

4

2

1

511000

1752

3

1.5

1

510000

1727

3

2

1

495000

1692

3

2

0

463000

1714

3

2

0

457000

1650

3

2

0

451000

1685

3

2

0

435000

1500

3

1.5

1

431700

1896

2

1.5

0

414000

1182

2

1.5

0

401500

1152

3

1

0

399000

1383

4

1

0

380000

1344

4

2

0

380000

1272

3

1

0

375900

2275

5

1

0

372000

1005

2

1

0

367500

1272

3

1

0

356500

1431

2

2

1

330000

1362

3

1

0

330000

1465

3

1

0

307500

850

1

1

0

Solutions

Expert Solution

Solutiona:

To read data:

library(readxl)
Arlington_Homes <- read_excel("C:/Users/M1045151/Downloads/Arlington_Homes.xlsx")
View(Arlington_Homes)

dim(Arlington_Homes)

glimpse(Arlington_Homes)

Output:

Observations: 36
Variables: 5
$ Price <dbl> 840000, 822000, 713000, 689000, 685000, 645000, 625000, 620000, 587500, 585000, 5...
$ Sqft <dbl> 2768, 2500, 2400, 2200, 2716, 2524, 2732, 2436, 2100, 1947, 2224, 3262, 1792, 148...
$ Beds <dbl> 4, 4, 3, 3, 3, 3, 4, 4, 3, 3, 3, 4, 3, 3, 3, 4, 3, 3, 3, 3, 3, 3, 3, 2, 2, 3, 4, ...
$ Baths <dbl> 3.5, 2.5, 3.0, 2.5, 3.5, 2.0, 2.5, 3.5, 1.5, 1.5, 2.5, 2.0, 2.0, 1.5, 2.5, 2.0, 1...
$ Col <dbl> 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, ...
Solutionb:

Rcode to get the linear regression:

regmod <- lm(Arlington_Homes$Price ~Arlington_Homes$Sqft+Arlington_Homes$Beds+Arlington_Homes$Baths+Arlington_Homes$Col)
summary(regmod)

Call:

lm(formula = Arlington_Homes$Price ~ Arlington_Homes$Sqft + Arlington_Homes$Beds +

Arlington_Homes$Baths + Arlington_Homes$Col)

Residuals:

Min 1Q Median 3Q Max

-157118 -47479 -4742 38849 168327

Coefficients:

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

(Intercept) 165888.66 52353.54 3.169 0.00343 **

Arlington_Homes$Sqft 91.68 32.34 2.834 0.00801 **

Arlington_Homes$Beds 4372.36 18561.84 0.236 0.81533

Arlington_Homes$Baths 66619.61 24659.48 2.702 0.01109 *

Arlington_Homes$Col 74557.88 27374.26 2.724 0.01051 *

---

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

Residual standard error: 68440 on 31 degrees of freedom

Multiple R-squared: 0.777, Adjusted R-squared: 0.7483

F-statistic: 27.01 on 4 and 31 DF, p-value: 1.031e-09

Regression equation is

price=165888.66+91.68*sqft+4372.36 *Beds+ 66619.61*Baths+ 74557.88 *col

sqft,Beds,cola re significanct varaibles

F=27.01

p= 1.031e-09

p<0.05

Model is significant.


Related Solutions

Question 2. Go to the Blackboard and download the MS excel file, ‘stock_return.xlsx’. It contains a...
Question 2. Go to the Blackboard and download the MS excel file, ‘stock_return.xlsx’. It contains a year of monthly stock price data of Amazon, Pfizer, and S&P 500 (Market Index). Using the data, answer the following questions. (50 points) (1) Compute the monthly return of Amazon and Pfizer. You should get 12 monthly returns for each. To get a monthly return, you need to use previous month’s stock price. For example, Amazon’s stock return of 2018-01 will be [(Stock price...
Go to the Files section and download the AFE_Test file from the Datasets folder. We are...
Go to the Files section and download the AFE_Test file from the Datasets folder. We are interested in a one­tail test described in the following fashion: Ho: u < or = to 200 CFM; H1: u > 200 CFM. At 5% significance level, we can reject the null hypothesis given the sample information in AFE_Test1. we can reject the null hypothesis given the sample information in AFE_Test2. we cannot reject the null hypothesis. we can reject the null hypothesis given...
Retrieve program Grades.cpp and the data file graderoll.dat from the Lab 12 folder. The code is...
Retrieve program Grades.cpp and the data file graderoll.dat from the Lab 12 folder. The code is as follows: ______________________________________________________________________________ #include // FILL IN DIRECTIVE FOR FILES #include <iostream> #include <iomanip> using namespace std; // This program reads records from a file. The file contains the // following: student's name, two test grades and final exam grade. // It then prints this information to the screen. const int NAMESIZE = 15; const int MAXRECORDS = 50; struct Grades // declares a...
Chapter 13: Applying Excel: Excel Worksheet (Part 1 of 2) Download the Applying Excel form and...
Chapter 13: Applying Excel: Excel Worksheet (Part 1 of 2) Download the Applying Excel form and enter formulas in all cells that contain question marks. For example, in cell C22 enter the formula "= B10". Note: The present value factors could be computed using the built-in Excel function PV, but we recommend using the formulas in Appendix 13B. Verify that your worksheet matches the example in the text. Check your worksheet by changing the discount rate to 10%. The net...
Chapter 9: Applying Excel: Excel Worksheet (Part 1 of 2) Download the Applying Excel form and...
Chapter 9: Applying Excel: Excel Worksheet (Part 1 of 2) Download the Applying Excel form and enter formulas in all cells that contain question marks. For example, in cell B30 enter the formula "= B20". Notes: In the text, variances are always displayed as positive numbers. To accomplish this, you can use the ABS() function in Excel. For example, the formula in cell C31 would be "=ABS(E31?B31)". Cells D31 through D39 and G31 through G39 already contain formulas to compute...
The data set for this question set (Tab Q1 in the Excel data file) comes from...
The data set for this question set (Tab Q1 in the Excel data file) comes from a research project that tracks the elderly residents in a community to monitor their cognitive function and general health. Based on the literature, education is considered a protective factor against dementia, and memory decline is usually the first sign of dementia. So the researchers would like to know whether education level (measured in number of years of formal schooling) is correlated with memory function...
7. Chapter 13, Question 2: Use the attached data file “Chapter 13 Data Set 1” to...
7. Chapter 13, Question 2: Use the attached data file “Chapter 13 Data Set 1” to answer this question in the book. Do you agree with the author’s conclusion about whether practice time makes a difference? <15 Hours Practice 15-25 Hours Practice More than 25 Hours Practice 58.7 64.4 68 55.3 55.8 65.9 61.8 58.7 54.7 49.5 54.7 53.6 64.5 52.7 58.7 61 67.8 58.7 65.7 61.6 65.7 51.4 58.7 66.5 53.6 54.6 56.7 59 51.5 55.4 54.7 51.5 61.4...
Question 1 Download the files Book.java and BookInfo.txt from Content->Chapter 12 Quiz Files. Create a BookDriver.java...
Question 1 Download the files Book.java and BookInfo.txt from Content->Chapter 12 Quiz Files. Create a BookDriver.java class with a main method. In the main method, create an ArrayList of Book objects, read in the information from BookInfo.txt and create Book objects to populate the ArrayList. After all data from the file is read in and the Book objects added to the ArrayList- print the contents of the ArrayList. Paste your BookDriver.java text (CtrlC to copy, CtrlV to paste) into the...
1. Download the EXCEL file: Access Exercise Tables 2. Open a new blank database in ACCESS...
1. Download the EXCEL file: Access Exercise Tables 2. Open a new blank database in ACCESS and name it “Exercise-Your Name” where you replace Your Name with your name. 3. Import each worksheet in the EXCEL file into ACCESS as a separate table as follows: a. External Data Tab -> Import Excel icon b. In the dialog box browse for the destination of the excel file you saved in step 1, it should default to “import the source data in...
1 Start Excel. Download and open the file named exploring_ecap_grader_a1.xlsx. 2 On the DC worksheet, select...
1 Start Excel. Download and open the file named exploring_ecap_grader_a1.xlsx. 2 On the DC worksheet, select the range A4:G4, wrap the text, apply Center alignment, and apply Blue, Accent 5, Lighter 60% fill color. 3 On the DC worksheet, merge and center the title in the range A1:G1. Apply Accent5 cell style and bold to the title. 4 On the DC worksheet, change the width of column A to 34. 5 On the DC worksheet, select the range C5:F10 and...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT