Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise 2: This exercise is based on a real data of sale of individual residential property in Ames, Iowa. To complete this exercise, please read

Exercise 2: This exercise is based on a real data of sale of individual residential property in Ames, Iowa. To complete this exercise, please read the property sale data from a csv file property sale data into a 2d numpy array. For this you need to download the csv file and save it on your local folder. You can then use the following command to read the csv file into a 2d array:

house_data = np.genfromtxt('resources/train_house.csv', skip_header=1,delimiter=',')

Also, open the file in excel or notepad to see the header information. For this exercise there are three columns of our interest: 1stFlrSF (first floor sq ft), 2ndFlrSF (second floor sq ft), and SalePrice. Extract these columns from 2d numpy array house_data using numpy indexing. You need to compute the price per sqft (sale price/total sq ft) for each house. Compute the historgram and plot the price per sqft data using various number of bins=10,20,30,40, and 50. Based on the computed mean and standard deviation of the data, plot the normal pdf to show the fit along with each plot (as shown above).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Modeling And Design

Authors: Toby J. Teorey, Sam S. Lightstone, Tom Nadeau, H.V. Jagadish

5th Edition

0123820200, 978-0123820204

More Books

Students also viewed these Databases questions

Question

What is Accounting?

Answered: 1 week ago

Question

Define organisation chart

Answered: 1 week ago

Question

What are the advantages of planning ?

Answered: 1 week ago