An important problem in real estate is determining how to price homes to be sold. There are so many factors-size, age, and style of the home; number of bedrooms and bathrooms; size of the lot; and so on-which makes setting a price a challenging task. In this project, we will try to help realtors in this task by determining how different characteristics of homes relate to home prices,identifying the key variables in pricing, and building multiple-variable regression models ( Project-6) to predict prices based on property characteristics. Our analysis will be based on the Mount Pleasant Real Estate Data. This data set includes information about 245 properties for sale in three communities in the suburban town of Mount Pleasant, South Carolina, in 2017.

Prepare Data for Regression Analysis:

Question-1:

Classify the three variables List Price, Squarefootage, and Subdivision as qualitative or quantatitive and provide the level of measurement

data.class(data)
## [1] "data.frame"
str(data)
## 'data.frame':    245 obs. of  22 variables:
##  $ ID                   : int  115 117 5 9 62 61 25 27 60 59 ...
##  $ List.Price           : int  369900 375000 769900 699990 436625 446900 575000 575000 464900 469900 ...
##  $ Duplex.              : chr  "Yes" "Yes" "No" "No" ...
##  $ Bedrooms             : int  3 3 4 4 4 3 4 4 3 4 ...
##  $ Baths...Total        : num  2.5 2.5 3.5 3.5 3 2.5 3.5 3 2.5 2 ...
##  $ Baths...Full         : int  2 2 3 3 3 2 3 3 2 2 ...
##  $ Baths...Half         : int  1 1 1 1 0 1 1 0 1 0 ...
##  $ Stories              : int  2 2 2 2 2 2 2 2 2 1 ...
##  $ Subdivision          : chr  "Carolina Park" "Carolina Park" "Carolina Park" "Carolina Park" ...
##  $ Square.Footage       : int  1797 1797 2767 3240 2072 1895 3237 3045 1895 2177 ...
##  $ Year.Built           : int  2017 2017 2014 2014 2017 2016 2014 2014 2017 2015 ...
##  $ Acreage              : num  0.06 0.06 0.35 0.29 0.19 0.11 0.2 0.19 0.13 0.32 ...
##  $ New.Owned.           : chr  "Yes" "Yes" "No" "No" ...
##  $ House.Style          : chr  "Townhouse" "Townhouse" "Traditional" "Traditional" ...
##  $ Covered.Parking.Spots: num  2 2 2 2 2 2 2 2 2 2 ...
##  $ Has.Pool.            : chr  "No" "No" "No" "No" ...
##  $ Has.Dock.            : chr  "No" "No" "No" "No" ...
##  $ Fenced.Yard          : chr  "No" "No" "Yes" "Yes" ...
##  $ Screened.Porch.      : chr  "No" "No" "Yes" "No" ...
##  $ Golf.Course.         : chr  "No" "No" "No" "No" ...
##  $ Fireplace.           : chr  "Yes" "Yes" "Yes" "Yes" ...
##  $ Number.of.Fireplaces : int  1 1 1 1 0 1 1 1 1 1 ...

Answer: - This is my answer

Question-2:

Which of the quantitative variable(s) in the previous question should be considered the dependent variable.Why?

library(ggplot2)
library(leaflet)

m <- leaflet() %>%
  addTiles() %>%  # Add default OpenStreetMap map tiles
  addMarkers(lng=-93.091301, lat=44.954445, popup="The birthplace of R")
m  # Print the map

Answer: - This is my answer

Data Deciption:

Question-3:

Use technology to make a histogram for List Price and describe the distribution.

print("your codes go here")
## [1] "your codes go here"

Answer: - This is my answer

Question-4:

Data Analysis:

Create a scatterplot of List Price vs. Squarefootage. That is let y = List Price and x = Squarefootage and describe any patterns.

Answer: - This is my answer

Question-5:

Can we use Pearson’s correlation coefficient to measure the strength of the linear association between List Price and Squarefootage? Why or why not?

print("your codes go here")
## [1] "your codes go here"

Answer: - This is my answer

Question-6:

Is the simple linear regression model appropriate for predicting List Price based on Squarefootage? Explain your answer by investigating the model assumptions.

print("your codes go here")
## [1] "your codes go here"

Answer: - This is my answer

Question-7:

Take the natural log of List Price and call LnPrice. Make a histogram for this variable.

print("your codes go here")
## [1] "your codes go here"

Answer: - This is my answer

Question-8

Describe the distribution of LnPrice.

print("your codes go here")
## [1] "your codes go here"

Answer: - This is my answer

Question-9

Create a scatterplot of LnPrice vs. Squarefootage and describe any patterns.

print("your codes go here")
## [1] "your codes go here"

Answer: - This is my answer

Question-10

Calculate Pearson’s correlation coefficient between LnPrice and Squarefootage and interpret it.

print("your codes go here")
## [1] "your codes go here"

Answer: - This is my answer

Question-11

Using technology, build a simple linear model to predict LnPrice from Squarefootage.

print("your codes go here")
## [1] "your codes go here"

Question-12

Use alpha=0.05, test to see if the model is significant

print("your codes go here")
## [1] "your codes go here"

Answer: - This is my answer

Question-13

Predict the price of a 3045 square foot house.
print("your codes go here")
## [1] "your codes go here"

Answer: - This is my answer

Question-14

Find the residual of the predicted value of the house in the previous question if the house is actually the house from the data set with ID = 27 in Carolina Park with a price of $575,000.
print("your codes go here")
## [1] "your codes go here"

Answer: - This is my answer

# Happy Computing!!

Formula

\[SE= \frac {Z \alpha/_2 \sigma}{\sqrt{n}}\] \[ \mu-SE<\mu <\mu+ SE \] ** Any Comment for this Project **

Answer: - This is my answer