Question: answer code please Forced expiratory volume (FEV) is a standard measure of pulmonary function and is known to be a function of age and height.
Forced expiratory volume (FEV) is a standard measure of pulmonary function and is known to be a function of age and height. The data given below contains FEV information for 685 boys age 10 to 15 based on height in cm. The FEV inflormation is the average FEV for all boys tested at that height. 1. Print ous the data where frst column is the height and socond is FEV; use a loop to do this 2. Import NumPy and matplotib pyplot 3. Plat the data using a scatter plot where the height is on the x-axis and the FEV on the y-axis: add labels for x and y axes and a title for graph 4. Input functions wo wrote in first notebook this week to compute the coetticients in the Lagrange polynomial and evaluate interpolating polynomial at a point 5. Plot the data and the interpolating polynomial for a height of 134 to 178 oms add labels. Hint: to generate the x values to plot just use Numpy's linspace() command to ganerate points from 134 to 178: to get the corresponding y-value simply evaluate your interpolating polynomial at each of the x-values. 6. Use the polynomial to predict the FEV tor a height of 165cm and of 175cm. Which do you think is best and why? In [1]1]. Print out data in dolumtis height =1134,138,142,146,159,154,158,162,166,170,174,178} tev =11,7,1+9,2,2.1,2.2,2.5,2.7,3.,3.1,3.4,3.8,3.91 In {2}+2, Import 11 brariel - Numpy and matplot 116 In [3]; A. Flot the datay add labele to aken and plot title In [9]+ 4. Iaput functions to find interpolating polymoticat In 1417 + 5. Flot the Interpolating polynaedal from a helght of 134em to 376em In [5]+ of. Use the polynomial ta prediet the PEV for a height of 165 an and ot 175cm. owich do you think in a better predietfon
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
