Different data has been collected for the problem of Exercise 2, above (data is given in...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Different data has been collected for the problem of Exercise 2, above (data is given in Excel file). Now we have data samples for both genders. We shall use the Python language with the ScikitLearn library. Show snips from your notebook for the answers. NOTE: need to discover some pandas and numpy, simple functions. 1. Import the data and modify it appropriately for regression. 2. On a scatter plot, show a plot for the age against the cost. Show Male points in blue and Female points in red 3. Create the appropriate regressor with the above data. Use the default training/testing proportions. 4. Show the parameters of the regressor and the error. 5. Give the prediction for health costs for male and female at 80 years of age. SNUM GENDER 1 MALE 2 MALE 3 MALE 4 MALE 5 MALE 6 MALE 7 MALE 8 MALE 9 MALE 10 MALE 11 MALE 12 MALE 13 MALE 14 FEMALE 15 FEMALE 16 FEMALE 17 FEMALE 18 FEMALE 19 FEMALE 20 FEMALE 21 FEMALE 22 FEMALE 23 FEMALE 24 FEMALE 25 FEMALE 26 FEMALE AGE 15 20 25 37 40 45 48 50 55 61 64 67 70 15 20 25 37 40 45 48 50 55 61 64 67 70 MEXP 200 240 400 350 550 450 700 800 1300 1100 1150 1300 1500 200 200 600 400 600 450 700 850 1450 1300 1500 1400 1700 Different data has been collected for the problem of Exercise 2, above (data is given in Excel file). Now we have data samples for both genders. We shall use the Python language with the ScikitLearn library. Show snips from your notebook for the answers. NOTE: need to discover some pandas and numpy, simple functions. 1. Import the data and modify it appropriately for regression. 2. On a scatter plot, show a plot for the age against the cost. Show Male points in blue and Female points in red 3. Create the appropriate regressor with the above data. Use the default training/testing proportions. 4. Show the parameters of the regressor and the error. 5. Give the prediction for health costs for male and female at 80 years of age. SNUM GENDER 1 MALE 2 MALE 3 MALE 4 MALE 5 MALE 6 MALE 7 MALE 8 MALE 9 MALE 10 MALE 11 MALE 12 MALE 13 MALE 14 FEMALE 15 FEMALE 16 FEMALE 17 FEMALE 18 FEMALE 19 FEMALE 20 FEMALE 21 FEMALE 22 FEMALE 23 FEMALE 24 FEMALE 25 FEMALE 26 FEMALE AGE 15 20 25 37 40 45 48 50 55 61 64 67 70 15 20 25 37 40 45 48 50 55 61 64 67 70 MEXP 200 240 400 350 550 450 700 800 1300 1100 1150 1300 1500 200 200 600 400 600 450 700 850 1450 1300 1500 1400 1700
Expert Answer:
Answer rating: 100% (QA)
Based on the images provided youre being asked to perform a data analysis using Python with the ScikitLearn library as well as Pandas and NumPy librar... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Kim has taken a big step toward saving for her house. She has accumulated $56,750.00 for her down payment. Kim began with an initial investment of $25,000.00. She has been investing for 9 years. What...
-
Case Study: Quick Fix Dental Practice Technology requirements Application must be built using Visual Studio 2019 or Visual Studio 2017, professional or enterprise. The community edition is not...
-
In Illinois, when does a judgment become a general lien on a defendant's real and personal property?
-
Prerequisite: You will be using "utils.py" from Python 2 Assignment Task 1) In "utils.py," add a Python function called "calculate_fourier_coefficients" that calculates the coefficients of a Fourier...
-
Determine the location (x, y) of the particle M1 so that the three particles, which lie in the xy plane, have a center of mass located at the origin O. Given: M1 = 7 kg M2 = 3 kg M3 = 5 kg a = 2 m b...
-
Review one of the clinical personality measures (i.e., Minnesota Multiphasic Personality Inventory-2, Millon Clinical Mutliaxial Inventory-III, Personality Assessment Inventory, Revised NEO...
-
For each of the following sets of data, (1) calculate the mean of the scores \(\left(\mathrm{X}^{-} ight),(2)\) calculate the deviation of each score from the mean \(\mathrm{X}-\mathrm{X}^{-}\), and...
-
Anderson Trade Mart has recently had lackluster sales. The rate of inventory turnover has dropped, and the merchandise is gathering dust. At the same time, competition has forced Andersons suppliers...
-
In the context of global interconnectedness, how should we approach the ethical responsibilities of individuals, corporations, and governments towards marginalized communities and vulnerable...
-
A highway has an optional toll lane that drivers may take to reduce the time they spend driving. Drivers pay a small fee to enter the toll lane ($0.25). Then, once they leave the toll lane, they pay...
-
Suppose Rick is looking for a new assistant for his upcoming adventure to harvest Mega Seeds. Rick estimates that he can earn $4,000 if he goes alone or $8,000 if he hires Morty. If Morty doesn't...
-
Researchers from the National Institutes of Health want to determine the current rates of smoking among adult males and adult females. They conduct a survey of 500 adults of each gender. Indicate...
-
In order to study the seriousness of drinking and driving, a researcher obtains records from past car crashes. Drivers are partitioned into a group that had no alcohol consumption and another group...
-
What characteristic of a data set can be better understood by constructing a histogram?
-
A clinical trial of aspirin treatments is being planned to determine whether the rate of myocardial infarctions (heart attacks) is different for men and women. Identify which of these designs is most...
-
True or false: If data lead to a conclusion with statistical significance, then the results also have practical significance.
-
Differentiate between an ideal screen and an actual screen (5)
-
a. What is the cost of borrowing if Amarjit borrows $28 500 and repays it over a four-year period? b. How many shares of each stock would he get if he used the $28 500 and invested equally in all...
-
Data Set 21 Earthquakes in Appendix B includes the depths (km) of the sources of 600 earthquakes. Use technology for the following. a. Find the mean and standard deviation of the 600 depths. b....
-
A sample of human brain volumes (cm 3 ) is obtained from those listed in Data Set 8 IQ and Brain Size in Appendix B: 1027, 1029, 1034, 1070, 1079, 1079, 963, 1439. In use the given data values to...
-
Refer to Data Set 24 Word Counts in Appendix B, which includes counts of words spoken by males and females. That data set includes 12 columns of data, but first stack all of the male word counts in...
-
Diehl Cleaners has the following statement of financial position items. Instructions Classify each item as an asset, liability, or equity. Analyze the effect of transactions. Accounts payable Cash...
-
Erin Danielle, the bookkeeper for Liverpool Ltd., has been trying to determine the correct statement of financial position for the company. The companys statement of financial position is shown...
-
Which of the following is true? a. Financial frauds have not occurred in U.S. companies because GAAP has detailed accounting and disclosure requirements. b. Transaction analysis is basically the same...
Study smarter with the SolutionInn App