Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!