Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A company that manufactures riding mowers wants to identify the best sales prospects for an intensive sales campaign. In particular, the manufacturer is interested in

A company that manufactures riding mowers wants to identify the best sales prospects for an intensive sales campaign. In particular, the manufacturer is interested in classifying households as prospective owners or nonowners on the basis of Income (in $ 1000s) and Lot Size (in 1000 ft2). The marketing expert looked at a random sample of 24 households, given in the file RidingMowers.csv.

Income Lot_Size Ownership
60 18.4 Owner
85.5 16.8 Owner
64.8 21.6 Owner
61.5 20.8 Owner
87 23.6 Owner
110.1 19.2 Owner
108 17.6 Owner
82.8 22.4 Owner
69 20 Owner
93 20.8 Owner
51 22 Owner
81 20 Owner
75 19.6 Nonowner
52.8 20.8 Nonowner
64.8 17.2 Nonowner
43.2 20.4 Nonowner
84 17.6 Nonowner
49.2 17.6 Nonowner
59.4 16 Nonowner
66 18.4 Nonowner
47.4 16.4 Nonowner
33 18.8 Nonowner
51 14 Nonowner
63 14.8 Nonowner

Using Python, create a scatter plot of Lot Size vs. Income, color-coded by the outcome variable owneronowner. Make sure to obtain a well-formatted plot (create legible labels and a legend, etc.).

# 1. load the data using Pandas read_csv (1 line of code) # MISSING: one line of code needed.

# 2. Print the number of rows and columns (1 line of code) # MISSING: one line of code needed.

output:

(24, 3)

Using pandas, write the code in Python to get the following output

image text in transcribed

# scatter plot of Lot Size vs. Income # Hint: Color the points by Ownership for this assignment.

image text in transcribed

Out[12]: : Income Lot_Size Ownership 0 60.0 18.4 Owner 1 85.5 16.8 Owner 2 64.8 21.6 Owner Owner 61.5 20.8 4 87.0 23.6 Owner Out[13]: 24 22 20 Lot_Size 18 16 14 30 40 - 50 60 80 90 100 110 70 Income

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

Data Analytics Systems Engineering Cybersecurity Project Management

Authors: Christopher Greco

1st Edition

168392648X, 978-1683926481

More Books

Students also viewed these Databases questions

Question

3. What are the current trends in computer hardware platforms?

Answered: 1 week ago