Question: Write python code for the following 1. Read and extract data from the file studentdata.csv (file below) Calculate the BMI using formula BMI=weight/(height)2. Create a

Write python code for the following

1. Read and extract data from the file studentdata.csv (file below) Calculate the BMI using formula BMI=weight/(height)2. Create a plot of age versus BMI with appropriate labels and title.

age weight height
22 44 5.1
24 50 5.2
26 55 5.3
28 58 5.4
30 60 5.5
32 65 5.6
34 68 5.7
36 70 5.8
38 73 5.9

2. Read and extract height, weight from file studentdata.csv(file above). By using least squares polynomial fit, create models that range from polynomial degrees of 1 to 5. i.e. create 5 models. Without plotting the models, identify which one has the best model and print the statistic used to identify the best fit model.

3. Write a Python program to generate data that uses the sum of a random variable (which has a Gaussian distribution) and a 4th-degree polynomial equation (3x4+x3+3x2+4x+5). Using least squares polynomial fit, curve the generated data using a model until your model can accurately predict all values

4. Write a Python program to plot the t-distribution of completion times of all the racers in Boston Marathon from 2012 (use bm_results2012.csv, file below) and overlay the plot with the t-distribution of a sample of 100 randomly selected racers. Both the t-distribution should be in the same chart, overlapping each other, but with different colors

name city gender age official country
Masazumi Soejima Fukuoka City M 41 83.45 JPN
Gebregziabher Gebremariam Tigray M 27 142.93 ETH
Ernst F. Van Dyk Paarl M 39 84.38 RSA
Kurt H. Fearnley Hamilton M 31 81.65 AUS
Kota Hokinoue Iizuka M 38 83.43 JPN
Levy Matebo Trans Nzoia M 22 133.1 KEN
Sharon Cherop Marakwet F 28 151.83 KEN
Wilson Chebet Marakwet M 26 134.93 KEN
Joshua R. Cassidy Toronto M 27 78.42 CAN

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!