Answered step by step
Verified Expert Solution
Question
1 Approved Answer
DSC 4 3 0 : Python Programming Assignment 0 9 0 1 : Height Histograms Please download the file Heights _ and _ Weights.csv
DSC : Python Programming Assignment : Height Histograms
Please download the file "HeightsandWeights.csv on the
Read the data using Pandas package as you learned in the last lesson. The data contains height in centimeter and weight in kilogram of subjects together with the sex information of each person downloaded from this Kaggle dataset, and gently preprocessed In this assignment, we will use Matplotlib's histogram command to estimate and plot the approximate distribution of heights for male and female subjects in the same figure. You may choose your own binning strategy and their numbers higher number of bins usually gives a smoother visualization but make sure that the bars in both histograms are fully aligned, enabling an easier comparisonyou can do this by plotting the histograms with the same set of bins. Label the axes, histograms and legends accordingly.
Acceptadie
unacceptavie
Compute the mean of male and female heights using NumPy package and plot a vertical line at the location of each mean value. Check whether these vertical lines are close to the mode of the histograms. As a final check, compute the area under the histograms and see if they sum to one when you set densityTrue.
Record a threeminute video in which you run the code. Then, present your code. Specifically, answer the following questions:
Show how you read the data and divided them into male and female groups.
Show how you made the histograms transparent to let them be visible at the same time.
Explain how you made sure the histogram bins are the same for both groups and that they cover the whole data.
Show how you computed the area under the histograms and whether they summed to one.
Submission: Submit a single py file containing all the code to the DL Do not zip or archive the file. Your code must include comments at the top including your name, date, video link, and the honor statement, "I have not given or received any unauthorized assistance on this assignment." Each function must include a docstring and be commented appropriately.
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