Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You are working for a company that developed a new drug which increases HDL cholesterol (the good cholesterol). A variety of dosages were given to
You are working for a company that developed a new drug which increases HDL cholesterol (the good cholesterol). A variety of dosages were given to participants during a trial, and the increases of HDL cholesterol were measured. This information is summarized in the following plot: Each point in the above plot represents a participant who was given a dosage of mg and had an HDL increase of mg/dL. This information is stored in the 2d numpy array trial_data. The -values are stored in the first row of trial_data (i.e. trial_data[0]) and the -values are stored in the second row of trial_data (i.e. trial_data[1]). You are now working with a physician to determine the right dosage for one of her patients. 1) In order to help your client, first find a vector such that is the least squares line for the above data. Store the vector as a 1D-numpy array in beta. 2) The physician wants to raise the HDL level by 33 mg/dL. What dosage do you recommend? Save this as dosage. Hint: Recall from lab the various ways to compute least squares solutions. Another function you might find helpful is numpy.linalg.lstsq, though the methods used in lab are sufficient
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started